From 8a5680aaf08fa54d2a085070b7e5d93eb21cd176 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Tue, 7 Jul 2020 16:22:30 -0500 Subject: [PATCH] connect: upgrade github.com/envoyproxy/go-control-plane to v0.9.5 (#8247) cherry-pick of #8165 onto origin/release/1.8.x --- agent/xds/clusters.go | 36 +- agent/xds/config.go | 7 +- agent/xds/endpoints.go | 33 +- agent/xds/endpoints_test.go | 54 +- agent/xds/golden_test.go | 3 +- agent/xds/listeners.go | 143 +- agent/xds/response.go | 31 +- agent/xds/routes.go | 40 +- agent/xds/server.go | 23 +- agent/xds/testing.go | 2 +- go.mod | 9 +- go.sum | 28 +- .../opencensus-proto/AUTHORS | 1 + .../opencensus-proto}/LICENSE | 9 +- .../gen-go/resource/v1/resource.pb.go | 100 + .../gen-go/trace/v1/trace.pb.go | 1553 ++ .../gen-go/trace/v1/trace_config.pb.go | 359 + vendor/github.com/cncf/udpa/go/LICENSE | 201 + .../udpa/go/udpa/annotations/migrate.pb.go | 231 + .../udpa/annotations/migrate.pb.validate.go | 246 + .../udpa/go/udpa/annotations/sensitive.pb.go | 50 + .../udpa/annotations/sensitive.pb.validate.go | 37 + .../udpa/go/udpa/annotations/status.pb.go | 93 + .../go/udpa/annotations/status.pb.validate.go | 104 + .../udpa/go/udpa/annotations/versioning.pb.go | 94 + .../annotations/versioning.pb.validate.go | 106 + .../envoy/annotations/deprecation.pb.go | 66 + .../annotations/deprecation.pb.validate.go | 37 + .../envoy/annotations/resource.pb.go | 92 + .../envoy/annotations/resource.pb.validate.go | 106 + .../envoy/api/v2/auth/cert.pb.go | 5059 +---- .../envoy/api/v2/auth/cert.pb.validate.go | 725 +- .../go-control-plane/envoy/api/v2/cds.pb.go | 7119 +----- .../envoy/api/v2/cds.pb.validate.go | 1567 +- .../envoy/api/v2/cluster.pb.go | 1850 ++ .../envoy/api/v2/cluster.pb.validate.go | 2066 ++ .../api/v2/cluster/circuit_breaker.pb.go | 983 +- .../v2/cluster/circuit_breaker.pb.validate.go | 214 +- .../envoy/api/v2/cluster/filter.pb.go | 100 + .../api/v2/cluster/filter.pb.validate.go | 118 + .../api/v2/cluster/outlier_detection.pb.go | 1110 +- .../cluster/outlier_detection.pb.validate.go | 185 +- .../envoy/api/v2/core/address.pb.go | 2278 +- .../envoy/api/v2/core/address.pb.validate.go | 157 +- .../envoy/api/v2/core/backoff.pb.go | 101 + .../envoy/api/v2/core/backoff.pb.validate.go | 151 + .../envoy/api/v2/core/base.pb.go | 4638 +--- .../envoy/api/v2/core/base.pb.validate.go | 866 +- .../envoy/api/v2/core/config_source.pb.go | 1815 +- .../api/v2/core/config_source.pb.validate.go | 228 +- .../api/v2/core/event_service_config.pb.go | 118 + .../core/event_service_config.pb.validate.go | 126 + .../envoy/api/v2/core/grpc_method_list.pb.go | 141 + .../v2/core/grpc_method_list.pb.validate.go | 198 + .../envoy/api/v2/core/grpc_service.pb.go | 4182 +--- .../api/v2/core/grpc_service.pb.validate.go | 444 +- .../envoy/api/v2/core/health_check.pb.go | 4034 +--- .../api/v2/core/health_check.pb.validate.go | 450 +- .../envoy/api/v2/core/http_uri.pb.go | 543 +- .../envoy/api/v2/core/http_uri.pb.validate.go | 30 +- .../envoy/api/v2/core/protocol.pb.go | 1820 +- .../envoy/api/v2/core/protocol.pb.validate.go | 525 +- .../envoy/api/v2/core/socket_option.pb.go | 201 + .../api/v2/core/socket_option.pb.validate.go | 131 + .../envoy/api/v2/discovery.pb.go | 2567 +-- .../envoy/api/v2/discovery.pb.validate.go | 147 +- .../go-control-plane/envoy/api/v2/eds.pb.go | 1504 +- .../envoy/api/v2/eds.pb.validate.go | 292 +- .../envoy/api/v2/endpoint.pb.go | 258 + .../envoy/api/v2/endpoint.pb.validate.go | 355 + .../envoy/api/v2/endpoint/endpoint.pb.go | 1724 +- .../api/v2/endpoint/endpoint.pb.validate.go | 415 +- .../api/v2/endpoint/endpoint_components.pb.go | 341 + .../endpoint_components.pb.validate.go | 425 + .../envoy/api/v2/endpoint/load_report.pb.go | 1868 +- .../v2/endpoint/load_report.pb.validate.go | 166 +- .../go-control-plane/envoy/api/v2/lds.pb.go | 1665 +- .../envoy/api/v2/lds.pb.validate.go | 325 +- .../envoy/api/v2/listener.pb.go | 475 + .../envoy/api/v2/listener.pb.validate.go | 538 + .../envoy/api/v2/listener/listener.pb.go | 2681 +-- .../api/v2/listener/listener.pb.validate.go | 548 +- .../api/v2/listener/listener_components.pb.go | 702 + .../listener_components.pb.validate.go | 742 + .../envoy/api/v2/listener/quic_config.pb.go | 115 + .../v2/listener/quic_config.pb.validate.go | 134 + .../api/v2/listener/udp_listener_config.pb.go | 180 + .../udp_listener_config.pb.validate.go | 201 + .../go-control-plane/envoy/api/v2/rds.pb.go | 1253 +- .../envoy/api/v2/rds.pb.validate.go | 227 +- .../go-control-plane/envoy/api/v2/route.pb.go | 226 + .../envoy/api/v2/route.pb.validate.go | 310 + .../envoy/api/v2/route/route.pb.go | 18512 +--------------- .../envoy/api/v2/route/route.pb.validate.go | 3935 +--- .../envoy/api/v2/route/route_components.pb.go | 3725 ++++ .../v2/route/route_components.pb.validate.go | 4521 ++++ .../envoy/api/v2/scoped_route.pb.go | 219 + .../envoy/api/v2/scoped_route.pb.validate.go | 306 + .../go-control-plane/envoy/api/v2/srds.pb.go | 310 + .../envoy/api/v2/srds.pb.validate.go | 101 + .../filter/accesslog/v2/accesslog.pb.go | 3716 +--- .../accesslog/v2/accesslog.pb.validate.go | 456 +- .../network/ext_authz/v2/ext_authz.pb.go | 454 +- .../ext_authz/v2/ext_authz.pb.validate.go | 28 +- .../v2/http_connection_manager.pb.go | 4646 +--- .../v2/http_connection_manager.pb.validate.go | 1331 +- .../network/tcp_proxy/v2/tcp_proxy.pb.go | 2018 +- .../tcp_proxy/v2/tcp_proxy.pb.validate.go | 313 +- .../config/listener/v2/api_listener.pb.go | 88 + .../listener/v2/api_listener.pb.validate.go | 112 + .../envoy/config/trace/v2/trace.pb.go | 741 + .../config/trace/v2/trace.pb.validate.go | 751 + .../service/auth/v2/attribute_context.pb.go | 2038 +- .../auth/v2/attribute_context.pb.validate.go | 123 +- .../envoy/service/auth/v2/external_auth.pb.go | 1202 +- .../auth/v2/external_auth.pb.validate.go | 128 +- .../service/auth/v2alpha/external_auth.pb.go | 54 +- .../auth/v2alpha/external_auth.pb.validate.go | 9 +- .../envoy/service/discovery/v2/ads.pb.go | 304 +- .../service/discovery/v2/ads.pb.validate.go | 9 +- .../envoy/service/discovery/v2/hds.pb.go | 2066 +- .../service/discovery/v2/hds.pb.validate.go | 213 +- .../envoy/service/discovery/v2/rtds.pb.go | 367 + .../service/discovery/v2/rtds.pb.validate.go | 182 + .../envoy/service/discovery/v2/sds.pb.go | 382 +- .../service/discovery/v2/sds.pb.validate.go | 9 +- .../envoy/type/hash_policy.pb.go | 144 + .../envoy/type/hash_policy.pb.validate.go | 190 + .../go-control-plane/envoy/type/http.pb.go | 71 + .../envoy/type/http.pb.validate.go | 37 + .../envoy/type/http_status.pb.go | 400 +- .../envoy/type/http_status.pb.validate.go | 18 +- .../envoy/type/matcher/metadata.pb.go | 173 + .../type/matcher/metadata.pb.validate.go | 235 + .../envoy/type/matcher/node.pb.go | 94 + .../envoy/type/matcher/node.pb.validate.go | 127 + .../envoy/type/matcher/number.pb.go | 129 + .../envoy/type/matcher/number.pb.validate.go | 127 + .../envoy/type/matcher/path.pb.go | 112 + .../envoy/type/matcher/path.pb.validate.go | 131 + .../envoy/type/matcher/regex.pb.go | 218 + .../envoy/type/matcher/regex.pb.validate.go | 294 + .../envoy/type/matcher/string.pb.go | 233 + .../envoy/type/matcher/string.pb.validate.go | 252 + .../envoy/type/matcher/struct.pb.go | 165 + .../envoy/type/matcher/struct.pb.validate.go | 227 + .../envoy/type/matcher/value.pb.go | 295 + .../envoy/type/matcher/value.pb.validate.go | 320 + .../envoy/type/metadata/v2/metadata.pb.go | 413 + .../type/metadata/v2/metadata.pb.validate.go | 608 + .../go-control-plane/envoy/type/percent.pb.go | 548 +- .../envoy/type/percent.pb.validate.go | 7 +- .../go-control-plane/envoy/type/range.pb.go | 590 +- .../envoy/type/range.pb.validate.go | 75 +- .../envoy/type/semantic_version.pb.go | 100 + .../type/semantic_version.pb.validate.go | 108 + .../envoy/type/token_bucket.pb.go | 110 + .../envoy/type/token_bucket.pb.validate.go | 148 + .../envoy/type/tracing/v2/custom_tag.pb.go | 376 + .../type/tracing/v2/custom_tag.pb.validate.go | 488 + .../pkg/{util => conversion}/struct.go | 16 +- .../pkg/{util => wellknown}/wellknown.go | 29 +- .../envoyproxy/protoc-gen-validate/NOTICE | 4 + .../protoc-gen-validate/validate/BUILD | 2 +- .../protoc-gen-validate/validate/validate.h | 51 + .../validate/validate.pb.go | 1065 +- .../validate/validate.proto | 9 +- .../googleapis/google/api/annotations.proto | 31 - .../gogo/googleapis/google/api/http.pb.go | 2338 -- .../gogo/googleapis/google/api/http.proto | 318 - .../gogo/googleapis/google/rpc/code.pb.go | 254 - .../gogo/googleapis/google/rpc/code.proto | 186 - .../googleapis/google/rpc/error_details.pb.go | 4659 ---- .../googleapis/google/rpc/error_details.proto | 200 - .../gogo/googleapis/google/rpc/status.pb.go | 726 - .../gogo/googleapis/google/rpc/status.proto | 92 - .../protobuf/jsonpb/jsonpb.go | 225 +- .../golang/protobuf/proto/properties.go | 5 +- .../golang/protobuf/ptypes/empty/empty.pb.go | 83 + .../golang/protobuf/ptypes/empty/empty.proto | 52 + .../protobuf/ptypes/struct/struct.pb.go | 336 + .../protobuf/ptypes/struct/struct.proto | 96 + .../protobuf/ptypes/wrappers/wrappers.pb.go | 461 + .../protobuf/ptypes/wrappers/wrappers.proto | 118 + .../api/annotations}/annotations.pb.go | 37 +- .../googleapis/api/annotations/client.pb.go | 79 + .../api/annotations/field_behavior.pb.go | 122 + .../googleapis/api/annotations/http.pb.go | 633 + .../googleapis/api/annotations/resource.pb.go | 317 + vendor/google.golang.org/grpc/.travis.yml | 27 +- .../google.golang.org/grpc/CODE-OF-CONDUCT.md | 3 + vendor/google.golang.org/grpc/CONTRIBUTING.md | 4 +- vendor/google.golang.org/grpc/GOVERNANCE.md | 1 + vendor/google.golang.org/grpc/MAINTAINERS.md | 27 + vendor/google.golang.org/grpc/backoff.go | 20 + .../google.golang.org/grpc/backoff/backoff.go | 52 + .../grpc/balancer/balancer.go | 13 +- .../grpc/balancer/base/balancer.go | 9 +- .../grpc/balancer_conn_wrappers.go | 140 +- vendor/google.golang.org/grpc/clientconn.go | 206 +- .../grpc/credentials/credentials.go | 40 +- vendor/google.golang.org/grpc/dialoptions.go | 51 +- .../grpc/encoding/encoding.go | 4 + vendor/google.golang.org/grpc/go.mod | 15 +- vendor/google.golang.org/grpc/go.sum | 36 +- .../google.golang.org/grpc/grpclog/grpclog.go | 2 +- .../google.golang.org/grpc/health/client.go | 28 +- .../grpc/health/grpc_health_v1/health.pb.go | 96 +- .../google.golang.org/grpc/health/server.go | 10 +- .../grpc/internal/backoff/backoff.go | 27 +- .../grpc/internal/binarylog/binarylog.go | 2 +- .../grpc/internal/binarylog/env_config.go | 4 +- .../grpc/internal/binarylog/sink.go | 2 +- .../grpc/internal/buffer/unbounded.go | 78 + .../grpc/internal/internal.go | 13 +- .../resolver/dns/dns_resolver.go | 9 +- .../resolver/passthrough/passthrough.go | 0 .../grpc/internal/transport/controlbuf.go | 12 +- .../grpc/internal/transport/http2_client.go | 189 +- .../grpc/internal/transport/http2_server.go | 43 +- .../grpc/internal/transport/http_util.go | 1 + .../grpc/internal/transport/transport.go | 61 +- .../grpc/resolver/resolver.go | 52 +- .../grpc/resolver_conn_wrapper.go | 163 +- vendor/google.golang.org/grpc/rpc_util.go | 53 +- vendor/google.golang.org/grpc/server.go | 12 + .../google.golang.org/grpc/service_config.go | 35 +- .../grpc/serviceconfig/serviceconfig.go | 21 +- vendor/google.golang.org/grpc/stream.go | 2 +- vendor/google.golang.org/grpc/version.go | 2 +- vendor/google.golang.org/grpc/vet.sh | 18 +- vendor/modules.txt | 41 +- 232 files changed, 46056 insertions(+), 97595 deletions(-) create mode 100644 vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS rename vendor/github.com/{gogo/googleapis => census-instrumentation/opencensus-proto}/LICENSE (99%) create mode 100644 vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go create mode 100644 vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go create mode 100644 vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go create mode 100644 vendor/github.com/cncf/udpa/go/LICENSE create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.validate.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.validate.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.validate.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.go create mode 100644 vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.validate.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go create mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go rename vendor/github.com/envoyproxy/go-control-plane/pkg/{util => conversion}/struct.go (77%) rename vendor/github.com/envoyproxy/go-control-plane/pkg/{util => wellknown}/wellknown.go (75%) create mode 100644 vendor/github.com/envoyproxy/protoc-gen-validate/NOTICE delete mode 100644 vendor/github.com/gogo/googleapis/google/api/annotations.proto delete mode 100644 vendor/github.com/gogo/googleapis/google/api/http.pb.go delete mode 100644 vendor/github.com/gogo/googleapis/google/api/http.proto delete mode 100644 vendor/github.com/gogo/googleapis/google/rpc/code.pb.go delete mode 100644 vendor/github.com/gogo/googleapis/google/rpc/code.proto delete mode 100644 vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go delete mode 100644 vendor/github.com/gogo/googleapis/google/rpc/error_details.proto delete mode 100644 vendor/github.com/gogo/googleapis/google/rpc/status.pb.go delete mode 100644 vendor/github.com/gogo/googleapis/google/rpc/status.proto rename vendor/github.com/{gogo => golang}/protobuf/jsonpb/jsonpb.go (86%) create mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/struct/struct.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto rename vendor/{github.com/gogo/googleapis/google/api => google.golang.org/genproto/googleapis/api/annotations}/annotations.pb.go (57%) create mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go create mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go create mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go create mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go create mode 100644 vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md create mode 100644 vendor/google.golang.org/grpc/GOVERNANCE.md create mode 100644 vendor/google.golang.org/grpc/MAINTAINERS.md create mode 100644 vendor/google.golang.org/grpc/backoff/backoff.go create mode 100644 vendor/google.golang.org/grpc/internal/buffer/unbounded.go rename vendor/google.golang.org/grpc/{ => internal}/resolver/dns/dns_resolver.go (98%) rename vendor/google.golang.org/grpc/{ => internal}/resolver/passthrough/passthrough.go (100%) diff --git a/agent/xds/clusters.go b/agent/xds/clusters.go index 7b3d591a0d..cbde94f242 100644 --- a/agent/xds/clusters.go +++ b/agent/xds/clusters.go @@ -4,7 +4,6 @@ import ( "encoding/json" "errors" "fmt" - "github.com/hashicorp/consul/logging" "time" envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" @@ -13,13 +12,14 @@ import ( envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" envoyendpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" envoytype "github.com/envoyproxy/go-control-plane/envoy/type" - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" - + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + "github.com/golang/protobuf/ptypes/any" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" + "github.com/hashicorp/consul/logging" ) // clustersFromSnapshot returns the xDS API representation of the "clusters" in the snapshot. @@ -314,13 +314,13 @@ func (s *Server) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot, name, pathProt } c = &envoy.Cluster{ Name: name, - ConnectTimeout: time.Duration(cfg.LocalConnectTimeoutMs) * time.Millisecond, + ConnectTimeout: ptypes.DurationProto(time.Duration(cfg.LocalConnectTimeoutMs) * time.Millisecond), ClusterDiscoveryType: &envoy.Cluster_Type{Type: envoy.Cluster_STATIC}, LoadAssignment: &envoy.ClusterLoadAssignment{ ClusterName: name, - Endpoints: []envoyendpoint.LocalityLbEndpoints{ + Endpoints: []*envoyendpoint.LocalityLbEndpoints{ { - LbEndpoints: []envoyendpoint.LbEndpoint{ + LbEndpoints: []*envoyendpoint.LbEndpoint{ makeEndpoint(name, addr, port), @@ -367,7 +367,7 @@ func (s *Server) makeUpstreamClusterForPreparedQuery(upstream structs.Upstream, if c == nil { c = &envoy.Cluster{ Name: sni, - ConnectTimeout: time.Duration(cfg.ConnectTimeoutMs) * time.Millisecond, + ConnectTimeout: ptypes.DurationProto(time.Duration(cfg.ConnectTimeoutMs) * time.Millisecond), ClusterDiscoveryType: &envoy.Cluster_Type{Type: envoy.Cluster_EDS}, EdsClusterConfig: &envoy.Cluster_EdsClusterConfig{ EdsConfig: &envoycore.ConfigSource{ @@ -463,7 +463,7 @@ func (s *Server) makeUpstreamClustersForDiscoveryChain( c := &envoy.Cluster{ Name: clusterName, AltStatName: clusterName, - ConnectTimeout: node.Resolver.ConnectTimeout, + ConnectTimeout: ptypes.DurationProto(node.Resolver.ConnectTimeout), ClusterDiscoveryType: &envoy.Cluster_Type{Type: envoy.Cluster_EDS}, CommonLbConfig: &envoy.Cluster_CommonLbConfig{ HealthyPanicThreshold: &envoytype.Percent{ @@ -548,7 +548,7 @@ func makeClusterFromUserConfig(configJSON string) (*envoy.Cluster, error) { if _, ok := jsonFields["@type"]; ok { // Type field is present so decode it as a types.Any - var any types.Any + var any any.Any err := jsonpb.UnmarshalString(configJSON, &any) if err != nil { return nil, err @@ -597,7 +597,7 @@ func (s *Server) makeGatewayCluster(snap *proxycfg.ConfigSnapshot, opts gatewayC cluster := &envoy.Cluster{ Name: opts.name, - ConnectTimeout: opts.connectTimeout, + ConnectTimeout: ptypes.DurationProto(opts.connectTimeout), // Having an empty config enables outlier detection with default config. OutlierDetection: &envoycluster.OutlierDetection{}, @@ -624,7 +624,7 @@ func (s *Server) makeGatewayCluster(snap *proxycfg.ConfigSnapshot, opts gatewayC // When a service instance is addressed by a hostname we have Envoy do the DNS resolution // by setting a DNS cluster type and passing the hostname endpoints via CDS. rate := 10 * time.Second - cluster.DnsRefreshRate = &rate + cluster.DnsRefreshRate = ptypes.DurationProto(rate) cluster.DnsLookupFamily = envoy.Cluster_V4_ONLY discoveryType := envoy.Cluster_Type{Type: envoy.Cluster_LOGICAL_DNS} @@ -633,13 +633,13 @@ func (s *Server) makeGatewayCluster(snap *proxycfg.ConfigSnapshot, opts gatewayC } cluster.ClusterDiscoveryType = &discoveryType - endpoints := make([]envoyendpoint.LbEndpoint, 0, 1) + endpoints := make([]*envoyendpoint.LbEndpoint, 0, 1) uniqueHostnames := make(map[string]bool) var ( hostname string idx int - fallback envoyendpoint.LbEndpoint + fallback *envoyendpoint.LbEndpoint ) for i, e := range opts.hostnameEndpoints { addr, port := e.BestAddress(opts.isRemote) @@ -683,7 +683,7 @@ func (s *Server) makeGatewayCluster(snap *proxycfg.ConfigSnapshot, opts gatewayC cluster.LoadAssignment = &envoy.ClusterLoadAssignment{ ClusterName: cluster.Name, - Endpoints: []envoyendpoint.LocalityLbEndpoints{ + Endpoints: []*envoyendpoint.LocalityLbEndpoints{ { LbEndpoints: endpoints, }, @@ -728,8 +728,8 @@ func makeThresholdsIfNeeded(limits UpstreamLimits) []*envoycluster.CircuitBreake return []*envoycluster.CircuitBreakers_Thresholds{threshold} } -func makeLbEndpoint(addr string, port int, health envoycore.HealthStatus, weight int) envoyendpoint.LbEndpoint { - return envoyendpoint.LbEndpoint{ +func makeLbEndpoint(addr string, port int, health envoycore.HealthStatus, weight int) *envoyendpoint.LbEndpoint { + return &envoyendpoint.LbEndpoint{ HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ Address: &envoycore.Address{ diff --git a/agent/xds/config.go b/agent/xds/config.go index 4dcc6a195c..928f4cf24f 100644 --- a/agent/xds/config.go +++ b/agent/xds/config.go @@ -5,7 +5,8 @@ import ( "time" envoycluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" + "github.com/golang/protobuf/ptypes/wrappers" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/lib/decode" "github.com/mitchellh/mapstructure" @@ -211,10 +212,10 @@ type PassiveHealthCheck struct { func (p PassiveHealthCheck) AsOutlierDetection() *envoycluster.OutlierDetection { od := &envoycluster.OutlierDetection{} if p.Interval != 0 { - od.Interval = types.DurationProto(p.Interval) + od.Interval = ptypes.DurationProto(p.Interval) } if p.MaxFailures != 0 { - od.Consecutive_5Xx = &types.UInt32Value{Value: p.MaxFailures} + od.Consecutive_5Xx = &wrappers.UInt32Value{Value: p.MaxFailures} } return od } diff --git a/agent/xds/endpoints.go b/agent/xds/endpoints.go index 68b20a3638..2a11610c12 100644 --- a/agent/xds/endpoints.go +++ b/agent/xds/endpoints.go @@ -3,16 +3,15 @@ package xds import ( "errors" "fmt" + envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" envoyendpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" - "github.com/gogo/protobuf/proto" - + "github.com/golang/protobuf/proto" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/api" - bexpr "github.com/hashicorp/go-bexpr" ) @@ -162,17 +161,17 @@ func (s *Server) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.ConfigSnapsh // generate endpoints for our servers if WAN federation is enabled if cfgSnap.ServiceMeta[structs.MetaWANFederationKey] == "1" && cfgSnap.ServerSNIFn != nil { - var allServersLbEndpoints []envoyendpoint.LbEndpoint + var allServersLbEndpoints []*envoyendpoint.LbEndpoint for _, srv := range cfgSnap.MeshGateway.ConsulServers { clusterName := cfgSnap.ServerSNIFn(cfgSnap.Datacenter, srv.Node.Node) addr, port := srv.BestAddress(false /*wan*/) - lbEndpoint := envoyendpoint.LbEndpoint{ + lbEndpoint := &envoyendpoint.LbEndpoint{ HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr(addr, port), + Address: makeAddress(addr, port), }, }, HealthStatus: envoycore.HealthStatus_UNKNOWN, @@ -180,8 +179,8 @@ func (s *Server) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.ConfigSnapsh cla := &envoy.ClusterLoadAssignment{ ClusterName: clusterName, - Endpoints: []envoyendpoint.LocalityLbEndpoints{{ - LbEndpoints: []envoyendpoint.LbEndpoint{lbEndpoint}, + Endpoints: []*envoyendpoint.LocalityLbEndpoints{{ + LbEndpoints: []*envoyendpoint.LbEndpoint{lbEndpoint}, }}, } allServersLbEndpoints = append(allServersLbEndpoints, lbEndpoint) @@ -193,7 +192,7 @@ func (s *Server) endpointsFromSnapshotMeshGateway(cfgSnap *proxycfg.ConfigSnapsh // in this datacenter without knowing its name. resources = append(resources, &envoy.ClusterLoadAssignment{ ClusterName: cfgSnap.ServerSNIFn(cfgSnap.Datacenter, ""), - Endpoints: []envoyendpoint.LocalityLbEndpoints{{ + Endpoints: []*envoyendpoint.LocalityLbEndpoints{{ LbEndpoints: allServersLbEndpoints, }}, }) @@ -289,11 +288,11 @@ func (s *Server) endpointsFromSnapshotIngressGateway(cfgSnap *proxycfg.ConfigSna return resources, nil } -func makeEndpoint(clusterName, host string, port int) envoyendpoint.LbEndpoint { - return envoyendpoint.LbEndpoint{ +func makeEndpoint(clusterName, host string, port int) *envoyendpoint.LbEndpoint { + return &envoyendpoint.LbEndpoint{ HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr(host, port), + Address: makeAddress(host, port), }, }, } @@ -423,7 +422,7 @@ type loadAssignmentEndpointGroup struct { func makeLoadAssignment(clusterName string, endpointGroups []loadAssignmentEndpointGroup, localDatacenter string) *envoy.ClusterLoadAssignment { cla := &envoy.ClusterLoadAssignment{ ClusterName: clusterName, - Endpoints: make([]envoyendpoint.LocalityLbEndpoints, 0, len(endpointGroups)), + Endpoints: make([]*envoyendpoint.LocalityLbEndpoints, 0, len(endpointGroups)), } if len(endpointGroups) > 1 { @@ -436,7 +435,7 @@ func makeLoadAssignment(clusterName string, endpointGroups []loadAssignmentEndpo for priority, endpointGroup := range endpointGroups { endpoints := endpointGroup.Endpoints - es := make([]envoyendpoint.LbEndpoint, 0, len(endpoints)) + es := make([]*envoyendpoint.LbEndpoint, 0, len(endpoints)) for _, ep := range endpoints { // TODO (mesh-gateway) - should we respect the translate_wan_addrs configuration here or just always use the wan for cross-dc? @@ -447,10 +446,10 @@ func makeLoadAssignment(clusterName string, endpointGroups []loadAssignmentEndpo healthStatus = endpointGroup.OverrideHealth } - es = append(es, envoyendpoint.LbEndpoint{ + es = append(es, &envoyendpoint.LbEndpoint{ HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr(addr, port), + Address: makeAddress(addr, port), }, }, HealthStatus: healthStatus, @@ -458,7 +457,7 @@ func makeLoadAssignment(clusterName string, endpointGroups []loadAssignmentEndpo }) } - cla.Endpoints = append(cla.Endpoints, envoyendpoint.LocalityLbEndpoints{ + cla.Endpoints = append(cla.Endpoints, &envoyendpoint.LocalityLbEndpoints{ Priority: uint32(priority), LbEndpoints: es, }) diff --git a/agent/xds/endpoints_test.go b/agent/xds/endpoints_test.go index bbcca387cd..5e2deb1f96 100644 --- a/agent/xds/endpoints_test.go +++ b/agent/xds/endpoints_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" - "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" envoyendpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" @@ -108,8 +108,8 @@ func Test_makeLoadAssignment(t *testing.T) { }, want: &envoy.ClusterLoadAssignment{ ClusterName: "service:test", - Endpoints: []envoyendpoint.LocalityLbEndpoints{{ - LbEndpoints: []envoyendpoint.LbEndpoint{}, + Endpoints: []*envoyendpoint.LocalityLbEndpoints{{ + LbEndpoints: []*envoyendpoint.LbEndpoint{}, }}, }, }, @@ -121,22 +121,22 @@ func Test_makeLoadAssignment(t *testing.T) { }, want: &envoy.ClusterLoadAssignment{ ClusterName: "service:test", - Endpoints: []envoyendpoint.LocalityLbEndpoints{{ - LbEndpoints: []envoyendpoint.LbEndpoint{ - envoyendpoint.LbEndpoint{ + Endpoints: []*envoyendpoint.LocalityLbEndpoints{{ + LbEndpoints: []*envoyendpoint.LbEndpoint{ + { HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr("10.10.10.10", 1234), + Address: makeAddress("10.10.10.10", 1234), }}, - HealthStatus: core.HealthStatus_HEALTHY, + HealthStatus: envoycore.HealthStatus_HEALTHY, LoadBalancingWeight: makeUint32Value(1), }, - envoyendpoint.LbEndpoint{ + { HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr("10.10.10.20", 1234), + Address: makeAddress("10.10.10.20", 1234), }}, - HealthStatus: core.HealthStatus_HEALTHY, + HealthStatus: envoycore.HealthStatus_HEALTHY, LoadBalancingWeight: makeUint32Value(1), }, }, @@ -151,22 +151,22 @@ func Test_makeLoadAssignment(t *testing.T) { }, want: &envoy.ClusterLoadAssignment{ ClusterName: "service:test", - Endpoints: []envoyendpoint.LocalityLbEndpoints{{ - LbEndpoints: []envoyendpoint.LbEndpoint{ - envoyendpoint.LbEndpoint{ + Endpoints: []*envoyendpoint.LocalityLbEndpoints{{ + LbEndpoints: []*envoyendpoint.LbEndpoint{ + { HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr("10.10.10.10", 1234), + Address: makeAddress("10.10.10.10", 1234), }}, - HealthStatus: core.HealthStatus_HEALTHY, + HealthStatus: envoycore.HealthStatus_HEALTHY, LoadBalancingWeight: makeUint32Value(10), }, - envoyendpoint.LbEndpoint{ + { HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr("10.10.10.20", 1234), + Address: makeAddress("10.10.10.20", 1234), }}, - HealthStatus: core.HealthStatus_HEALTHY, + HealthStatus: envoycore.HealthStatus_HEALTHY, LoadBalancingWeight: makeUint32Value(5), }, }, @@ -181,22 +181,22 @@ func Test_makeLoadAssignment(t *testing.T) { }, want: &envoy.ClusterLoadAssignment{ ClusterName: "service:test", - Endpoints: []envoyendpoint.LocalityLbEndpoints{{ - LbEndpoints: []envoyendpoint.LbEndpoint{ - envoyendpoint.LbEndpoint{ + Endpoints: []*envoyendpoint.LocalityLbEndpoints{{ + LbEndpoints: []*envoyendpoint.LbEndpoint{ + { HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr("10.10.10.10", 1234), + Address: makeAddress("10.10.10.10", 1234), }}, - HealthStatus: core.HealthStatus_HEALTHY, + HealthStatus: envoycore.HealthStatus_HEALTHY, LoadBalancingWeight: makeUint32Value(1), }, - envoyendpoint.LbEndpoint{ + { HostIdentifier: &envoyendpoint.LbEndpoint_Endpoint{ Endpoint: &envoyendpoint.Endpoint{ - Address: makeAddressPtr("10.10.10.20", 1234), + Address: makeAddress("10.10.10.20", 1234), }}, - HealthStatus: core.HealthStatus_UNHEALTHY, + HealthStatus: envoycore.HealthStatus_UNHEALTHY, LoadBalancingWeight: makeUint32Value(1), }, }, diff --git a/agent/xds/golden_test.go b/agent/xds/golden_test.go index 3021fa1eb8..4abc47b502 100644 --- a/agent/xds/golden_test.go +++ b/agent/xds/golden_test.go @@ -7,8 +7,7 @@ import ( "testing" envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" - "github.com/gogo/protobuf/jsonpb" - + "github.com/golang/protobuf/jsonpb" "github.com/stretchr/testify/require" ) diff --git a/agent/xds/listeners.go b/agent/xds/listeners.go index cd462feb10..0c24b63f74 100644 --- a/agent/xds/listeners.go +++ b/agent/xds/listeners.go @@ -10,9 +10,6 @@ import ( "strconv" "strings" - "github.com/hashicorp/consul/logging" - "github.com/hashicorp/go-hclog" - envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" envoyauth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" @@ -22,14 +19,18 @@ import ( envoyhttp "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2" envoytcp "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2" envoytype "github.com/envoyproxy/go-control-plane/envoy/type" - "github.com/envoyproxy/go-control-plane/pkg/util" - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" - + "github.com/envoyproxy/go-control-plane/pkg/conversion" + "github.com/envoyproxy/go-control-plane/pkg/wellknown" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" + pbstruct "github.com/golang/protobuf/ptypes/struct" + "github.com/golang/protobuf/ptypes/wrappers" "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" + "github.com/hashicorp/consul/logging" + "github.com/hashicorp/go-hclog" ) // listenersFromSnapshot returns the xDS API representation of the "listeners" in the snapshot. @@ -284,7 +285,7 @@ func (s *Server) makeIngressGatewayListeners(address string, cfgSnap *proxycfg.C if cfgSnap.IngressGateway.TLSEnabled { tlsContext = &envoyauth.DownstreamTlsContext{ CommonTlsContext: makeCommonTLSContextFromLeaf(cfgSnap, cfgSnap.Leaf()), - RequireClientCertificate: &types.BoolValue{Value: false}, + RequireClientCertificate: &wrappers.BoolValue{Value: false}, } } @@ -318,9 +319,9 @@ func (s *Server) makeIngressGatewayListeners(address string, cfgSnap *proxycfg.C return nil, err } - listener.FilterChains = []envoylistener.FilterChain{ + listener.FilterChains = []*envoylistener.FilterChain{ { - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ filter, }, TlsContext: tlsContext, @@ -370,7 +371,7 @@ func makeListener(name, addr string, port int) *envoy.Listener { // from rather than our slight variant in JSON/hcl. func makeListenerFromUserConfig(configJSON string) (*envoy.Listener, error) { // Figure out if there is an @type field. We don't require is since we know - // this will be a listener but unmarshalling into types.Any fails if it's not + // this will be a listener but unmarshalling into any.Any fails if it's not // there and unmarshalling into listener directly fails if it is... var jsonFields map[string]*json.RawMessage if err := json.Unmarshal([]byte(configJSON), &jsonFields); err != nil { @@ -380,8 +381,8 @@ func makeListenerFromUserConfig(configJSON string) (*envoy.Listener, error) { var l envoy.Listener if _, ok := jsonFields["@type"]; ok { - // Type field is present so decode it as a types.Any - var any types.Any + // Type field is present so decode it as a any.Any + var any any.Any err := jsonpb.UnmarshalString(configJSON, &any) if err != nil { return nil, err @@ -414,11 +415,11 @@ func injectConnectFilters(cfgSnap *proxycfg.ConfigSnapshot, token string, listen for idx := range listener.FilterChains { // Insert our authz filter before any others listener.FilterChains[idx].Filters = - append([]envoylistener.Filter{authFilter}, listener.FilterChains[idx].Filters...) + append([]*envoylistener.Filter{authFilter}, listener.FilterChains[idx].Filters...) listener.FilterChains[idx].TlsContext = &envoyauth.DownstreamTlsContext{ CommonTlsContext: makeCommonTLSContextFromLeaf(cfgSnap, cfgSnap.Leaf()), - RequireClientCertificate: &types.BoolValue{Value: true}, + RequireClientCertificate: &wrappers.BoolValue{Value: true}, } } return nil @@ -469,9 +470,9 @@ func (s *Server) makePublicListener(cfgSnap *proxycfg.ConfigSnapshot, token stri if err != nil { return nil, err } - l.FilterChains = []envoylistener.FilterChain{ + l.FilterChains = []*envoylistener.FilterChain{ { - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ filter, }, }, @@ -514,8 +515,8 @@ func (s *Server) makeExposedCheckListener(cfgSnap *proxycfg.ConfigSnapshot, clus return nil, err } - chain := envoylistener.FilterChain{ - Filters: []envoylistener.Filter{f}, + chain := &envoylistener.FilterChain{ + Filters: []*envoylistener.Filter{f}, } // For registered checks restrict traffic sources to localhost and Consul's advertise addr @@ -533,14 +534,14 @@ func (s *Server) makeExposedCheckListener(cfgSnap *proxycfg.ConfigSnapshot, clus chain.FilterChainMatch = &envoylistener.FilterChainMatch{ SourcePrefixRanges: []*envoycore.CidrRange{ - {AddressPrefix: "127.0.0.1", PrefixLen: &types.UInt32Value{Value: 8}}, - {AddressPrefix: "::1", PrefixLen: &types.UInt32Value{Value: 128}}, - {AddressPrefix: advertise, PrefixLen: &types.UInt32Value{Value: uint32(advertiseLen)}}, + {AddressPrefix: "127.0.0.1", PrefixLen: &wrappers.UInt32Value{Value: 8}}, + {AddressPrefix: "::1", PrefixLen: &wrappers.UInt32Value{Value: 128}}, + {AddressPrefix: advertise, PrefixLen: &wrappers.UInt32Value{Value: uint32(advertiseLen)}}, }, } } - l.FilterChains = []envoylistener.FilterChain{chain} + l.FilterChains = []*envoylistener.FilterChain{chain} return l, err } @@ -552,7 +553,7 @@ func (s *Server) makeTerminatingGatewayListener(name, addr string, port int, cfg if err != nil { return nil, err } - l.ListenerFilters = []envoylistener.ListenerFilter{tlsInspector} + l.ListenerFilters = []*envoylistener.ListenerFilter{tlsInspector} // Make a FilterChain for each linked service // Match on the cluster name, @@ -596,8 +597,8 @@ func (s *Server) makeTerminatingGatewayListener(name, addr string, port int, cfg if err != nil { return nil, err } - fallback := envoylistener.FilterChain{ - Filters: []envoylistener.Filter{ + fallback := &envoylistener.FilterChain{ + Filters: []*envoylistener.Filter{ {Name: "envoy.filters.network.sni_cluster"}, tcpProxy, }, @@ -608,34 +609,34 @@ func (s *Server) makeTerminatingGatewayListener(name, addr string, port int, cfg } func (s *Server) sniFilterChainTerminatingGateway(listener, cluster, token string, service structs.ServiceName, - cfgSnap *proxycfg.ConfigSnapshot) (envoylistener.FilterChain, error) { + cfgSnap *proxycfg.ConfigSnapshot) (*envoylistener.FilterChain, error) { authFilter, err := makeExtAuthFilter(token) if err != nil { - return envoylistener.FilterChain{}, err + return nil, err } sniCluster, err := makeSNIClusterFilter() if err != nil { - return envoylistener.FilterChain{}, err + return nil, err } // The cluster name here doesn't matter as the sni_cluster filter will fill it in for us. statPrefix := fmt.Sprintf("terminating_gateway_%s_%s_", service.NamespaceOrDefault(), service.Name) tcpProxy, err := makeTCPProxyFilter(listener, "", statPrefix) if err != nil { - return envoylistener.FilterChain{}, err + return nil, err } - return envoylistener.FilterChain{ + return &envoylistener.FilterChain{ FilterChainMatch: makeSNIFilterChainMatch(cluster), - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ authFilter, sniCluster, tcpProxy, }, TlsContext: &envoyauth.DownstreamTlsContext{ CommonTlsContext: makeCommonTLSContextFromLeaf(cfgSnap, cfgSnap.TerminatingGateway.ServiceLeaves[service]), - RequireClientCertificate: &types.BoolValue{Value: true}, + RequireClientCertificate: &wrappers.BoolValue{Value: true}, }, }, err } @@ -658,15 +659,15 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p return nil, err } - sniClusterChain := envoylistener.FilterChain{ - Filters: []envoylistener.Filter{ + sniClusterChain := &envoylistener.FilterChain{ + Filters: []*envoylistener.Filter{ sniCluster, tcpProxy, }, } l := makeListener(name, addr, port) - l.ListenerFilters = []envoylistener.ListenerFilter{tlsInspector} + l.ListenerFilters = []*envoylistener.ListenerFilter{tlsInspector} // TODO (mesh-gateway) - Do we need to create clusters for all the old trust domains as well? // We need 1 Filter Chain per datacenter @@ -682,11 +683,11 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p return nil, err } - l.FilterChains = append(l.FilterChains, envoylistener.FilterChain{ + l.FilterChains = append(l.FilterChains, &envoylistener.FilterChain{ FilterChainMatch: &envoylistener.FilterChainMatch{ ServerNames: []string{fmt.Sprintf("*.%s", clusterName)}, }, - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ dcTCPProxy, }, }) @@ -704,11 +705,11 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p return nil, err } - l.FilterChains = append(l.FilterChains, envoylistener.FilterChain{ + l.FilterChains = append(l.FilterChains, &envoylistener.FilterChain{ FilterChainMatch: &envoylistener.FilterChainMatch{ ServerNames: []string{fmt.Sprintf("*.%s", clusterName)}, }, - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ dcTCPProxy, }, }) @@ -724,11 +725,11 @@ func (s *Server) makeMeshGatewayListener(name, addr string, port int, cfgSnap *p return nil, err } - l.FilterChains = append(l.FilterChains, envoylistener.FilterChain{ + l.FilterChains = append(l.FilterChains, &envoylistener.FilterChain{ FilterChainMatch: &envoylistener.FilterChainMatch{ ServerNames: []string{fmt.Sprintf("%s", clusterName)}, }, - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ dcTCPProxy, }, }) @@ -792,9 +793,9 @@ func (s *Server) makeUpstreamListenerForDiscoveryChain( return nil, err } - l.FilterChains = []envoylistener.FilterChain{ + l.FilterChains = []*envoylistener.FilterChain{ { - Filters: []envoylistener.Filter{ + Filters: []*envoylistener.Filter{ filter, }, TlsContext: tlsContext, @@ -852,7 +853,7 @@ func getAndModifyUpstreamConfigForListener(logger hclog.Logger, u *structs.Upstr func makeListenerFilter( useRDS bool, - protocol, filterName, cluster, statPrefix, routePath string, ingress bool) (envoylistener.Filter, error) { + protocol, filterName, cluster, statPrefix, routePath string, ingress bool) (*envoylistener.Filter, error) { switch protocol { case "grpc": @@ -865,16 +866,16 @@ func makeListenerFilter( fallthrough default: if useRDS { - return envoylistener.Filter{}, fmt.Errorf("RDS is not compatible with the tcp proxy filter") + return nil, fmt.Errorf("RDS is not compatible with the tcp proxy filter") } else if cluster == "" { - return envoylistener.Filter{}, fmt.Errorf("cluster name is required for a tcp proxy filter") + return nil, fmt.Errorf("cluster name is required for a tcp proxy filter") } return makeTCPProxyFilter(filterName, cluster, statPrefix) } } -func makeTLSInspectorListenerFilter() (envoylistener.ListenerFilter, error) { - return envoylistener.ListenerFilter{Name: util.TlsInspector}, nil +func makeTLSInspectorListenerFilter() (*envoylistener.ListenerFilter, error) { + return &envoylistener.ListenerFilter{Name: wellknown.TlsInspector}, nil } func makeSNIFilterChainMatch(sniMatch string) *envoylistener.FilterChainMatch { @@ -883,12 +884,12 @@ func makeSNIFilterChainMatch(sniMatch string) *envoylistener.FilterChainMatch { } } -func makeSNIClusterFilter() (envoylistener.Filter, error) { +func makeSNIClusterFilter() (*envoylistener.Filter, error) { // This filter has no config which is why we are not calling make - return envoylistener.Filter{Name: "envoy.filters.network.sni_cluster"}, nil + return &envoylistener.Filter{Name: "envoy.filters.network.sni_cluster"}, nil } -func makeTCPProxyFilter(filterName, cluster, statPrefix string) (envoylistener.Filter, error) { +func makeTCPProxyFilter(filterName, cluster, statPrefix string) (*envoylistener.Filter, error) { cfg := &envoytcp.TcpProxy{ StatPrefix: makeStatPrefix("tcp", statPrefix, filterName), ClusterSpecifier: &envoytcp.TcpProxy_Cluster{Cluster: cluster}, @@ -907,10 +908,10 @@ func makeHTTPFilter( useRDS bool, filterName, cluster, statPrefix, routePath string, ingress, grpc, http2 bool, -) (envoylistener.Filter, error) { - op := envoyhttp.INGRESS +) (*envoylistener.Filter, error) { + op := envoyhttp.HttpConnectionManager_Tracing_INGRESS if !ingress { - op = envoyhttp.EGRESS + op = envoyhttp.HttpConnectionManager_Tracing_EGRESS } proto := "http" if grpc { @@ -919,7 +920,7 @@ func makeHTTPFilter( cfg := &envoyhttp.HttpConnectionManager{ StatPrefix: makeStatPrefix(proto, statPrefix, filterName), - CodecType: envoyhttp.AUTO, + CodecType: envoyhttp.HttpConnectionManager_AUTO, HttpFilters: []*envoyhttp.HttpFilter{ &envoyhttp.HttpFilter{ Name: "envoy.router", @@ -936,12 +937,12 @@ func makeHTTPFilter( if useRDS { if cluster != "" { - return envoylistener.Filter{}, fmt.Errorf("cannot specify cluster name when using RDS") + return nil, fmt.Errorf("cannot specify cluster name when using RDS") } cfg.RouteSpecifier = &envoyhttp.HttpConnectionManager_Rds{ Rds: &envoyhttp.Rds{ RouteConfigName: filterName, - ConfigSource: envoycore.ConfigSource{ + ConfigSource: &envoycore.ConfigSource{ ConfigSourceSpecifier: &envoycore.ConfigSource_Ads{ Ads: &envoycore.AggregatedConfigSource{}, }, @@ -950,10 +951,10 @@ func makeHTTPFilter( } } else { if cluster == "" { - return envoylistener.Filter{}, fmt.Errorf("must specify cluster name when not using RDS") + return nil, fmt.Errorf("must specify cluster name when not using RDS") } - route := envoyroute.Route{ - Match: envoyroute.RouteMatch{ + route := &envoyroute.Route{ + Match: &envoyroute.RouteMatch{ PathSpecifier: &envoyroute.RouteMatch_Prefix{ Prefix: "/", }, @@ -979,11 +980,11 @@ func makeHTTPFilter( cfg.RouteSpecifier = &envoyhttp.HttpConnectionManager_RouteConfig{ RouteConfig: &envoy.RouteConfiguration{ Name: filterName, - VirtualHosts: []envoyroute.VirtualHost{ + VirtualHosts: []*envoyroute.VirtualHost{ { Name: filterName, Domains: []string{"*"}, - Routes: []envoyroute.Route{ + Routes: []*envoyroute.Route{ route, }, }, @@ -1000,14 +1001,14 @@ func makeHTTPFilter( // Add grpc bridge before router cfg.HttpFilters = append([]*envoyhttp.HttpFilter{{ Name: "envoy.grpc_http1_bridge", - ConfigType: &envoyhttp.HttpFilter_Config{Config: &types.Struct{}}, + ConfigType: &envoyhttp.HttpFilter_Config{Config: &pbstruct.Struct{}}, }}, cfg.HttpFilters...) } return makeFilter("envoy.http_connection_manager", cfg) } -func makeExtAuthFilter(token string) (envoylistener.Filter, error) { +func makeExtAuthFilter(token string) (*envoylistener.Filter, error) { cfg := &extauthz.ExtAuthz{ StatPrefix: "connect_authz", GrpcService: &envoycore.GrpcService{ @@ -1032,15 +1033,15 @@ func makeExtAuthFilter(token string) (envoylistener.Filter, error) { return makeFilter("envoy.ext_authz", cfg) } -func makeFilter(name string, cfg proto.Message) (envoylistener.Filter, error) { - // Ridiculous dance to make that pbstruct into types.Struct by... encoding it +func makeFilter(name string, cfg proto.Message) (*envoylistener.Filter, error) { + // Ridiculous dance to make that struct into pbstruct.Struct by... encoding it // as JSON and decoding again!! - cfgStruct, err := util.MessageToStruct(cfg) + cfgStruct, err := conversion.MessageToStruct(cfg) if err != nil { - return envoylistener.Filter{}, err + return nil, err } - return envoylistener.Filter{ + return &envoylistener.Filter{ Name: name, ConfigType: &envoylistener.Filter_Config{Config: cfgStruct}, }, nil diff --git a/agent/xds/response.go b/agent/xds/response.go index 38b395b2a0..c9a482e20a 100644 --- a/agent/xds/response.go +++ b/agent/xds/response.go @@ -3,26 +3,26 @@ package xds import ( envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" - prototypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" + "github.com/golang/protobuf/ptypes/wrappers" ) func createResponse(typeURL string, version, nonce string, resources []proto.Message) (*envoy.DiscoveryResponse, error) { - anys := make([]types.Any, 0, len(resources)) + anys := make([]*any.Any, 0, len(resources)) for _, r := range resources { if r == nil { continue } - if any, ok := r.(*types.Any); ok { - anys = append(anys, *any) + if any, ok := r.(*any.Any); ok { + anys = append(anys, any) continue } data, err := proto.Marshal(r) if err != nil { return nil, err } - anys = append(anys, types.Any{ + anys = append(anys, &any.Any{ TypeUrl: typeURL, Value: data, }) @@ -36,8 +36,8 @@ func createResponse(typeURL string, version, nonce string, resources []proto.Mes return resp, nil } -func makeAddress(ip string, port int) envoycore.Address { - return envoycore.Address{ +func makeAddress(ip string, port int) *envoycore.Address { + return &envoycore.Address{ Address: &envoycore.Address_SocketAddress{ SocketAddress: &envoycore.SocketAddress{ Address: ip, @@ -49,15 +49,10 @@ func makeAddress(ip string, port int) envoycore.Address { } } -func makeAddressPtr(ip string, port int) *envoycore.Address { - a := makeAddress(ip, port) - return &a +func makeUint32Value(n int) *wrappers.UInt32Value { + return &wrappers.UInt32Value{Value: uint32(n)} } -func makeUint32Value(n int) *prototypes.UInt32Value { - return &prototypes.UInt32Value{Value: uint32(n)} -} - -func makeBoolValue(n bool) *prototypes.BoolValue { - return &prototypes.BoolValue{Value: n} +func makeBoolValue(n bool) *wrappers.BoolValue { + return &wrappers.BoolValue{Value: n} } diff --git a/agent/xds/routes.go b/agent/xds/routes.go index db92dd6691..bb7c3ddd9a 100644 --- a/agent/xds/routes.go +++ b/agent/xds/routes.go @@ -6,10 +6,10 @@ import ( "net" "strings" - "github.com/gogo/protobuf/proto" - envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" envoyroute "github.com/envoyproxy/go-control-plane/envoy/api/v2/route" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" "github.com/hashicorp/consul/agent/proxycfg" "github.com/hashicorp/consul/agent/structs" ) @@ -57,7 +57,7 @@ func routesFromSnapshotConnectProxy(cfgSnap *proxycfg.ConfigSnapshot) ([]proto.M route := &envoy.RouteConfiguration{ Name: upstreamID, - VirtualHosts: []envoyroute.VirtualHost{virtualHost}, + VirtualHosts: []*envoyroute.VirtualHost{virtualHost}, // ValidateClusters defaults to true when defined statically and false // when done via RDS. Re-set the sane value of true to prevent // null-routing traffic. @@ -163,8 +163,8 @@ func makeUpstreamRouteForDiscoveryChain( routeName string, chain *structs.CompiledDiscoveryChain, serviceDomains []string, -) (envoyroute.VirtualHost, error) { - var routes []envoyroute.Route +) (*envoyroute.VirtualHost, error) { + var routes []*envoyroute.Route startNode := chain.Nodes[chain.StartNode] if startNode == nil { @@ -173,7 +173,7 @@ func makeUpstreamRouteForDiscoveryChain( switch startNode.Type { case structs.DiscoveryGraphNodeTypeRouter: - routes = make([]envoyroute.Route, 0, len(startNode.Routes)) + routes = make([]*envoyroute.Route, 0, len(startNode.Routes)) for _, discoveryRoute := range startNode.Routes { routeMatch := makeRouteMatchForDiscoveryRoute(discoveryRoute, chain.Protocol) @@ -188,14 +188,14 @@ func makeUpstreamRouteForDiscoveryChain( case structs.DiscoveryGraphNodeTypeSplitter: routeAction, err = makeRouteActionForSplitter(nextNode.Splits, chain) if err != nil { - return envoyroute.VirtualHost{}, err + return nil, err } case structs.DiscoveryGraphNodeTypeResolver: routeAction = makeRouteActionForSingleCluster(nextNode.Resolver.Target, chain) default: - return envoyroute.VirtualHost{}, fmt.Errorf("unexpected graph node after route %q", nextNode.Type) + return nil, fmt.Errorf("unexpected graph node after route %q", nextNode.Type) } // TODO(rb): Better help handle the envoy case where you need (prefix=/foo/,rewrite=/) and (exact=/foo,rewrite=/) to do a full rewrite @@ -207,7 +207,7 @@ func makeUpstreamRouteForDiscoveryChain( } if destination.RequestTimeout > 0 { - routeAction.Route.Timeout = &destination.RequestTimeout + routeAction.Route.Timeout = ptypes.DurationProto(destination.RequestTimeout) } if destination.HasRetryFeatures() { @@ -233,7 +233,7 @@ func makeUpstreamRouteForDiscoveryChain( } } - routes = append(routes, envoyroute.Route{ + routes = append(routes, &envoyroute.Route{ Match: routeMatch, Action: routeAction, }) @@ -242,31 +242,31 @@ func makeUpstreamRouteForDiscoveryChain( case structs.DiscoveryGraphNodeTypeSplitter: routeAction, err := makeRouteActionForSplitter(startNode.Splits, chain) if err != nil { - return envoyroute.VirtualHost{}, err + return nil, err } - defaultRoute := envoyroute.Route{ + defaultRoute := &envoyroute.Route{ Match: makeDefaultRouteMatch(), Action: routeAction, } - routes = []envoyroute.Route{defaultRoute} + routes = []*envoyroute.Route{defaultRoute} case structs.DiscoveryGraphNodeTypeResolver: routeAction := makeRouteActionForSingleCluster(startNode.Resolver.Target, chain) - defaultRoute := envoyroute.Route{ + defaultRoute := &envoyroute.Route{ Match: makeDefaultRouteMatch(), Action: routeAction, } - routes = []envoyroute.Route{defaultRoute} + routes = []*envoyroute.Route{defaultRoute} default: panic("unknown first node in discovery chain of type: " + startNode.Type) } - host := envoyroute.VirtualHost{ + host := &envoyroute.VirtualHost{ Name: routeName, Domains: serviceDomains, Routes: routes, @@ -275,13 +275,13 @@ func makeUpstreamRouteForDiscoveryChain( return host, nil } -func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute, protocol string) envoyroute.RouteMatch { +func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute, protocol string) *envoyroute.RouteMatch { match := discoveryRoute.Definition.Match if match == nil || match.IsEmpty() { return makeDefaultRouteMatch() } - em := envoyroute.RouteMatch{} + em := &envoyroute.RouteMatch{} switch { case match.HTTP.PathExact != "": @@ -380,8 +380,8 @@ func makeRouteMatchForDiscoveryRoute(discoveryRoute *structs.DiscoveryRoute, pro return em } -func makeDefaultRouteMatch() envoyroute.RouteMatch { - return envoyroute.RouteMatch{ +func makeDefaultRouteMatch() *envoyroute.RouteMatch { + return &envoyroute.RouteMatch{ PathSpecifier: &envoyroute.RouteMatch_Prefix{ Prefix: "/", }, diff --git a/agent/xds/server.go b/agent/xds/server.go index 38ae4bc4f7..2dd76fb912 100644 --- a/agent/xds/server.go +++ b/agent/xds/server.go @@ -7,18 +7,11 @@ import ( "sync/atomic" "time" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - envoy "github.com/envoyproxy/go-control-plane/envoy/api/v2" envoyauthz "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2" envoyauthzalpha "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha" envoydisco "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2" - "github.com/gogo/googleapis/google/rpc" - "github.com/gogo/protobuf/proto" + "github.com/golang/protobuf/proto" "github.com/hashicorp/consul/acl" "github.com/hashicorp/consul/agent/cache" "github.com/hashicorp/consul/agent/connect" @@ -27,6 +20,12 @@ import ( "github.com/hashicorp/consul/logging" "github.com/hashicorp/consul/tlsutil" "github.com/hashicorp/go-hclog" + rpcstatus "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" ) // ADSStream is a shorter way of referring to this thing... @@ -463,8 +462,8 @@ func (s *Server) DeltaAggregatedResources(_ envoydisco.AggregatedDiscoveryServic func deniedResponse(reason string) (*envoyauthz.CheckResponse, error) { return &envoyauthz.CheckResponse{ - Status: &rpc.Status{ - Code: int32(rpc.PERMISSION_DENIED), + Status: &rpcstatus.Status{ + Code: int32(codes.PermissionDenied), Message: "Denied: " + reason, }, }, nil @@ -536,8 +535,8 @@ func (s *Server) Check(ctx context.Context, r *envoyauthz.CheckRequest) (*envoya s.Logger.Debug("Connect AuthZ ALLOWED", "source", r.Attributes.Source.Principal, "destination", r.Attributes.Destination.Principal, "reason", reason) return &envoyauthz.CheckResponse{ - Status: &rpc.Status{ - Code: int32(rpc.OK), + Status: &rpcstatus.Status{ + Code: int32(codes.OK), Message: "ALLOWED: " + reason, }, }, nil diff --git a/agent/xds/testing.go b/agent/xds/testing.go index 9cd8738d64..1363b90846 100644 --- a/agent/xds/testing.go +++ b/agent/xds/testing.go @@ -171,7 +171,7 @@ func makeAttributeContextPeer(t testing.T, svc string) *envoyauth.AttributeConte spiffeID := connect.TestSpiffeIDService(t, svc) return &envoyauth.AttributeContext_Peer{ // We don't care about IP for now might later though - Address: makeAddressPtr("10.0.0.1", 1234), + Address: makeAddress("10.0.0.1", 1234), // Note we don't set Service since that is an advisory only mechanism in // Envoy triggered by self-declared headers. We rely on the actual TLS Peer // identity. diff --git a/go.mod b/go.mod index 3cdc2381fc..10ce1c1bd6 100644 --- a/go.mod +++ b/go.mod @@ -21,11 +21,10 @@ require ( github.com/digitalocean/godo v1.10.0 // indirect github.com/docker/go-connections v0.3.0 github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0 - github.com/envoyproxy/go-control-plane v0.8.0 + github.com/envoyproxy/go-control-plane v0.9.5 github.com/go-ole/go-ole v1.2.1 // indirect - github.com/gogo/googleapis v1.1.0 github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d - github.com/golang/protobuf v1.3.1 + github.com/golang/protobuf v1.3.2 github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.0.0 github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2 @@ -89,8 +88,8 @@ require ( golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 google.golang.org/api v0.7.0 // indirect google.golang.org/appengine v1.6.0 // indirect - google.golang.org/genproto v0.0.0-20190530194941-fb225487d101 // indirect - google.golang.org/grpc v1.23.0 + google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 + google.golang.org/grpc v1.25.1 gopkg.in/square/go-jose.v2 v2.4.1 k8s.io/api v0.16.9 k8s.io/apimachinery v0.16.9 diff --git a/go.sum b/go.sum index 3c05cf4c99..02362b2835 100644 --- a/go.sum +++ b/go.sum @@ -68,12 +68,16 @@ github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20200313221541-5f7e5dd04533 h1:8wZizuKuZVu5COB7EsBYxBQz8nRcXXn5d4Gt91eJLvU= +github.com/cncf/udpa/go v0.0.0-20200313221541-5f7e5dd04533/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coredns/coredns v1.1.2 h1:bAFHrSsBeTeRG5W3Nf2su3lUGw7Npw2UKeCJm/3A638= github.com/coredns/coredns v1.1.2/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= @@ -110,10 +114,11 @@ github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0 h1:ZoRg github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.8.0 h1:uE6Fp4fOcAJdc1wTQXLJ+SYistkbG1dNoi6Zs1+Ybvk= -github.com/envoyproxy/go-control-plane v0.8.0/go.mod h1:GSSbY9P1neVhdY7G4wu+IK1rk/dqhiCC/4ExuWJZVuk= -github.com/envoyproxy/protoc-gen-validate v0.0.14 h1:YBW6/cKy9prEGRYLnaGa4IDhzxZhRCtKsax8srGKDnM= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.5 h1:lRJIqDD8yjV1YyPRqecMdytjDLs2fTXq363aCib5xPU= +github.com/envoyproxy/go-control-plane v0.9.5/go.mod h1:OXl5to++W0ctG+EHWTFUjiypVxC/Y4VLc/KFU+al13s= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= @@ -139,8 +144,6 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= @@ -155,6 +158,8 @@ github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= 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= @@ -277,7 +282,6 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/istio/gogo-genproto v0.0.0-20190124151557-6d926a6e6feb/go.mod h1:mvv8vRzGSduueppJLi6LhwN+hLFo0GeXquj6ixCv5xk= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.3.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da h1:FjHUJJ7oBW4G/9j1KzlHaXL09LyMVM9rupS39lncbXk= @@ -405,6 +409,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -554,7 +560,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190508220229-2d0786266e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -604,16 +609,17 @@ google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101 h1:wuGevabY6r+ivPNagjUXGGxF+GqgMd+dBhjsxW4q9u4= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS b/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS new file mode 100644 index 0000000000..e068e731ea --- /dev/null +++ b/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS @@ -0,0 +1 @@ +Google Inc. \ No newline at end of file diff --git a/vendor/github.com/gogo/googleapis/LICENSE b/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE similarity index 99% rename from vendor/github.com/gogo/googleapis/LICENSE rename to vendor/github.com/census-instrumentation/opencensus-proto/LICENSE index d6f85b1817..d645695673 100644 --- a/vendor/github.com/gogo/googleapis/LICENSE +++ b/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE @@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ Apache License 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 "{}" + 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 @@ -186,8 +187,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2015, Google Inc - Copyright 2018, GoGo Authors + 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. @@ -200,4 +200,3 @@ Apache License WITHOUT 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/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go new file mode 100644 index 0000000000..5dba6a2a0a --- /dev/null +++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opencensus/proto/resource/v1/resource.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +// Resource information. +type Resource struct { + // Type identifier for the resource. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Set of labels that describe the resource. + Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { + return fileDescriptor_584700775a2fc762, []int{0} +} + +func (m *Resource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Resource.Unmarshal(m, b) +} +func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Resource.Marshal(b, m, deterministic) +} +func (m *Resource) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resource.Merge(m, src) +} +func (m *Resource) XXX_Size() int { + return xxx_messageInfo_Resource.Size(m) +} +func (m *Resource) XXX_DiscardUnknown() { + xxx_messageInfo_Resource.DiscardUnknown(m) +} + +var xxx_messageInfo_Resource proto.InternalMessageInfo + +func (m *Resource) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Resource) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func init() { + proto.RegisterType((*Resource)(nil), "opencensus.proto.resource.v1.Resource") + proto.RegisterMapType((map[string]string)(nil), "opencensus.proto.resource.v1.Resource.LabelsEntry") +} + +func init() { + proto.RegisterFile("opencensus/proto/resource/v1/resource.proto", fileDescriptor_584700775a2fc762) +} + +var fileDescriptor_584700775a2fc762 = []byte{ + // 251 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xce, 0x2f, 0x48, 0xcd, + 0x4b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x4a, 0x2d, + 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2f, 0x33, 0x84, 0xb3, 0xf5, 0xc0, 0x52, 0x42, 0x32, 0x08, + 0xc5, 0x10, 0x11, 0x3d, 0xb8, 0x82, 0x32, 0x43, 0xa5, 0xa5, 0x8c, 0x5c, 0x1c, 0x41, 0x50, 0xbe, + 0x90, 0x10, 0x17, 0x4b, 0x49, 0x65, 0x41, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, + 0x2d, 0xe4, 0xc5, 0xc5, 0x96, 0x93, 0x98, 0x94, 0x9a, 0x53, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, + 0x6d, 0x64, 0xa4, 0x87, 0xcf, 0x3c, 0x3d, 0x98, 0x59, 0x7a, 0x3e, 0x60, 0x4d, 0xae, 0x79, 0x25, + 0x45, 0x95, 0x41, 0x50, 0x13, 0xa4, 0x2c, 0xb9, 0xb8, 0x91, 0x84, 0x85, 0x04, 0xb8, 0x98, 0xb3, + 0x53, 0x2b, 0xa1, 0xb6, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, + 0x4c, 0x60, 0x31, 0x08, 0xc7, 0x8a, 0xc9, 0x82, 0xd1, 0x69, 0x06, 0x23, 0x97, 0x7c, 0x66, 0x3e, + 0x5e, 0xbb, 0x9d, 0x78, 0x61, 0x96, 0x07, 0x80, 0xa4, 0x02, 0x18, 0xa3, 0x5c, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x21, 0xba, 0x74, 0x33, 0xf3, 0x8a, 0x4b, 0x8a, + 0x4a, 0x73, 0x53, 0xf3, 0x4a, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0xf4, 0x11, 0x06, 0xea, 0x42, 0x42, + 0x32, 0x3d, 0x35, 0x4f, 0x37, 0x1d, 0x25, 0x40, 0x5f, 0x31, 0xc9, 0xf8, 0x17, 0xa4, 0xe6, 0x39, + 0x43, 0xac, 0x05, 0x9b, 0x8d, 0xf0, 0x66, 0x98, 0x61, 0x12, 0x1b, 0x58, 0xa3, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0xcf, 0x32, 0xff, 0x46, 0x96, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go new file mode 100644 index 0000000000..2f4ab19b5e --- /dev/null +++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go @@ -0,0 +1,1553 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opencensus/proto/trace/v1/trace.proto + +package v1 + +import ( + fmt "fmt" + v1 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1" + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +// Type of span. Can be used to specify additional relationships between spans +// in addition to a parent/child relationship. +type Span_SpanKind int32 + +const ( + // Unspecified. + Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0 + // Indicates that the span covers server-side handling of an RPC or other + // remote network request. + Span_SERVER Span_SpanKind = 1 + // Indicates that the span covers the client-side wrapper around an RPC or + // other remote request. + Span_CLIENT Span_SpanKind = 2 +) + +var Span_SpanKind_name = map[int32]string{ + 0: "SPAN_KIND_UNSPECIFIED", + 1: "SERVER", + 2: "CLIENT", +} + +var Span_SpanKind_value = map[string]int32{ + "SPAN_KIND_UNSPECIFIED": 0, + "SERVER": 1, + "CLIENT": 2, +} + +func (x Span_SpanKind) String() string { + return proto.EnumName(Span_SpanKind_name, int32(x)) +} + +func (Span_SpanKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 0} +} + +// Indicates whether the message was sent or received. +type Span_TimeEvent_MessageEvent_Type int32 + +const ( + // Unknown event type. + Span_TimeEvent_MessageEvent_TYPE_UNSPECIFIED Span_TimeEvent_MessageEvent_Type = 0 + // Indicates a sent message. + Span_TimeEvent_MessageEvent_SENT Span_TimeEvent_MessageEvent_Type = 1 + // Indicates a received message. + Span_TimeEvent_MessageEvent_RECEIVED Span_TimeEvent_MessageEvent_Type = 2 +) + +var Span_TimeEvent_MessageEvent_Type_name = map[int32]string{ + 0: "TYPE_UNSPECIFIED", + 1: "SENT", + 2: "RECEIVED", +} + +var Span_TimeEvent_MessageEvent_Type_value = map[string]int32{ + "TYPE_UNSPECIFIED": 0, + "SENT": 1, + "RECEIVED": 2, +} + +func (x Span_TimeEvent_MessageEvent_Type) String() string { + return proto.EnumName(Span_TimeEvent_MessageEvent_Type_name, int32(x)) +} + +func (Span_TimeEvent_MessageEvent_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 2, 1, 0} +} + +// The relationship of the current span relative to the linked span: child, +// parent, or unspecified. +type Span_Link_Type int32 + +const ( + // The relationship of the two spans is unknown, or known but other + // than parent-child. + Span_Link_TYPE_UNSPECIFIED Span_Link_Type = 0 + // The linked span is a child of the current span. + Span_Link_CHILD_LINKED_SPAN Span_Link_Type = 1 + // The linked span is a parent of the current span. + Span_Link_PARENT_LINKED_SPAN Span_Link_Type = 2 +) + +var Span_Link_Type_name = map[int32]string{ + 0: "TYPE_UNSPECIFIED", + 1: "CHILD_LINKED_SPAN", + 2: "PARENT_LINKED_SPAN", +} + +var Span_Link_Type_value = map[string]int32{ + "TYPE_UNSPECIFIED": 0, + "CHILD_LINKED_SPAN": 1, + "PARENT_LINKED_SPAN": 2, +} + +func (x Span_Link_Type) String() string { + return proto.EnumName(Span_Link_Type_name, int32(x)) +} + +func (Span_Link_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 4, 0} +} + +// A span represents a single operation within a trace. Spans can be +// nested to form a trace tree. Spans may also be linked to other spans +// from the same or different trace. And form graphs. Often, a trace +// contains a root span that describes the end-to-end latency, and one +// or more subspans for its sub-operations. A trace can also contain +// multiple root spans, or none at all. Spans do not need to be +// contiguous - there may be gaps or overlaps between spans in a trace. +// +// The next id is 17. +// TODO(bdrutu): Add an example. +type Span struct { + // A unique identifier for a trace. All spans from the same trace share + // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes + // is considered invalid. + // + // This field is semantically required. Receiver should generate new + // random trace_id if empty or invalid trace_id was received. + // + // This field is required. + TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // A unique identifier for a span within a trace, assigned when the span + // is created. The ID is an 8-byte array. An ID with all zeroes is considered + // invalid. + // + // This field is semantically required. Receiver should generate new + // random span_id if empty or invalid span_id was received. + // + // This field is required. + SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + // The Tracestate on the span. + Tracestate *Span_Tracestate `protobuf:"bytes,15,opt,name=tracestate,proto3" json:"tracestate,omitempty"` + // The `span_id` of this span's parent span. If this is a root span, then this + // field must be empty. The ID is an 8-byte array. + ParentSpanId []byte `protobuf:"bytes,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"` + // A description of the span's operation. + // + // For example, the name can be a qualified method name or a file name + // and a line number where the operation is called. A best practice is to use + // the same display name at the same call point in an application. + // This makes it easier to correlate spans in different traces. + // + // This field is semantically required to be set to non-empty string. + // When null or empty string received - receiver may use string "name" + // as a replacement. There might be smarted algorithms implemented by + // receiver to fix the empty span name. + // + // This field is required. + Name *TruncatableString `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // Distinguishes between spans generated in a particular context. For example, + // two spans with the same name may be distinguished using `CLIENT` (caller) + // and `SERVER` (callee) to identify queueing latency associated with the span. + Kind Span_SpanKind `protobuf:"varint,14,opt,name=kind,proto3,enum=opencensus.proto.trace.v1.Span_SpanKind" json:"kind,omitempty"` + // The start time of the span. On the client side, this is the time kept by + // the local machine where the span execution starts. On the server side, this + // is the time when the server's application handler starts running. + // + // This field is semantically required. When not set on receive - + // receiver should set it to the value of end_time field if it was + // set. Or to the current time if neither was set. It is important to + // keep end_time > start_time for consistency. + // + // This field is required. + StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The end time of the span. On the client side, this is the time kept by + // the local machine where the span execution ends. On the server side, this + // is the time when the server application handler stops running. + // + // This field is semantically required. When not set on receive - + // receiver should set it to start_time value. It is important to + // keep end_time > start_time for consistency. + // + // This field is required. + EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // A set of attributes on the span. + Attributes *Span_Attributes `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"` + // A stack trace captured at the start of the span. + StackTrace *StackTrace `protobuf:"bytes,8,opt,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"` + // The included time events. + TimeEvents *Span_TimeEvents `protobuf:"bytes,9,opt,name=time_events,json=timeEvents,proto3" json:"time_events,omitempty"` + // The included links. + Links *Span_Links `protobuf:"bytes,10,opt,name=links,proto3" json:"links,omitempty"` + // An optional final status for this span. Semantically when Status + // wasn't set it is means span ended without errors and assume + // Status.Ok (code = 0). + Status *Status `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` + // An optional resource that is associated with this span. If not set, this span + // should be part of a batch that does include the resource information, unless resource + // information is unknown. + Resource *v1.Resource `protobuf:"bytes,16,opt,name=resource,proto3" json:"resource,omitempty"` + // A highly recommended but not required flag that identifies when a + // trace crosses a process boundary. True when the parent_span belongs + // to the same process as the current span. This flag is most commonly + // used to indicate the need to adjust time as clocks in different + // processes may not be synchronized. + SameProcessAsParentSpan *wrappers.BoolValue `protobuf:"bytes,12,opt,name=same_process_as_parent_span,json=sameProcessAsParentSpan,proto3" json:"same_process_as_parent_span,omitempty"` + // An optional number of child spans that were generated while this span + // was active. If set, allows an implementation to detect missing child spans. + ChildSpanCount *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span) Reset() { *m = Span{} } +func (m *Span) String() string { return proto.CompactTextString(m) } +func (*Span) ProtoMessage() {} +func (*Span) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0} +} + +func (m *Span) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span.Unmarshal(m, b) +} +func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span.Marshal(b, m, deterministic) +} +func (m *Span) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span.Merge(m, src) +} +func (m *Span) XXX_Size() int { + return xxx_messageInfo_Span.Size(m) +} +func (m *Span) XXX_DiscardUnknown() { + xxx_messageInfo_Span.DiscardUnknown(m) +} + +var xxx_messageInfo_Span proto.InternalMessageInfo + +func (m *Span) GetTraceId() []byte { + if m != nil { + return m.TraceId + } + return nil +} + +func (m *Span) GetSpanId() []byte { + if m != nil { + return m.SpanId + } + return nil +} + +func (m *Span) GetTracestate() *Span_Tracestate { + if m != nil { + return m.Tracestate + } + return nil +} + +func (m *Span) GetParentSpanId() []byte { + if m != nil { + return m.ParentSpanId + } + return nil +} + +func (m *Span) GetName() *TruncatableString { + if m != nil { + return m.Name + } + return nil +} + +func (m *Span) GetKind() Span_SpanKind { + if m != nil { + return m.Kind + } + return Span_SPAN_KIND_UNSPECIFIED +} + +func (m *Span) GetStartTime() *timestamp.Timestamp { + if m != nil { + return m.StartTime + } + return nil +} + +func (m *Span) GetEndTime() *timestamp.Timestamp { + if m != nil { + return m.EndTime + } + return nil +} + +func (m *Span) GetAttributes() *Span_Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Span) GetStackTrace() *StackTrace { + if m != nil { + return m.StackTrace + } + return nil +} + +func (m *Span) GetTimeEvents() *Span_TimeEvents { + if m != nil { + return m.TimeEvents + } + return nil +} + +func (m *Span) GetLinks() *Span_Links { + if m != nil { + return m.Links + } + return nil +} + +func (m *Span) GetStatus() *Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *Span) GetResource() *v1.Resource { + if m != nil { + return m.Resource + } + return nil +} + +func (m *Span) GetSameProcessAsParentSpan() *wrappers.BoolValue { + if m != nil { + return m.SameProcessAsParentSpan + } + return nil +} + +func (m *Span) GetChildSpanCount() *wrappers.UInt32Value { + if m != nil { + return m.ChildSpanCount + } + return nil +} + +// This field conveys information about request position in multiple distributed tracing graphs. +// It is a list of Tracestate.Entry with a maximum of 32 members in the list. +// +// See the https://github.com/w3c/distributed-tracing for more details about this field. +type Span_Tracestate struct { + // A list of entries that represent the Tracestate. + Entries []*Span_Tracestate_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Tracestate) Reset() { *m = Span_Tracestate{} } +func (m *Span_Tracestate) String() string { return proto.CompactTextString(m) } +func (*Span_Tracestate) ProtoMessage() {} +func (*Span_Tracestate) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 0} +} + +func (m *Span_Tracestate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Tracestate.Unmarshal(m, b) +} +func (m *Span_Tracestate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Tracestate.Marshal(b, m, deterministic) +} +func (m *Span_Tracestate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Tracestate.Merge(m, src) +} +func (m *Span_Tracestate) XXX_Size() int { + return xxx_messageInfo_Span_Tracestate.Size(m) +} +func (m *Span_Tracestate) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Tracestate.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Tracestate proto.InternalMessageInfo + +func (m *Span_Tracestate) GetEntries() []*Span_Tracestate_Entry { + if m != nil { + return m.Entries + } + return nil +} + +type Span_Tracestate_Entry struct { + // The key must begin with a lowercase letter, and can only contain + // lowercase letters 'a'-'z', digits '0'-'9', underscores '_', dashes + // '-', asterisks '*', and forward slashes '/'. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The value is opaque string up to 256 characters printable ASCII + // RFC0020 characters (i.e., the range 0x20 to 0x7E) except ',' and '='. + // Note that this also excludes tabs, newlines, carriage returns, etc. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Tracestate_Entry) Reset() { *m = Span_Tracestate_Entry{} } +func (m *Span_Tracestate_Entry) String() string { return proto.CompactTextString(m) } +func (*Span_Tracestate_Entry) ProtoMessage() {} +func (*Span_Tracestate_Entry) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 0, 0} +} + +func (m *Span_Tracestate_Entry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Tracestate_Entry.Unmarshal(m, b) +} +func (m *Span_Tracestate_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Tracestate_Entry.Marshal(b, m, deterministic) +} +func (m *Span_Tracestate_Entry) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Tracestate_Entry.Merge(m, src) +} +func (m *Span_Tracestate_Entry) XXX_Size() int { + return xxx_messageInfo_Span_Tracestate_Entry.Size(m) +} +func (m *Span_Tracestate_Entry) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Tracestate_Entry.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Tracestate_Entry proto.InternalMessageInfo + +func (m *Span_Tracestate_Entry) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Span_Tracestate_Entry) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// A set of attributes, each with a key and a value. +type Span_Attributes struct { + // The set of attributes. The value can be a string, an integer, a double + // or the Boolean values `true` or `false`. Note, global attributes like + // server name can be set as tags using resource API. Examples of attributes: + // + // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + // "/http/server_latency": 300 + // "abc.com/myattribute": true + // "abc.com/score": 10.239 + AttributeMap map[string]*AttributeValue `protobuf:"bytes,1,rep,name=attribute_map,json=attributeMap,proto3" json:"attribute_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The number of attributes that were discarded. Attributes can be discarded + // because their keys are too long or because there are too many attributes. + // If this value is 0, then no attributes were dropped. + DroppedAttributesCount int32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Attributes) Reset() { *m = Span_Attributes{} } +func (m *Span_Attributes) String() string { return proto.CompactTextString(m) } +func (*Span_Attributes) ProtoMessage() {} +func (*Span_Attributes) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 1} +} + +func (m *Span_Attributes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Attributes.Unmarshal(m, b) +} +func (m *Span_Attributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Attributes.Marshal(b, m, deterministic) +} +func (m *Span_Attributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Attributes.Merge(m, src) +} +func (m *Span_Attributes) XXX_Size() int { + return xxx_messageInfo_Span_Attributes.Size(m) +} +func (m *Span_Attributes) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Attributes.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Attributes proto.InternalMessageInfo + +func (m *Span_Attributes) GetAttributeMap() map[string]*AttributeValue { + if m != nil { + return m.AttributeMap + } + return nil +} + +func (m *Span_Attributes) GetDroppedAttributesCount() int32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +// A time-stamped annotation or message event in the Span. +type Span_TimeEvent struct { + // The time the event occurred. + Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + // A `TimeEvent` can contain either an `Annotation` object or a + // `MessageEvent` object, but not both. + // + // Types that are valid to be assigned to Value: + // *Span_TimeEvent_Annotation_ + // *Span_TimeEvent_MessageEvent_ + Value isSpan_TimeEvent_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_TimeEvent) Reset() { *m = Span_TimeEvent{} } +func (m *Span_TimeEvent) String() string { return proto.CompactTextString(m) } +func (*Span_TimeEvent) ProtoMessage() {} +func (*Span_TimeEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 2} +} + +func (m *Span_TimeEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_TimeEvent.Unmarshal(m, b) +} +func (m *Span_TimeEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_TimeEvent.Marshal(b, m, deterministic) +} +func (m *Span_TimeEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_TimeEvent.Merge(m, src) +} +func (m *Span_TimeEvent) XXX_Size() int { + return xxx_messageInfo_Span_TimeEvent.Size(m) +} +func (m *Span_TimeEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Span_TimeEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_TimeEvent proto.InternalMessageInfo + +func (m *Span_TimeEvent) GetTime() *timestamp.Timestamp { + if m != nil { + return m.Time + } + return nil +} + +type isSpan_TimeEvent_Value interface { + isSpan_TimeEvent_Value() +} + +type Span_TimeEvent_Annotation_ struct { + Annotation *Span_TimeEvent_Annotation `protobuf:"bytes,2,opt,name=annotation,proto3,oneof"` +} + +type Span_TimeEvent_MessageEvent_ struct { + MessageEvent *Span_TimeEvent_MessageEvent `protobuf:"bytes,3,opt,name=message_event,json=messageEvent,proto3,oneof"` +} + +func (*Span_TimeEvent_Annotation_) isSpan_TimeEvent_Value() {} + +func (*Span_TimeEvent_MessageEvent_) isSpan_TimeEvent_Value() {} + +func (m *Span_TimeEvent) GetValue() isSpan_TimeEvent_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *Span_TimeEvent) GetAnnotation() *Span_TimeEvent_Annotation { + if x, ok := m.GetValue().(*Span_TimeEvent_Annotation_); ok { + return x.Annotation + } + return nil +} + +func (m *Span_TimeEvent) GetMessageEvent() *Span_TimeEvent_MessageEvent { + if x, ok := m.GetValue().(*Span_TimeEvent_MessageEvent_); ok { + return x.MessageEvent + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Span_TimeEvent) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Span_TimeEvent_Annotation_)(nil), + (*Span_TimeEvent_MessageEvent_)(nil), + } +} + +// A text annotation with a set of attributes. +type Span_TimeEvent_Annotation struct { + // A user-supplied message describing the event. + Description *TruncatableString `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // A set of attributes on the annotation. + Attributes *Span_Attributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_TimeEvent_Annotation) Reset() { *m = Span_TimeEvent_Annotation{} } +func (m *Span_TimeEvent_Annotation) String() string { return proto.CompactTextString(m) } +func (*Span_TimeEvent_Annotation) ProtoMessage() {} +func (*Span_TimeEvent_Annotation) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 2, 0} +} + +func (m *Span_TimeEvent_Annotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_TimeEvent_Annotation.Unmarshal(m, b) +} +func (m *Span_TimeEvent_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_TimeEvent_Annotation.Marshal(b, m, deterministic) +} +func (m *Span_TimeEvent_Annotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_TimeEvent_Annotation.Merge(m, src) +} +func (m *Span_TimeEvent_Annotation) XXX_Size() int { + return xxx_messageInfo_Span_TimeEvent_Annotation.Size(m) +} +func (m *Span_TimeEvent_Annotation) XXX_DiscardUnknown() { + xxx_messageInfo_Span_TimeEvent_Annotation.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_TimeEvent_Annotation proto.InternalMessageInfo + +func (m *Span_TimeEvent_Annotation) GetDescription() *TruncatableString { + if m != nil { + return m.Description + } + return nil +} + +func (m *Span_TimeEvent_Annotation) GetAttributes() *Span_Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// An event describing a message sent/received between Spans. +type Span_TimeEvent_MessageEvent struct { + // The type of MessageEvent. Indicates whether the message was sent or + // received. + Type Span_TimeEvent_MessageEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=opencensus.proto.trace.v1.Span_TimeEvent_MessageEvent_Type" json:"type,omitempty"` + // An identifier for the MessageEvent's message that can be used to match + // SENT and RECEIVED MessageEvents. For example, this field could + // represent a sequence ID for a streaming RPC. It is recommended to be + // unique within a Span. + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // The number of uncompressed bytes sent or received. + UncompressedSize uint64 `protobuf:"varint,3,opt,name=uncompressed_size,json=uncompressedSize,proto3" json:"uncompressed_size,omitempty"` + // The number of compressed bytes sent or received. If zero, assumed to + // be the same size as uncompressed. + CompressedSize uint64 `protobuf:"varint,4,opt,name=compressed_size,json=compressedSize,proto3" json:"compressed_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_TimeEvent_MessageEvent) Reset() { *m = Span_TimeEvent_MessageEvent{} } +func (m *Span_TimeEvent_MessageEvent) String() string { return proto.CompactTextString(m) } +func (*Span_TimeEvent_MessageEvent) ProtoMessage() {} +func (*Span_TimeEvent_MessageEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 2, 1} +} + +func (m *Span_TimeEvent_MessageEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_TimeEvent_MessageEvent.Unmarshal(m, b) +} +func (m *Span_TimeEvent_MessageEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_TimeEvent_MessageEvent.Marshal(b, m, deterministic) +} +func (m *Span_TimeEvent_MessageEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_TimeEvent_MessageEvent.Merge(m, src) +} +func (m *Span_TimeEvent_MessageEvent) XXX_Size() int { + return xxx_messageInfo_Span_TimeEvent_MessageEvent.Size(m) +} +func (m *Span_TimeEvent_MessageEvent) XXX_DiscardUnknown() { + xxx_messageInfo_Span_TimeEvent_MessageEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_TimeEvent_MessageEvent proto.InternalMessageInfo + +func (m *Span_TimeEvent_MessageEvent) GetType() Span_TimeEvent_MessageEvent_Type { + if m != nil { + return m.Type + } + return Span_TimeEvent_MessageEvent_TYPE_UNSPECIFIED +} + +func (m *Span_TimeEvent_MessageEvent) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Span_TimeEvent_MessageEvent) GetUncompressedSize() uint64 { + if m != nil { + return m.UncompressedSize + } + return 0 +} + +func (m *Span_TimeEvent_MessageEvent) GetCompressedSize() uint64 { + if m != nil { + return m.CompressedSize + } + return 0 +} + +// A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation +// on the span, consisting of either user-supplied key-value pairs, or +// details of a message sent/received between Spans. +type Span_TimeEvents struct { + // A collection of `TimeEvent`s. + TimeEvent []*Span_TimeEvent `protobuf:"bytes,1,rep,name=time_event,json=timeEvent,proto3" json:"time_event,omitempty"` + // The number of dropped annotations in all the included time events. + // If the value is 0, then no annotations were dropped. + DroppedAnnotationsCount int32 `protobuf:"varint,2,opt,name=dropped_annotations_count,json=droppedAnnotationsCount,proto3" json:"dropped_annotations_count,omitempty"` + // The number of dropped message events in all the included time events. + // If the value is 0, then no message events were dropped. + DroppedMessageEventsCount int32 `protobuf:"varint,3,opt,name=dropped_message_events_count,json=droppedMessageEventsCount,proto3" json:"dropped_message_events_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_TimeEvents) Reset() { *m = Span_TimeEvents{} } +func (m *Span_TimeEvents) String() string { return proto.CompactTextString(m) } +func (*Span_TimeEvents) ProtoMessage() {} +func (*Span_TimeEvents) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 3} +} + +func (m *Span_TimeEvents) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_TimeEvents.Unmarshal(m, b) +} +func (m *Span_TimeEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_TimeEvents.Marshal(b, m, deterministic) +} +func (m *Span_TimeEvents) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_TimeEvents.Merge(m, src) +} +func (m *Span_TimeEvents) XXX_Size() int { + return xxx_messageInfo_Span_TimeEvents.Size(m) +} +func (m *Span_TimeEvents) XXX_DiscardUnknown() { + xxx_messageInfo_Span_TimeEvents.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_TimeEvents proto.InternalMessageInfo + +func (m *Span_TimeEvents) GetTimeEvent() []*Span_TimeEvent { + if m != nil { + return m.TimeEvent + } + return nil +} + +func (m *Span_TimeEvents) GetDroppedAnnotationsCount() int32 { + if m != nil { + return m.DroppedAnnotationsCount + } + return 0 +} + +func (m *Span_TimeEvents) GetDroppedMessageEventsCount() int32 { + if m != nil { + return m.DroppedMessageEventsCount + } + return 0 +} + +// A pointer from the current span to another span in the same trace or in a +// different trace. For example, this can be used in batching operations, +// where a single batch handler processes multiple requests from different +// traces or when the handler receives a request from a different project. +type Span_Link struct { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // A unique identifier for the linked span. The ID is an 8-byte array. + SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + // The relationship of the current span relative to the linked span. + Type Span_Link_Type `protobuf:"varint,3,opt,name=type,proto3,enum=opencensus.proto.trace.v1.Span_Link_Type" json:"type,omitempty"` + // A set of attributes on the link. + Attributes *Span_Attributes `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"` + // The Tracestate associated with the link. + Tracestate *Span_Tracestate `protobuf:"bytes,5,opt,name=tracestate,proto3" json:"tracestate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Link) Reset() { *m = Span_Link{} } +func (m *Span_Link) String() string { return proto.CompactTextString(m) } +func (*Span_Link) ProtoMessage() {} +func (*Span_Link) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 4} +} + +func (m *Span_Link) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Link.Unmarshal(m, b) +} +func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) +} +func (m *Span_Link) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Link.Merge(m, src) +} +func (m *Span_Link) XXX_Size() int { + return xxx_messageInfo_Span_Link.Size(m) +} +func (m *Span_Link) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Link.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Link proto.InternalMessageInfo + +func (m *Span_Link) GetTraceId() []byte { + if m != nil { + return m.TraceId + } + return nil +} + +func (m *Span_Link) GetSpanId() []byte { + if m != nil { + return m.SpanId + } + return nil +} + +func (m *Span_Link) GetType() Span_Link_Type { + if m != nil { + return m.Type + } + return Span_Link_TYPE_UNSPECIFIED +} + +func (m *Span_Link) GetAttributes() *Span_Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Span_Link) GetTracestate() *Span_Tracestate { + if m != nil { + return m.Tracestate + } + return nil +} + +// A collection of links, which are references from this span to a span +// in the same or different trace. +type Span_Links struct { + // A collection of links. + Link []*Span_Link `protobuf:"bytes,1,rep,name=link,proto3" json:"link,omitempty"` + // The number of dropped links after the maximum size was enforced. If + // this value is 0, then no links were dropped. + DroppedLinksCount int32 `protobuf:"varint,2,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span_Links) Reset() { *m = Span_Links{} } +func (m *Span_Links) String() string { return proto.CompactTextString(m) } +func (*Span_Links) ProtoMessage() {} +func (*Span_Links) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{0, 5} +} + +func (m *Span_Links) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span_Links.Unmarshal(m, b) +} +func (m *Span_Links) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span_Links.Marshal(b, m, deterministic) +} +func (m *Span_Links) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span_Links.Merge(m, src) +} +func (m *Span_Links) XXX_Size() int { + return xxx_messageInfo_Span_Links.Size(m) +} +func (m *Span_Links) XXX_DiscardUnknown() { + xxx_messageInfo_Span_Links.DiscardUnknown(m) +} + +var xxx_messageInfo_Span_Links proto.InternalMessageInfo + +func (m *Span_Links) GetLink() []*Span_Link { + if m != nil { + return m.Link + } + return nil +} + +func (m *Span_Links) GetDroppedLinksCount() int32 { + if m != nil { + return m.DroppedLinksCount + } + return 0 +} + +// The `Status` type defines a logical error model that is suitable for different +// programming environments, including REST APIs and RPC APIs. This proto's fields +// are a subset of those of +// [google.rpc.Status](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto), +// which is used by [gRPC](https://github.com/grpc). +type Status struct { + // The status code. This is optional field. It is safe to assume 0 (OK) + // when not set. + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + // A developer-facing error message, which should be in English. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{1} +} + +func (m *Status) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Status.Unmarshal(m, b) +} +func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) +} +func (m *Status) XXX_Merge(src proto.Message) { + xxx_messageInfo_Status.Merge(m, src) +} +func (m *Status) XXX_Size() int { + return xxx_messageInfo_Status.Size(m) +} +func (m *Status) XXX_DiscardUnknown() { + xxx_messageInfo_Status.DiscardUnknown(m) +} + +var xxx_messageInfo_Status proto.InternalMessageInfo + +func (m *Status) GetCode() int32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *Status) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +// The value of an Attribute. +type AttributeValue struct { + // The type of the value. + // + // Types that are valid to be assigned to Value: + // *AttributeValue_StringValue + // *AttributeValue_IntValue + // *AttributeValue_BoolValue + // *AttributeValue_DoubleValue + Value isAttributeValue_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AttributeValue) Reset() { *m = AttributeValue{} } +func (m *AttributeValue) String() string { return proto.CompactTextString(m) } +func (*AttributeValue) ProtoMessage() {} +func (*AttributeValue) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{2} +} + +func (m *AttributeValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AttributeValue.Unmarshal(m, b) +} +func (m *AttributeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AttributeValue.Marshal(b, m, deterministic) +} +func (m *AttributeValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributeValue.Merge(m, src) +} +func (m *AttributeValue) XXX_Size() int { + return xxx_messageInfo_AttributeValue.Size(m) +} +func (m *AttributeValue) XXX_DiscardUnknown() { + xxx_messageInfo_AttributeValue.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributeValue proto.InternalMessageInfo + +type isAttributeValue_Value interface { + isAttributeValue_Value() +} + +type AttributeValue_StringValue struct { + StringValue *TruncatableString `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type AttributeValue_IntValue struct { + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type AttributeValue_BoolValue struct { + BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type AttributeValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +func (*AttributeValue_StringValue) isAttributeValue_Value() {} + +func (*AttributeValue_IntValue) isAttributeValue_Value() {} + +func (*AttributeValue_BoolValue) isAttributeValue_Value() {} + +func (*AttributeValue_DoubleValue) isAttributeValue_Value() {} + +func (m *AttributeValue) GetValue() isAttributeValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *AttributeValue) GetStringValue() *TruncatableString { + if x, ok := m.GetValue().(*AttributeValue_StringValue); ok { + return x.StringValue + } + return nil +} + +func (m *AttributeValue) GetIntValue() int64 { + if x, ok := m.GetValue().(*AttributeValue_IntValue); ok { + return x.IntValue + } + return 0 +} + +func (m *AttributeValue) GetBoolValue() bool { + if x, ok := m.GetValue().(*AttributeValue_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *AttributeValue) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*AttributeValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AttributeValue) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AttributeValue_StringValue)(nil), + (*AttributeValue_IntValue)(nil), + (*AttributeValue_BoolValue)(nil), + (*AttributeValue_DoubleValue)(nil), + } +} + +// The call stack which originated this span. +type StackTrace struct { + // Stack frames in this stack trace. + StackFrames *StackTrace_StackFrames `protobuf:"bytes,1,opt,name=stack_frames,json=stackFrames,proto3" json:"stack_frames,omitempty"` + // The hash ID is used to conserve network bandwidth for duplicate + // stack traces within a single trace. + // + // Often multiple spans will have identical stack traces. + // The first occurrence of a stack trace should contain both + // `stack_frames` and a value in `stack_trace_hash_id`. + // + // Subsequent spans within the same request can refer + // to that stack trace by setting only `stack_trace_hash_id`. + // + // TODO: describe how to deal with the case where stack_trace_hash_id is + // zero because it was not set. + StackTraceHashId uint64 `protobuf:"varint,2,opt,name=stack_trace_hash_id,json=stackTraceHashId,proto3" json:"stack_trace_hash_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StackTrace) Reset() { *m = StackTrace{} } +func (m *StackTrace) String() string { return proto.CompactTextString(m) } +func (*StackTrace) ProtoMessage() {} +func (*StackTrace) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{3} +} + +func (m *StackTrace) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StackTrace.Unmarshal(m, b) +} +func (m *StackTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StackTrace.Marshal(b, m, deterministic) +} +func (m *StackTrace) XXX_Merge(src proto.Message) { + xxx_messageInfo_StackTrace.Merge(m, src) +} +func (m *StackTrace) XXX_Size() int { + return xxx_messageInfo_StackTrace.Size(m) +} +func (m *StackTrace) XXX_DiscardUnknown() { + xxx_messageInfo_StackTrace.DiscardUnknown(m) +} + +var xxx_messageInfo_StackTrace proto.InternalMessageInfo + +func (m *StackTrace) GetStackFrames() *StackTrace_StackFrames { + if m != nil { + return m.StackFrames + } + return nil +} + +func (m *StackTrace) GetStackTraceHashId() uint64 { + if m != nil { + return m.StackTraceHashId + } + return 0 +} + +// A single stack frame in a stack trace. +type StackTrace_StackFrame struct { + // The fully-qualified name that uniquely identifies the function or + // method that is active in this frame. + FunctionName *TruncatableString `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"` + // An un-mangled function name, if `function_name` is + // [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can + // be fully qualified. + OriginalFunctionName *TruncatableString `protobuf:"bytes,2,opt,name=original_function_name,json=originalFunctionName,proto3" json:"original_function_name,omitempty"` + // The name of the source file where the function call appears. + FileName *TruncatableString `protobuf:"bytes,3,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + // The line number in `file_name` where the function call appears. + LineNumber int64 `protobuf:"varint,4,opt,name=line_number,json=lineNumber,proto3" json:"line_number,omitempty"` + // The column number where the function call appears, if available. + // This is important in JavaScript because of its anonymous functions. + ColumnNumber int64 `protobuf:"varint,5,opt,name=column_number,json=columnNumber,proto3" json:"column_number,omitempty"` + // The binary module from where the code was loaded. + LoadModule *Module `protobuf:"bytes,6,opt,name=load_module,json=loadModule,proto3" json:"load_module,omitempty"` + // The version of the deployed source code. + SourceVersion *TruncatableString `protobuf:"bytes,7,opt,name=source_version,json=sourceVersion,proto3" json:"source_version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StackTrace_StackFrame) Reset() { *m = StackTrace_StackFrame{} } +func (m *StackTrace_StackFrame) String() string { return proto.CompactTextString(m) } +func (*StackTrace_StackFrame) ProtoMessage() {} +func (*StackTrace_StackFrame) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{3, 0} +} + +func (m *StackTrace_StackFrame) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StackTrace_StackFrame.Unmarshal(m, b) +} +func (m *StackTrace_StackFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StackTrace_StackFrame.Marshal(b, m, deterministic) +} +func (m *StackTrace_StackFrame) XXX_Merge(src proto.Message) { + xxx_messageInfo_StackTrace_StackFrame.Merge(m, src) +} +func (m *StackTrace_StackFrame) XXX_Size() int { + return xxx_messageInfo_StackTrace_StackFrame.Size(m) +} +func (m *StackTrace_StackFrame) XXX_DiscardUnknown() { + xxx_messageInfo_StackTrace_StackFrame.DiscardUnknown(m) +} + +var xxx_messageInfo_StackTrace_StackFrame proto.InternalMessageInfo + +func (m *StackTrace_StackFrame) GetFunctionName() *TruncatableString { + if m != nil { + return m.FunctionName + } + return nil +} + +func (m *StackTrace_StackFrame) GetOriginalFunctionName() *TruncatableString { + if m != nil { + return m.OriginalFunctionName + } + return nil +} + +func (m *StackTrace_StackFrame) GetFileName() *TruncatableString { + if m != nil { + return m.FileName + } + return nil +} + +func (m *StackTrace_StackFrame) GetLineNumber() int64 { + if m != nil { + return m.LineNumber + } + return 0 +} + +func (m *StackTrace_StackFrame) GetColumnNumber() int64 { + if m != nil { + return m.ColumnNumber + } + return 0 +} + +func (m *StackTrace_StackFrame) GetLoadModule() *Module { + if m != nil { + return m.LoadModule + } + return nil +} + +func (m *StackTrace_StackFrame) GetSourceVersion() *TruncatableString { + if m != nil { + return m.SourceVersion + } + return nil +} + +// A collection of stack frames, which can be truncated. +type StackTrace_StackFrames struct { + // Stack frames in this call stack. + Frame []*StackTrace_StackFrame `protobuf:"bytes,1,rep,name=frame,proto3" json:"frame,omitempty"` + // The number of stack frames that were dropped because there + // were too many stack frames. + // If this value is 0, then no stack frames were dropped. + DroppedFramesCount int32 `protobuf:"varint,2,opt,name=dropped_frames_count,json=droppedFramesCount,proto3" json:"dropped_frames_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StackTrace_StackFrames) Reset() { *m = StackTrace_StackFrames{} } +func (m *StackTrace_StackFrames) String() string { return proto.CompactTextString(m) } +func (*StackTrace_StackFrames) ProtoMessage() {} +func (*StackTrace_StackFrames) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{3, 1} +} + +func (m *StackTrace_StackFrames) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StackTrace_StackFrames.Unmarshal(m, b) +} +func (m *StackTrace_StackFrames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StackTrace_StackFrames.Marshal(b, m, deterministic) +} +func (m *StackTrace_StackFrames) XXX_Merge(src proto.Message) { + xxx_messageInfo_StackTrace_StackFrames.Merge(m, src) +} +func (m *StackTrace_StackFrames) XXX_Size() int { + return xxx_messageInfo_StackTrace_StackFrames.Size(m) +} +func (m *StackTrace_StackFrames) XXX_DiscardUnknown() { + xxx_messageInfo_StackTrace_StackFrames.DiscardUnknown(m) +} + +var xxx_messageInfo_StackTrace_StackFrames proto.InternalMessageInfo + +func (m *StackTrace_StackFrames) GetFrame() []*StackTrace_StackFrame { + if m != nil { + return m.Frame + } + return nil +} + +func (m *StackTrace_StackFrames) GetDroppedFramesCount() int32 { + if m != nil { + return m.DroppedFramesCount + } + return 0 +} + +// A description of a binary module. +type Module struct { + // TODO: document the meaning of this field. + // For example: main binary, kernel modules, and dynamic libraries + // such as libc.so, sharedlib.so. + Module *TruncatableString `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` + // A unique identifier for the module, usually a hash of its + // contents. + BuildId *TruncatableString `protobuf:"bytes,2,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Module) Reset() { *m = Module{} } +func (m *Module) String() string { return proto.CompactTextString(m) } +func (*Module) ProtoMessage() {} +func (*Module) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{4} +} + +func (m *Module) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Module.Unmarshal(m, b) +} +func (m *Module) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Module.Marshal(b, m, deterministic) +} +func (m *Module) XXX_Merge(src proto.Message) { + xxx_messageInfo_Module.Merge(m, src) +} +func (m *Module) XXX_Size() int { + return xxx_messageInfo_Module.Size(m) +} +func (m *Module) XXX_DiscardUnknown() { + xxx_messageInfo_Module.DiscardUnknown(m) +} + +var xxx_messageInfo_Module proto.InternalMessageInfo + +func (m *Module) GetModule() *TruncatableString { + if m != nil { + return m.Module + } + return nil +} + +func (m *Module) GetBuildId() *TruncatableString { + if m != nil { + return m.BuildId + } + return nil +} + +// A string that might be shortened to a specified length. +type TruncatableString struct { + // The shortened string. For example, if the original string was 500 bytes long and + // the limit of the string was 128 bytes, then this value contains the first 128 + // bytes of the 500-byte string. Note that truncation always happens on a + // character boundary, to ensure that a truncated string is still valid UTF-8. + // Because it may contain multi-byte characters, the size of the truncated string + // may be less than the truncation limit. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // The number of bytes removed from the original string. If this + // value is 0, then the string was not shortened. + TruncatedByteCount int32 `protobuf:"varint,2,opt,name=truncated_byte_count,json=truncatedByteCount,proto3" json:"truncated_byte_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TruncatableString) Reset() { *m = TruncatableString{} } +func (m *TruncatableString) String() string { return proto.CompactTextString(m) } +func (*TruncatableString) ProtoMessage() {} +func (*TruncatableString) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea38bbb821bf584, []int{5} +} + +func (m *TruncatableString) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TruncatableString.Unmarshal(m, b) +} +func (m *TruncatableString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TruncatableString.Marshal(b, m, deterministic) +} +func (m *TruncatableString) XXX_Merge(src proto.Message) { + xxx_messageInfo_TruncatableString.Merge(m, src) +} +func (m *TruncatableString) XXX_Size() int { + return xxx_messageInfo_TruncatableString.Size(m) +} +func (m *TruncatableString) XXX_DiscardUnknown() { + xxx_messageInfo_TruncatableString.DiscardUnknown(m) +} + +var xxx_messageInfo_TruncatableString proto.InternalMessageInfo + +func (m *TruncatableString) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *TruncatableString) GetTruncatedByteCount() int32 { + if m != nil { + return m.TruncatedByteCount + } + return 0 +} + +func init() { + proto.RegisterEnum("opencensus.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) + proto.RegisterEnum("opencensus.proto.trace.v1.Span_TimeEvent_MessageEvent_Type", Span_TimeEvent_MessageEvent_Type_name, Span_TimeEvent_MessageEvent_Type_value) + proto.RegisterEnum("opencensus.proto.trace.v1.Span_Link_Type", Span_Link_Type_name, Span_Link_Type_value) + proto.RegisterType((*Span)(nil), "opencensus.proto.trace.v1.Span") + proto.RegisterType((*Span_Tracestate)(nil), "opencensus.proto.trace.v1.Span.Tracestate") + proto.RegisterType((*Span_Tracestate_Entry)(nil), "opencensus.proto.trace.v1.Span.Tracestate.Entry") + proto.RegisterType((*Span_Attributes)(nil), "opencensus.proto.trace.v1.Span.Attributes") + proto.RegisterMapType((map[string]*AttributeValue)(nil), "opencensus.proto.trace.v1.Span.Attributes.AttributeMapEntry") + proto.RegisterType((*Span_TimeEvent)(nil), "opencensus.proto.trace.v1.Span.TimeEvent") + proto.RegisterType((*Span_TimeEvent_Annotation)(nil), "opencensus.proto.trace.v1.Span.TimeEvent.Annotation") + proto.RegisterType((*Span_TimeEvent_MessageEvent)(nil), "opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent") + proto.RegisterType((*Span_TimeEvents)(nil), "opencensus.proto.trace.v1.Span.TimeEvents") + proto.RegisterType((*Span_Link)(nil), "opencensus.proto.trace.v1.Span.Link") + proto.RegisterType((*Span_Links)(nil), "opencensus.proto.trace.v1.Span.Links") + proto.RegisterType((*Status)(nil), "opencensus.proto.trace.v1.Status") + proto.RegisterType((*AttributeValue)(nil), "opencensus.proto.trace.v1.AttributeValue") + proto.RegisterType((*StackTrace)(nil), "opencensus.proto.trace.v1.StackTrace") + proto.RegisterType((*StackTrace_StackFrame)(nil), "opencensus.proto.trace.v1.StackTrace.StackFrame") + proto.RegisterType((*StackTrace_StackFrames)(nil), "opencensus.proto.trace.v1.StackTrace.StackFrames") + proto.RegisterType((*Module)(nil), "opencensus.proto.trace.v1.Module") + proto.RegisterType((*TruncatableString)(nil), "opencensus.proto.trace.v1.TruncatableString") +} + +func init() { + proto.RegisterFile("opencensus/proto/trace/v1/trace.proto", fileDescriptor_8ea38bbb821bf584) +} + +var fileDescriptor_8ea38bbb821bf584 = []byte{ + // 1581 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdb, 0x6e, 0x1b, 0x41, + 0x19, 0xce, 0xfa, 0xec, 0xdf, 0x8e, 0xeb, 0x4c, 0xd3, 0x74, 0x63, 0x0a, 0x0d, 0x6e, 0x0b, 0x29, + 0x25, 0x9b, 0x26, 0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 0xa0, 0x2a, 0xa4, 0x4f, 0xc9, 0xb9, 0xc8, 0x1a, + 0x45, 0xcc, 0x87, 0x68, 0x19, 0xb2, 0x67, 0xfc, 0x38, 0x22, 0x5f, 0x14, 0xb1, 0x9c, 0xd4, 0xfe, + 0x92, 0x02, 0x88, 0x3d, 0x13, 0x19, 0xb0, 0x18, 0xf9, 0xa6, 0x3e, 0x31, 0x9c, 0xe0, 0x44, 0xaf, + 0x67, 0x77, 0xee, 0x78, 0xf8, 0xde, 0x70, 0xe4, 0xe9, 0xca, 0x46, 0x62, 0x09, 0x3d, 0x07, 0xd5, + 0x74, 0x6d, 0xc7, 0x21, 0xa6, 0x1e, 0x87, 0x41, 0x70, 0x9b, 0xfc, 0x68, 0x59, 0xbc, 0x12, 0xec, + 0xc7, 0xa4, 0xf2, 0xde, 0x7e, 0x03, 0x4b, 0x97, 0xc8, 0xbf, 0x60, 0xe8, 0xdb, 0xa4, 0xa1, 0xa5, + 0xed, 0x87, 0x57, 0x9c, 0x3d, 0xa2, 0x93, 0x0f, 0x25, 0x71, 0x2f, 0x53, 0xcf, 0x95, 0xda, 0xdf, + 0xb2, 0x50, 0x8c, 0x82, 0x03, 0x69, 0x90, 0x11, 0x39, 0x42, 0xb9, 0x36, 0x47, 0x08, 0x39, 0x74, + 0x04, 0x60, 0x50, 0x6a, 0x33, 0x83, 0x59, 0x36, 0x0d, 0xce, 0xf1, 0x74, 0xe6, 0x58, 0xd4, 0x76, + 0x22, 0x6c, 0x6b, 0x01, 0x27, 0x98, 0xd0, 0xaf, 0x61, 0x71, 0x42, 0x3c, 0xcf, 0x18, 0x05, 0x71, + 0x2e, 0xf2, 0x71, 0x69, 0xfb, 0xd9, 0xec, 0xd4, 0xef, 0x25, 0x5c, 0x4c, 0x5a, 0x0b, 0xb8, 0x3c, + 0x49, 0xcc, 0x6b, 0x7f, 0x57, 0x00, 0x62, 0xdd, 0xa8, 0x03, 0x25, 0x93, 0x78, 0x43, 0xd7, 0x72, + 0x84, 0x19, 0xca, 0x1c, 0xf9, 0x3d, 0x49, 0x70, 0x21, 0x6d, 0xa6, 0xbe, 0x25, 0x6d, 0xd6, 0xfe, + 0xab, 0x40, 0x39, 0x69, 0x0b, 0xfa, 0x00, 0x19, 0x76, 0xee, 0xc8, 0x27, 0xaa, 0x6c, 0xbf, 0x9a, + 0xef, 0x46, 0xb4, 0xfe, 0xb9, 0x43, 0xb0, 0x20, 0x42, 0x15, 0x48, 0x05, 0xc5, 0x35, 0x83, 0x53, + 0x96, 0x89, 0x1e, 0xc1, 0x92, 0x4f, 0x87, 0xf6, 0xc4, 0x71, 0x89, 0xe7, 0x11, 0x53, 0xf7, 0xac, + 0xcf, 0x44, 0xdc, 0x7f, 0x06, 0x57, 0x93, 0x1b, 0x3d, 0xeb, 0x33, 0x41, 0x3f, 0x84, 0x1b, 0x17, + 0x45, 0x33, 0x42, 0xb4, 0x32, 0x2d, 0x58, 0x7f, 0x0a, 0x19, 0xae, 0x13, 0x2d, 0x43, 0xb5, 0xff, + 0x8b, 0x6e, 0x53, 0xff, 0xd4, 0xe9, 0x75, 0x9b, 0xbb, 0xed, 0xfd, 0x76, 0x73, 0xaf, 0xba, 0x80, + 0x0a, 0x90, 0xe9, 0x35, 0x3b, 0xfd, 0xaa, 0x82, 0xca, 0x50, 0xc0, 0xcd, 0xdd, 0x66, 0xfb, 0xa8, + 0xb9, 0x57, 0x4d, 0x35, 0xf2, 0x81, 0x8b, 0xd7, 0xfe, 0xc9, 0x53, 0x49, 0x9c, 0xb7, 0x5b, 0x00, + 0x71, 0x11, 0x08, 0x62, 0xf7, 0xe1, 0xcc, 0x57, 0x81, 0x8b, 0x51, 0x09, 0x40, 0x2f, 0x61, 0x35, + 0x8a, 0xd2, 0xc8, 0x23, 0xa6, 0xc3, 0xf4, 0x76, 0x18, 0xa6, 0xf1, 0xbe, 0x88, 0x53, 0xf4, 0x16, + 0xee, 0x84, 0xd8, 0x29, 0x6f, 0x0d, 0xe1, 0x69, 0x01, 0x0f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x27, + 0xb2, 0x93, 0x2e, 0xcb, 0xc4, 0x1c, 0x79, 0xad, 0xb5, 0x80, 0x4b, 0x92, 0x43, 0x52, 0x7e, 0x17, + 0x8a, 0x16, 0x65, 0x7a, 0x5c, 0x76, 0xd2, 0xad, 0x05, 0x5c, 0xb0, 0x28, 0x93, 0xdb, 0x77, 0x01, + 0x06, 0xb6, 0x3d, 0x0e, 0xf6, 0xb9, 0x63, 0x16, 0x5a, 0x0b, 0xb8, 0x38, 0x08, 0x5b, 0x0e, 0x74, + 0x0f, 0xca, 0xa6, 0xed, 0x0f, 0xc6, 0x24, 0x10, 0xe1, 0x6e, 0xa7, 0x70, 0x25, 0x72, 0x55, 0x08, + 0x45, 0x41, 0x5f, 0xff, 0x63, 0x0e, 0x20, 0xee, 0x02, 0x51, 0x9f, 0xdb, 0xc3, 0x3b, 0xc8, 0x63, + 0xd7, 0x98, 0x88, 0x26, 0x82, 0xdb, 0xb3, 0x35, 0x53, 0x0b, 0x29, 0x87, 0xfb, 0x02, 0x88, 0x65, + 0x23, 0x2a, 0x27, 0x68, 0x03, 0x6e, 0x26, 0xfa, 0x52, 0xfd, 0xc4, 0xf0, 0x4e, 0xf4, 0x28, 0x1f, + 0x56, 0xe3, 0xc6, 0xb3, 0x65, 0x78, 0x27, 0x6d, 0xb3, 0xf6, 0x9f, 0x74, 0x70, 0x26, 0x01, 0x47, + 0x1f, 0x61, 0xf1, 0xd8, 0xa7, 0x43, 0x9e, 0x14, 0x74, 0xf1, 0x71, 0x30, 0x4f, 0xf1, 0x28, 0x87, + 0x14, 0x1d, 0x4e, 0x39, 0x80, 0x15, 0xdb, 0xb5, 0x46, 0x16, 0x35, 0xc6, 0xfa, 0x34, 0x77, 0x6a, + 0x0e, 0xee, 0xe5, 0x90, 0x6b, 0x3f, 0xa9, 0xa3, 0x0d, 0xc5, 0x63, 0x6b, 0x4c, 0x24, 0x6d, 0x7a, + 0x0e, 0xda, 0x02, 0x87, 0x0b, 0xaa, 0xbb, 0x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6, 0x90, + 0x9f, 0x18, 0x5d, 0xbe, 0xd8, 0x55, 0x7e, 0xd9, 0x18, 0x59, 0xec, 0xc4, 0x1f, 0x68, 0x43, 0x7b, + 0xb2, 0x29, 0xe5, 0x37, 0x2c, 0xea, 0x31, 0xd7, 0x9f, 0x10, 0x2a, 0x8b, 0xf7, 0x66, 0x4c, 0xb5, + 0x21, 0xff, 0xe3, 0x18, 0x11, 0xba, 0x31, 0x8a, 0xff, 0x2c, 0xf9, 0x77, 0x6a, 0xf5, 0x83, 0x43, + 0xe8, 0xae, 0xd4, 0x26, 0x88, 0x65, 0xb1, 0xd2, 0x8e, 0xb6, 0x06, 0x39, 0x01, 0x79, 0xf2, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x56, 0xb6, 0xfd, 0x6c, 0x11, 0x00, 0x00, +} diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go new file mode 100644 index 0000000000..025387784f --- /dev/null +++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go @@ -0,0 +1,359 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opencensus/proto/trace/v1/trace_config.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +// How spans should be sampled: +// - Always off +// - Always on +// - Always follow the parent Span's decision (off if no parent). +type ConstantSampler_ConstantDecision int32 + +const ( + ConstantSampler_ALWAYS_OFF ConstantSampler_ConstantDecision = 0 + ConstantSampler_ALWAYS_ON ConstantSampler_ConstantDecision = 1 + ConstantSampler_ALWAYS_PARENT ConstantSampler_ConstantDecision = 2 +) + +var ConstantSampler_ConstantDecision_name = map[int32]string{ + 0: "ALWAYS_OFF", + 1: "ALWAYS_ON", + 2: "ALWAYS_PARENT", +} + +var ConstantSampler_ConstantDecision_value = map[string]int32{ + "ALWAYS_OFF": 0, + "ALWAYS_ON": 1, + "ALWAYS_PARENT": 2, +} + +func (x ConstantSampler_ConstantDecision) String() string { + return proto.EnumName(ConstantSampler_ConstantDecision_name, int32(x)) +} + +func (ConstantSampler_ConstantDecision) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5359209b41ff50c5, []int{2, 0} +} + +// Global configuration of the trace service. All fields must be specified, or +// the default (zero) values will be used for each type. +type TraceConfig struct { + // The global default sampler used to make decisions on span sampling. + // + // Types that are valid to be assigned to Sampler: + // *TraceConfig_ProbabilitySampler + // *TraceConfig_ConstantSampler + // *TraceConfig_RateLimitingSampler + Sampler isTraceConfig_Sampler `protobuf_oneof:"sampler"` + // The global default max number of attributes per span. + MaxNumberOfAttributes int64 `protobuf:"varint,4,opt,name=max_number_of_attributes,json=maxNumberOfAttributes,proto3" json:"max_number_of_attributes,omitempty"` + // The global default max number of annotation events per span. + MaxNumberOfAnnotations int64 `protobuf:"varint,5,opt,name=max_number_of_annotations,json=maxNumberOfAnnotations,proto3" json:"max_number_of_annotations,omitempty"` + // The global default max number of message events per span. + MaxNumberOfMessageEvents int64 `protobuf:"varint,6,opt,name=max_number_of_message_events,json=maxNumberOfMessageEvents,proto3" json:"max_number_of_message_events,omitempty"` + // The global default max number of link entries per span. + MaxNumberOfLinks int64 `protobuf:"varint,7,opt,name=max_number_of_links,json=maxNumberOfLinks,proto3" json:"max_number_of_links,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TraceConfig) Reset() { *m = TraceConfig{} } +func (m *TraceConfig) String() string { return proto.CompactTextString(m) } +func (*TraceConfig) ProtoMessage() {} +func (*TraceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_5359209b41ff50c5, []int{0} +} + +func (m *TraceConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TraceConfig.Unmarshal(m, b) +} +func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) +} +func (m *TraceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceConfig.Merge(m, src) +} +func (m *TraceConfig) XXX_Size() int { + return xxx_messageInfo_TraceConfig.Size(m) +} +func (m *TraceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TraceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceConfig proto.InternalMessageInfo + +type isTraceConfig_Sampler interface { + isTraceConfig_Sampler() +} + +type TraceConfig_ProbabilitySampler struct { + ProbabilitySampler *ProbabilitySampler `protobuf:"bytes,1,opt,name=probability_sampler,json=probabilitySampler,proto3,oneof"` +} + +type TraceConfig_ConstantSampler struct { + ConstantSampler *ConstantSampler `protobuf:"bytes,2,opt,name=constant_sampler,json=constantSampler,proto3,oneof"` +} + +type TraceConfig_RateLimitingSampler struct { + RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof"` +} + +func (*TraceConfig_ProbabilitySampler) isTraceConfig_Sampler() {} + +func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {} + +func (*TraceConfig_RateLimitingSampler) isTraceConfig_Sampler() {} + +func (m *TraceConfig) GetSampler() isTraceConfig_Sampler { + if m != nil { + return m.Sampler + } + return nil +} + +func (m *TraceConfig) GetProbabilitySampler() *ProbabilitySampler { + if x, ok := m.GetSampler().(*TraceConfig_ProbabilitySampler); ok { + return x.ProbabilitySampler + } + return nil +} + +func (m *TraceConfig) GetConstantSampler() *ConstantSampler { + if x, ok := m.GetSampler().(*TraceConfig_ConstantSampler); ok { + return x.ConstantSampler + } + return nil +} + +func (m *TraceConfig) GetRateLimitingSampler() *RateLimitingSampler { + if x, ok := m.GetSampler().(*TraceConfig_RateLimitingSampler); ok { + return x.RateLimitingSampler + } + return nil +} + +func (m *TraceConfig) GetMaxNumberOfAttributes() int64 { + if m != nil { + return m.MaxNumberOfAttributes + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfAnnotations() int64 { + if m != nil { + return m.MaxNumberOfAnnotations + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfMessageEvents() int64 { + if m != nil { + return m.MaxNumberOfMessageEvents + } + return 0 +} + +func (m *TraceConfig) GetMaxNumberOfLinks() int64 { + if m != nil { + return m.MaxNumberOfLinks + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TraceConfig) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TraceConfig_ProbabilitySampler)(nil), + (*TraceConfig_ConstantSampler)(nil), + (*TraceConfig_RateLimitingSampler)(nil), + } +} + +// Sampler that tries to uniformly sample traces with a given probability. +// The probability of sampling a trace is equal to that of the specified probability. +type ProbabilitySampler struct { + // The desired probability of sampling. Must be within [0.0, 1.0]. + SamplingProbability float64 `protobuf:"fixed64,1,opt,name=samplingProbability,proto3" json:"samplingProbability,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProbabilitySampler) Reset() { *m = ProbabilitySampler{} } +func (m *ProbabilitySampler) String() string { return proto.CompactTextString(m) } +func (*ProbabilitySampler) ProtoMessage() {} +func (*ProbabilitySampler) Descriptor() ([]byte, []int) { + return fileDescriptor_5359209b41ff50c5, []int{1} +} + +func (m *ProbabilitySampler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProbabilitySampler.Unmarshal(m, b) +} +func (m *ProbabilitySampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProbabilitySampler.Marshal(b, m, deterministic) +} +func (m *ProbabilitySampler) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProbabilitySampler.Merge(m, src) +} +func (m *ProbabilitySampler) XXX_Size() int { + return xxx_messageInfo_ProbabilitySampler.Size(m) +} +func (m *ProbabilitySampler) XXX_DiscardUnknown() { + xxx_messageInfo_ProbabilitySampler.DiscardUnknown(m) +} + +var xxx_messageInfo_ProbabilitySampler proto.InternalMessageInfo + +func (m *ProbabilitySampler) GetSamplingProbability() float64 { + if m != nil { + return m.SamplingProbability + } + return 0 +} + +// Sampler that always makes a constant decision on span sampling. +type ConstantSampler struct { + Decision ConstantSampler_ConstantDecision `protobuf:"varint,1,opt,name=decision,proto3,enum=opencensus.proto.trace.v1.ConstantSampler_ConstantDecision" json:"decision,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConstantSampler) Reset() { *m = ConstantSampler{} } +func (m *ConstantSampler) String() string { return proto.CompactTextString(m) } +func (*ConstantSampler) ProtoMessage() {} +func (*ConstantSampler) Descriptor() ([]byte, []int) { + return fileDescriptor_5359209b41ff50c5, []int{2} +} + +func (m *ConstantSampler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConstantSampler.Unmarshal(m, b) +} +func (m *ConstantSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConstantSampler.Marshal(b, m, deterministic) +} +func (m *ConstantSampler) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConstantSampler.Merge(m, src) +} +func (m *ConstantSampler) XXX_Size() int { + return xxx_messageInfo_ConstantSampler.Size(m) +} +func (m *ConstantSampler) XXX_DiscardUnknown() { + xxx_messageInfo_ConstantSampler.DiscardUnknown(m) +} + +var xxx_messageInfo_ConstantSampler proto.InternalMessageInfo + +func (m *ConstantSampler) GetDecision() ConstantSampler_ConstantDecision { + if m != nil { + return m.Decision + } + return ConstantSampler_ALWAYS_OFF +} + +// Sampler that tries to sample with a rate per time window. +type RateLimitingSampler struct { + // Rate per second. + Qps int64 `protobuf:"varint,1,opt,name=qps,proto3" json:"qps,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimitingSampler) Reset() { *m = RateLimitingSampler{} } +func (m *RateLimitingSampler) String() string { return proto.CompactTextString(m) } +func (*RateLimitingSampler) ProtoMessage() {} +func (*RateLimitingSampler) Descriptor() ([]byte, []int) { + return fileDescriptor_5359209b41ff50c5, []int{3} +} + +func (m *RateLimitingSampler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimitingSampler.Unmarshal(m, b) +} +func (m *RateLimitingSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimitingSampler.Marshal(b, m, deterministic) +} +func (m *RateLimitingSampler) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimitingSampler.Merge(m, src) +} +func (m *RateLimitingSampler) XXX_Size() int { + return xxx_messageInfo_RateLimitingSampler.Size(m) +} +func (m *RateLimitingSampler) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimitingSampler.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimitingSampler proto.InternalMessageInfo + +func (m *RateLimitingSampler) GetQps() int64 { + if m != nil { + return m.Qps + } + return 0 +} + +func init() { + proto.RegisterEnum("opencensus.proto.trace.v1.ConstantSampler_ConstantDecision", ConstantSampler_ConstantDecision_name, ConstantSampler_ConstantDecision_value) + proto.RegisterType((*TraceConfig)(nil), "opencensus.proto.trace.v1.TraceConfig") + proto.RegisterType((*ProbabilitySampler)(nil), "opencensus.proto.trace.v1.ProbabilitySampler") + proto.RegisterType((*ConstantSampler)(nil), "opencensus.proto.trace.v1.ConstantSampler") + proto.RegisterType((*RateLimitingSampler)(nil), "opencensus.proto.trace.v1.RateLimitingSampler") +} + +func init() { + proto.RegisterFile("opencensus/proto/trace/v1/trace_config.proto", fileDescriptor_5359209b41ff50c5) +} + +var fileDescriptor_5359209b41ff50c5 = []byte{ + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6e, 0xd3, 0x30, + 0x18, 0xc7, 0x97, 0x76, 0x6c, 0xec, 0x9b, 0xb6, 0x05, 0x57, 0x43, 0xa9, 0xb4, 0xc3, 0x94, 0x0b, + 0x13, 0x22, 0x09, 0x1d, 0x07, 0x84, 0x90, 0x90, 0xda, 0x6e, 0x15, 0x87, 0xd2, 0x56, 0xd9, 0x44, + 0x05, 0x97, 0xe0, 0x64, 0x6e, 0xb0, 0x68, 0xec, 0x60, 0x3b, 0xd5, 0x78, 0x0d, 0xce, 0x3c, 0x04, + 0xcf, 0xc5, 0x53, 0xa0, 0x3a, 0x21, 0x49, 0xdb, 0x6d, 0xe2, 0x96, 0xef, 0xfb, 0x7f, 0xbf, 0x9f, + 0xad, 0xd8, 0x86, 0x17, 0x3c, 0x25, 0x2c, 0x22, 0x4c, 0x66, 0xd2, 0x4b, 0x05, 0x57, 0xdc, 0x53, + 0x02, 0x47, 0xc4, 0x5b, 0x74, 0xf2, 0x8f, 0x20, 0xe2, 0x6c, 0x46, 0x63, 0x57, 0x67, 0xa8, 0x5d, + 0x4d, 0xe7, 0x1d, 0x57, 0x0f, 0xb9, 0x8b, 0x8e, 0xfd, 0x6b, 0x1b, 0xf6, 0xaf, 0x97, 0x45, 0x5f, + 0x03, 0xe8, 0x0b, 0xb4, 0x52, 0xc1, 0x43, 0x1c, 0xd2, 0x39, 0x55, 0x3f, 0x02, 0x89, 0x93, 0x74, + 0x4e, 0x84, 0x65, 0x9c, 0x1a, 0x67, 0xfb, 0xe7, 0x8e, 0x7b, 0xaf, 0xc8, 0x9d, 0x54, 0xd4, 0x55, + 0x0e, 0xbd, 0xdf, 0xf2, 0x51, 0xba, 0xd1, 0x45, 0x53, 0x30,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a2, 0x92, 0x72, 0xa6, 0xd1, 0xc3, 0xf3, 0xb7, 0xff, 0x7f, 0x01, 0xca, 0xfa, 0xa2, 0x50, 0xf8, + 0xa5, 0xcc, 0xbe, 0x00, 0x73, 0x3d, 0x45, 0x87, 0x00, 0xdd, 0xe1, 0xb4, 0xfb, 0xe9, 0x2a, 0x18, + 0x0f, 0x06, 0xe6, 0x16, 0x3a, 0x80, 0xbd, 0x7f, 0xf5, 0xc8, 0x34, 0xd0, 0x13, 0x38, 0x28, 0xca, + 0x49, 0xd7, 0xbf, 0x1c, 0x5d, 0x9b, 0x0d, 0xfb, 0x19, 0xb4, 0xee, 0xb8, 0x16, 0xc8, 0x84, 0xe6, + 0xf7, 0x54, 0xea, 0x0d, 0x37, 0xfd, 0xe5, 0x67, 0xef, 0xa7, 0x01, 0x27, 0x94, 0xdf, 0xbf, 0xf5, + 0x9e, 0x59, 0x7b, 0x60, 0x93, 0x65, 0x34, 0x31, 0x3e, 0xf7, 0x62, 0xaa, 0xbe, 0x66, 0xa1, 0x1b, + 0xf1, 0xc4, 0xcb, 0x29, 0x87, 0x32, 0xa9, 0x44, 0x96, 0x10, 0x96, 0x1f, 0xbb, 0x57, 0x09, 0x9d, + 0xfc, 0x89, 0xc7, 0x84, 0x39, 0x71, 0xf5, 0xd2, 0xff, 0x34, 0xda, 0xe3, 0x94, 0xb0, 0x7e, 0xbe, + 0xa6, 0x16, 0xbb, 0x7a, 0x25, 0xf7, 0x63, 0x27, 0xdc, 0xd1, 0xc8, 0xab, 0xbf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x50, 0x0c, 0xfe, 0x32, 0x29, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/cncf/udpa/go/LICENSE b/vendor/github.com/cncf/udpa/go/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/LICENSE @@ -0,0 +1,201 @@ + 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/udpa/go/udpa/annotations/migrate.pb.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.go new file mode 100644 index 0000000000..5c77558cc0 --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: udpa/annotations/migrate.proto + +package udpa_annotations + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type MigrateAnnotation struct { + Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MigrateAnnotation) Reset() { *m = MigrateAnnotation{} } +func (m *MigrateAnnotation) String() string { return proto.CompactTextString(m) } +func (*MigrateAnnotation) ProtoMessage() {} +func (*MigrateAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_ba8191732d0e246d, []int{0} +} + +func (m *MigrateAnnotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MigrateAnnotation.Unmarshal(m, b) +} +func (m *MigrateAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MigrateAnnotation.Marshal(b, m, deterministic) +} +func (m *MigrateAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_MigrateAnnotation.Merge(m, src) +} +func (m *MigrateAnnotation) XXX_Size() int { + return xxx_messageInfo_MigrateAnnotation.Size(m) +} +func (m *MigrateAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_MigrateAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_MigrateAnnotation proto.InternalMessageInfo + +func (m *MigrateAnnotation) GetRename() string { + if m != nil { + return m.Rename + } + return "" +} + +type FieldMigrateAnnotation struct { + 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldMigrateAnnotation) Reset() { *m = FieldMigrateAnnotation{} } +func (m *FieldMigrateAnnotation) String() string { return proto.CompactTextString(m) } +func (*FieldMigrateAnnotation) ProtoMessage() {} +func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_ba8191732d0e246d, []int{1} +} + +func (m *FieldMigrateAnnotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldMigrateAnnotation.Unmarshal(m, b) +} +func (m *FieldMigrateAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldMigrateAnnotation.Marshal(b, m, deterministic) +} +func (m *FieldMigrateAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldMigrateAnnotation.Merge(m, src) +} +func (m *FieldMigrateAnnotation) XXX_Size() int { + return xxx_messageInfo_FieldMigrateAnnotation.Size(m) +} +func (m *FieldMigrateAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_FieldMigrateAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldMigrateAnnotation proto.InternalMessageInfo + +func (m *FieldMigrateAnnotation) GetRename() string { + if m != nil { + return m.Rename + } + return "" +} + +func (m *FieldMigrateAnnotation) GetOneofPromotion() string { + if m != nil { + return m.OneofPromotion + } + return "" +} + +type FileMigrateAnnotation struct { + MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileMigrateAnnotation) Reset() { *m = FileMigrateAnnotation{} } +func (m *FileMigrateAnnotation) String() string { return proto.CompactTextString(m) } +func (*FileMigrateAnnotation) ProtoMessage() {} +func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_ba8191732d0e246d, []int{2} +} + +func (m *FileMigrateAnnotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileMigrateAnnotation.Unmarshal(m, b) +} +func (m *FileMigrateAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileMigrateAnnotation.Marshal(b, m, deterministic) +} +func (m *FileMigrateAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileMigrateAnnotation.Merge(m, src) +} +func (m *FileMigrateAnnotation) XXX_Size() int { + return xxx_messageInfo_FileMigrateAnnotation.Size(m) +} +func (m *FileMigrateAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_FileMigrateAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_FileMigrateAnnotation proto.InternalMessageInfo + +func (m *FileMigrateAnnotation) GetMoveToPackage() string { + if m != nil { + return m.MoveToPackage + } + return "" +} + +var E_MessageMigrate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*MigrateAnnotation)(nil), + Field: 171962766, + Name: "udpa.annotations.message_migrate", + Tag: "bytes,171962766,opt,name=message_migrate", + Filename: "udpa/annotations/migrate.proto", +} + +var E_FieldMigrate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*FieldMigrateAnnotation)(nil), + Field: 171962766, + Name: "udpa.annotations.field_migrate", + Tag: "bytes,171962766,opt,name=field_migrate", + Filename: "udpa/annotations/migrate.proto", +} + +var E_EnumMigrate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.EnumOptions)(nil), + ExtensionType: (*MigrateAnnotation)(nil), + Field: 171962766, + Name: "udpa.annotations.enum_migrate", + Tag: "bytes,171962766,opt,name=enum_migrate", + Filename: "udpa/annotations/migrate.proto", +} + +var E_EnumValueMigrate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.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", +} + +var E_FileMigrate = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*FileMigrateAnnotation)(nil), + Field: 171962766, + Name: "udpa.annotations.file_migrate", + Tag: "bytes,171962766,opt,name=file_migrate", + Filename: "udpa/annotations/migrate.proto", +} + +func init() { + proto.RegisterType((*MigrateAnnotation)(nil), "udpa.annotations.MigrateAnnotation") + proto.RegisterType((*FieldMigrateAnnotation)(nil), "udpa.annotations.FieldMigrateAnnotation") + proto.RegisterType((*FileMigrateAnnotation)(nil), "udpa.annotations.FileMigrateAnnotation") + proto.RegisterExtension(E_MessageMigrate) + proto.RegisterExtension(E_FieldMigrate) + proto.RegisterExtension(E_EnumMigrate) + proto.RegisterExtension(E_EnumValueMigrate) + proto.RegisterExtension(E_FileMigrate) +} + +func init() { proto.RegisterFile("udpa/annotations/migrate.proto", fileDescriptor_ba8191732d0e246d) } + +var fileDescriptor_ba8191732d0e246d = []byte{ + // 349 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcd, 0x4a, 0xfb, 0x40, + 0x14, 0xc5, 0xe9, 0x7f, 0x51, 0xf8, 0x4f, 0x3f, 0x0d, 0x58, 0x8a, 0xf8, 0x51, 0x2b, 0xd8, 0x82, + 0x30, 0x01, 0xdd, 0x75, 0x23, 0x2e, 0xec, 0xae, 0x58, 0x83, 0x08, 0xae, 0xc2, 0xb4, 0xbd, 0x09, + 0xa1, 0x99, 0xb9, 0x43, 0x32, 0xa9, 0x6f, 0xe1, 0x4b, 0xfa, 0x20, 0xca, 0x4c, 0x92, 0xb6, 0x38, + 0x41, 0xa4, 0xcb, 0x9c, 0x7b, 0xef, 0xf9, 0xe5, 0x1c, 0x86, 0x9c, 0x67, 0x2b, 0xc9, 0x5c, 0x26, + 0x04, 0x2a, 0xa6, 0x22, 0x14, 0xa9, 0xcb, 0xa3, 0x30, 0x61, 0x0a, 0xa8, 0x4c, 0x50, 0xa1, 0xd3, + 0xd5, 0x73, 0xba, 0x37, 0x3f, 0x19, 0x84, 0x88, 0x61, 0x0c, 0xae, 0x99, 0x2f, 0xb2, 0xc0, 0x5d, + 0x41, 0xba, 0x4c, 0x22, 0xa9, 0x30, 0xc9, 0x6f, 0x86, 0x37, 0xe4, 0x68, 0x96, 0x9b, 0x3c, 0x6c, + 0xef, 0x9c, 0x1e, 0xa9, 0x27, 0x20, 0x18, 0x87, 0x7e, 0x6d, 0x50, 0x1b, 0xff, 0xf7, 0x8a, 0xaf, + 0xe1, 0x1b, 0xe9, 0x4d, 0x23, 0x88, 0x57, 0x7f, 0xbe, 0x70, 0x46, 0xa4, 0x83, 0x02, 0x30, 0xf0, + 0x65, 0x82, 0x1c, 0xf5, 0x6a, 0xff, 0x9f, 0x59, 0x68, 0x1b, 0x79, 0x5e, 0xaa, 0xc3, 0x7b, 0x72, + 0x3c, 0x8d, 0x62, 0xb0, 0x9d, 0xaf, 0x49, 0x87, 0xe3, 0x06, 0x7c, 0x85, 0xbe, 0x64, 0xcb, 0x35, + 0x0b, 0xa1, 0x70, 0x68, 0x69, 0xf9, 0x05, 0xe7, 0xb9, 0x38, 0x91, 0xa4, 0xc3, 0x21, 0x4d, 0x59, + 0x08, 0x7e, 0xd1, 0x8a, 0x73, 0x41, 0xf3, 0xf8, 0xb4, 0x8c, 0x4f, 0x67, 0xf9, 0xc6, 0x93, 0x34, + 0xf5, 0xf4, 0x3f, 0x3e, 0xbf, 0x9e, 0x07, 0xb5, 0x71, 0xe3, 0xf6, 0x8a, 0xfe, 0xac, 0x8e, 0x5a, + 0x7f, 0xe2, 0xb5, 0x0b, 0xff, 0x62, 0x32, 0x41, 0xd2, 0x0a, 0x74, 0x1b, 0x5b, 0xde, 0x99, 0xc5, + 0x33, 0x6d, 0x59, 0xb4, 0xb1, 0x4d, 0xab, 0xae, 0xd5, 0x6b, 0x06, 0x7b, 0xfa, 0x24, 0x24, 0x4d, + 0x10, 0x19, 0xdf, 0xf2, 0x4e, 0x2d, 0xde, 0xa3, 0xc8, 0xf8, 0x61, 0xe1, 0x1a, 0xda, 0xb9, 0x04, + 0xbd, 0x13, 0xc7, 0x80, 0x36, 0x2c, 0xce, 0x76, 0x75, 0x5e, 0x56, 0xe2, 0x5e, 0xf5, 0xce, 0x61, + 0xcc, 0x2e, 0x94, 0xf7, 0x25, 0x78, 0x4d, 0x9a, 0x41, 0x14, 0xc3, 0x2f, 0x09, 0xf5, 0x23, 0xb1, + 0x68, 0xa3, 0xaa, 0x42, 0x2b, 0x1e, 0x93, 0xd7, 0x08, 0x76, 0xf2, 0xa2, 0x6e, 0x4c, 0xef, 0xbe, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x62, 0x65, 0xc8, 0x45, 0x57, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.validate.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.validate.go new file mode 100644 index 0000000000..6da3f833ca --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/migrate.pb.validate.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: udpa/annotations/migrate.proto + +package udpa_annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _migrate_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on MigrateAnnotation with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *MigrateAnnotation) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Rename + + return nil +} + +// 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, an error is returned. +func (m *FieldMigrateAnnotation) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Rename + + // no validation rules for OneofPromotion + + return nil +} + +// 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, an error is returned. +func (m *FileMigrateAnnotation) Validate() error { + if m == nil { + return nil + } + + // no validation rules for MoveToPackage + + return nil +} + +// 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/udpa/go/udpa/annotations/sensitive.pb.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.go new file mode 100644 index 0000000000..90bc12c5ac --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.go @@ -0,0 +1,50 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: udpa/annotations/sensitive.proto + +package udpa_annotations + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +var E_Sensitive = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 76569463, + Name: "udpa.annotations.sensitive", + Tag: "varint,76569463,opt,name=sensitive", + Filename: "udpa/annotations/sensitive.proto", +} + +func init() { + proto.RegisterExtension(E_Sensitive) +} + +func init() { proto.RegisterFile("udpa/annotations/sensitive.proto", fileDescriptor_abbd0dde0408189d) } + +var fileDescriptor_abbd0dde0408189d = []byte{ + // 134 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0x4d, 0x29, 0x48, + 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x4e, 0xcd, + 0x2b, 0xce, 0x2c, 0xc9, 0x2c, 0x4b, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x00, 0xa9, + 0xd0, 0x43, 0x52, 0x21, 0xa5, 0x90, 0x9e, 0x9f, 0x9f, 0x9e, 0x93, 0xaa, 0x0f, 0x96, 0x4f, 0x2a, + 0x4d, 0xd3, 0x4f, 0x49, 0x2d, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0x2f, 0x82, 0xe8, 0xb1, 0xb2, + 0xe3, 0xe2, 0x84, 0x1b, 0x23, 0x24, 0xab, 0x07, 0x51, 0xaf, 0x07, 0x53, 0xaf, 0xe7, 0x96, 0x99, + 0x9a, 0x93, 0xe2, 0x5f, 0x00, 0x36, 0x4d, 0xe2, 0xfb, 0xb6, 0x83, 0x2a, 0x0a, 0x8c, 0x1a, 0x1c, + 0x41, 0x08, 0x2d, 0x49, 0x6c, 0x60, 0xa5, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xba, + 0xeb, 0x73, 0x9e, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.validate.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.validate.go new file mode 100644 index 0000000000..8b2b3f8c7e --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/sensitive.pb.validate.go @@ -0,0 +1,37 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: udpa/annotations/sensitive.proto + +package udpa_annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _sensitive_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.go new file mode 100644 index 0000000000..d254fec486 --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.go @@ -0,0 +1,93 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: udpa/annotations/status.proto + +package udpa_annotations + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type StatusAnnotation struct { + WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StatusAnnotation) Reset() { *m = StatusAnnotation{} } +func (m *StatusAnnotation) String() string { return proto.CompactTextString(m) } +func (*StatusAnnotation) ProtoMessage() {} +func (*StatusAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_011cc2e7e491b0ff, []int{0} +} + +func (m *StatusAnnotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StatusAnnotation.Unmarshal(m, b) +} +func (m *StatusAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StatusAnnotation.Marshal(b, m, deterministic) +} +func (m *StatusAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_StatusAnnotation.Merge(m, src) +} +func (m *StatusAnnotation) XXX_Size() int { + return xxx_messageInfo_StatusAnnotation.Size(m) +} +func (m *StatusAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_StatusAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_StatusAnnotation proto.InternalMessageInfo + +func (m *StatusAnnotation) GetWorkInProgress() bool { + if m != nil { + return m.WorkInProgress + } + return false +} + +var E_FileStatus = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*StatusAnnotation)(nil), + Field: 222707719, + Name: "udpa.annotations.file_status", + Tag: "bytes,222707719,opt,name=file_status", + Filename: "udpa/annotations/status.proto", +} + +func init() { + proto.RegisterType((*StatusAnnotation)(nil), "udpa.annotations.StatusAnnotation") + proto.RegisterExtension(E_FileStatus) +} + +func init() { proto.RegisterFile("udpa/annotations/status.proto", fileDescriptor_011cc2e7e491b0ff) } + +var fileDescriptor_011cc2e7e491b0ff = []byte{ + // 191 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x4d, 0x29, 0x48, + 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x2e, 0x49, + 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x00, 0x49, 0xeb, 0x21, 0x49, + 0x4b, 0x29, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x83, 0xe5, 0x93, 0x4a, 0xd3, 0xf4, 0x53, + 0x52, 0x8b, 0x93, 0x8b, 0x32, 0x0b, 0x4a, 0xf2, 0x8b, 0x20, 0x7a, 0x94, 0x6c, 0xb8, 0x04, 0x82, + 0xc1, 0x66, 0x38, 0xc2, 0xb5, 0x09, 0x69, 0x70, 0x09, 0x94, 0xe7, 0x17, 0x65, 0xc7, 0x67, 0xe6, + 0xc5, 0x17, 0x14, 0xe5, 0xa7, 0x17, 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x04, + 0xf1, 0x81, 0xc4, 0x3d, 0xf3, 0x02, 0xa0, 0xa2, 0x56, 0x29, 0x5c, 0xdc, 0x69, 0x99, 0x39, 0xa9, + 0xf1, 0x10, 0x67, 0x08, 0xc9, 0xe8, 0x41, 0xec, 0xd3, 0x83, 0xd9, 0xa7, 0xe7, 0x96, 0x99, 0x93, + 0xea, 0x5f, 0x00, 0x76, 0x8c, 0x44, 0x7b, 0xc3, 0xcc, 0x2c, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x25, + 0x3d, 0x74, 0x87, 0xea, 0xa1, 0xbb, 0x21, 0x88, 0x0b, 0x64, 0x2e, 0x44, 0x34, 0x89, 0x0d, 0x6c, + 0x9c, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xda, 0x3c, 0x97, 0x43, 0xff, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.validate.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.validate.go new file mode 100644 index 0000000000..76b7fd3672 --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/status.pb.validate.go @@ -0,0 +1,104 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: udpa/annotations/status.proto + +package udpa_annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _status_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on StatusAnnotation with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *StatusAnnotation) Validate() error { + if m == nil { + return nil + } + + // no validation rules for WorkInProgress + + return nil +} + +// 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/udpa/go/udpa/annotations/versioning.pb.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.go new file mode 100644 index 0000000000..4c414ce5eb --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.go @@ -0,0 +1,94 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: udpa/annotations/versioning.proto + +package udpa_annotations + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type VersioningAnnotation struct { + PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersioningAnnotation) Reset() { *m = VersioningAnnotation{} } +func (m *VersioningAnnotation) String() string { return proto.CompactTextString(m) } +func (*VersioningAnnotation) ProtoMessage() {} +func (*VersioningAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_5bc0544382e16cfc, []int{0} +} + +func (m *VersioningAnnotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersioningAnnotation.Unmarshal(m, b) +} +func (m *VersioningAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersioningAnnotation.Marshal(b, m, deterministic) +} +func (m *VersioningAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersioningAnnotation.Merge(m, src) +} +func (m *VersioningAnnotation) XXX_Size() int { + return xxx_messageInfo_VersioningAnnotation.Size(m) +} +func (m *VersioningAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_VersioningAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_VersioningAnnotation proto.InternalMessageInfo + +func (m *VersioningAnnotation) GetPreviousMessageType() string { + if m != nil { + return m.PreviousMessageType + } + return "" +} + +var E_Versioning = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*VersioningAnnotation)(nil), + Field: 7881811, + Name: "udpa.annotations.versioning", + Tag: "bytes,7881811,opt,name=versioning", + Filename: "udpa/annotations/versioning.proto", +} + +func init() { + proto.RegisterType((*VersioningAnnotation)(nil), "udpa.annotations.VersioningAnnotation") + proto.RegisterExtension(E_Versioning) +} + +func init() { proto.RegisterFile("udpa/annotations/versioning.proto", fileDescriptor_5bc0544382e16cfc) } + +var fileDescriptor_5bc0544382e16cfc = []byte{ + // 193 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x4d, 0x29, 0x48, + 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x4b, 0x2d, + 0x2a, 0xce, 0xcc, 0xcf, 0xcb, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x00, + 0x29, 0xd1, 0x43, 0x52, 0x22, 0xa5, 0x90, 0x9e, 0x9f, 0x9f, 0x9e, 0x93, 0xaa, 0x0f, 0x96, 0x4f, + 0x2a, 0x4d, 0xd3, 0x4f, 0x49, 0x2d, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0x2f, 0x82, 0xe8, 0x51, + 0xf2, 0xe2, 0x12, 0x09, 0x83, 0x9b, 0xe3, 0x08, 0xd7, 0x2a, 0x64, 0xc4, 0x25, 0x5a, 0x50, 0x94, + 0x5a, 0x96, 0x99, 0x5f, 0x5a, 0x1c, 0x9f, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x1a, 0x5f, 0x52, + 0x59, 0x90, 0x2a, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x24, 0x0c, 0x93, 0xf4, 0x85, 0xc8, 0x85, + 0x54, 0x16, 0xa4, 0x5a, 0x65, 0x71, 0x71, 0x21, 0xdc, 0x24, 0x24, 0xaf, 0x07, 0xb1, 0x5c, 0x0f, + 0x66, 0xb9, 0x1e, 0x54, 0xad, 0x7f, 0x01, 0xd8, 0x71, 0x12, 0x97, 0x3b, 0x1e, 0x32, 0x2b, 0x30, + 0x6a, 0x70, 0x1b, 0xa9, 0xe9, 0xa1, 0x3b, 0x5c, 0x0f, 0x9b, 0x9b, 0x82, 0x90, 0x4c, 0x4f, 0x62, + 0x03, 0x9b, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x9c, 0xb8, 0x85, 0x17, 0x01, 0x00, + 0x00, +} diff --git a/vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.validate.go b/vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.validate.go new file mode 100644 index 0000000000..b1619e448d --- /dev/null +++ b/vendor/github.com/cncf/udpa/go/udpa/annotations/versioning.pb.validate.go @@ -0,0 +1,106 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: udpa/annotations/versioning.proto + +package udpa_annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _versioning_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on VersioningAnnotation with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *VersioningAnnotation) Validate() error { + if m == nil { + return nil + } + + // no validation rules for PreviousMessageType + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go new file mode 100644 index 0000000000..a776aef702 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/annotations/deprecation.proto + +package envoy_annotations + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +var E_DisallowedByDefault = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.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", +} + +var E_DisallowedByDefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.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", +} + +func init() { + proto.RegisterExtension(E_DisallowedByDefault) + proto.RegisterExtension(E_DisallowedByDefaultEnum) +} + +func init() { + proto.RegisterFile("envoy/annotations/deprecation.proto", fileDescriptor_2fd079940089e0eb) +} + +var fileDescriptor_2fd079940089e0eb = []byte{ + // 197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02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3d, 0x1b, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.validate.go new file mode 100644 index 0000000000..3763df8b63 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.validate.go @@ -0,0 +1,37 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/annotations/deprecation.proto + +package envoy_annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _deprecation_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go new file mode 100644 index 0000000000..c8bd8ea19d --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go @@ -0,0 +1,92 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/annotations/resource.proto + +package envoy_annotations + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type ResourceAnnotation struct { + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResourceAnnotation) Reset() { *m = ResourceAnnotation{} } +func (m *ResourceAnnotation) String() string { return proto.CompactTextString(m) } +func (*ResourceAnnotation) ProtoMessage() {} +func (*ResourceAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_faafdcff915d6055, []int{0} +} + +func (m *ResourceAnnotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResourceAnnotation.Unmarshal(m, b) +} +func (m *ResourceAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResourceAnnotation.Marshal(b, m, deterministic) +} +func (m *ResourceAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceAnnotation.Merge(m, src) +} +func (m *ResourceAnnotation) XXX_Size() int { + return xxx_messageInfo_ResourceAnnotation.Size(m) +} +func (m *ResourceAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceAnnotation proto.InternalMessageInfo + +func (m *ResourceAnnotation) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +var E_Resource = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.ServiceOptions)(nil), + ExtensionType: (*ResourceAnnotation)(nil), + Field: 265073217, + Name: "envoy.annotations.resource", + Tag: "bytes,265073217,opt,name=resource", + Filename: "envoy/annotations/resource.proto", +} + +func init() { + proto.RegisterType((*ResourceAnnotation)(nil), "envoy.annotations.ResourceAnnotation") + proto.RegisterExtension(E_Resource) +} + +func init() { proto.RegisterFile("envoy/annotations/resource.proto", fileDescriptor_faafdcff915d6055) } + +var fileDescriptor_faafdcff915d6055 = []byte{ + // 172 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x4a, + 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x04, 0xab, + 0xd0, 0x43, 0x52, 0x21, 0xa5, 0x90, 0x9e, 0x9f, 0x9f, 0x9e, 0x93, 0xaa, 0x0f, 0x56, 0x90, 0x54, + 0x9a, 0xa6, 0x9f, 0x92, 0x5a, 0x9c, 0x5c, 0x94, 0x59, 0x50, 0x92, 0x5f, 0x04, 0xd1, 0xa4, 0xa4, + 0xc1, 0x25, 0x14, 0x04, 0x35, 0xc6, 0x11, 0xae, 0x51, 0x48, 0x88, 0x8b, 0xa5, 0xa4, 0xb2, 0x20, + 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xcc, 0xb6, 0x4a, 0xe5, 0xe2, 0x80, 0x59, 0x28, + 0x24, 0xaf, 0x07, 0x31, 0x58, 0x0f, 0x66, 0xb0, 0x5e, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, + 0x7f, 0x01, 0xd8, 0x62, 0x89, 0x83, 0x4f, 0x36, 0xd5, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0xa9, 0xea, + 0x61, 0xb8, 0x4a, 0x0f, 0xd3, 0xc2, 0x20, 0xb8, 0xd1, 0x49, 0x6c, 0x60, 0x23, 0x8d, 0x01, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x54, 0xc9, 0x37, 0x66, 0xf0, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.validate.go new file mode 100644 index 0000000000..73661769e8 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.validate.go @@ -0,0 +1,106 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/annotations/resource.proto + +package envoy_annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _resource_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on ResourceAnnotation with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ResourceAnnotation) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Type + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go index bc9ea07457..7355736891 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go @@ -1,20 +1,20 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/auth/cert.proto -package auth +package envoy_api_v2_auth import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + duration "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,21 +26,16 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type TlsParameters_TlsProtocol int32 const ( - // Envoy will choose the optimal TLS version. TlsParameters_TLS_AUTO TlsParameters_TlsProtocol = 0 - // TLS 1.0 - TlsParameters_TLSv1_0 TlsParameters_TlsProtocol = 1 - // TLS 1.1 - TlsParameters_TLSv1_1 TlsParameters_TlsProtocol = 2 - // TLS 1.2 - TlsParameters_TLSv1_2 TlsParameters_TlsProtocol = 3 - // TLS 1.3 - TlsParameters_TLSv1_3 TlsParameters_TlsProtocol = 4 + TlsParameters_TLSv1_0 TlsParameters_TlsProtocol = 1 + TlsParameters_TLSv1_1 TlsParameters_TlsProtocol = 2 + TlsParameters_TLSv1_2 TlsParameters_TlsProtocol = 3 + TlsParameters_TLSv1_3 TlsParameters_TlsProtocol = 4 ) var TlsParameters_TlsProtocol_name = map[int32]string{ @@ -67,70 +62,39 @@ func (TlsParameters_TlsProtocol) EnumDescriptor() ([]byte, []int) { return fileDescriptor_0c3851c0865b2745, []int{0, 0} } +type CertificateValidationContext_TrustChainVerification int32 + +const ( + CertificateValidationContext_VERIFY_TRUST_CHAIN CertificateValidationContext_TrustChainVerification = 0 + CertificateValidationContext_ACCEPT_UNTRUSTED CertificateValidationContext_TrustChainVerification = 1 +) + +var CertificateValidationContext_TrustChainVerification_name = map[int32]string{ + 0: "VERIFY_TRUST_CHAIN", + 1: "ACCEPT_UNTRUSTED", +} + +var CertificateValidationContext_TrustChainVerification_value = map[string]int32{ + "VERIFY_TRUST_CHAIN": 0, + "ACCEPT_UNTRUSTED": 1, +} + +func (x CertificateValidationContext_TrustChainVerification) String() string { + return proto.EnumName(CertificateValidationContext_TrustChainVerification_name, int32(x)) +} + +func (CertificateValidationContext_TrustChainVerification) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0c3851c0865b2745, []int{4, 0} +} + type TlsParameters struct { - // Minimum TLS protocol version. By default, it's ``TLSv1_0``. TlsMinimumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,1,opt,name=tls_minimum_protocol_version,json=tlsMinimumProtocolVersion,proto3,enum=envoy.api.v2.auth.TlsParameters_TlsProtocol" json:"tls_minimum_protocol_version,omitempty"` - // Maximum TLS protocol version. By default, it's ``TLSv1_3`` for servers in non-FIPS builds, and - // ``TLSv1_2`` for clients and for servers using :ref:`BoringSSL FIPS `. TlsMaximumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,2,opt,name=tls_maximum_protocol_version,json=tlsMaximumProtocolVersion,proto3,enum=envoy.api.v2.auth.TlsParameters_TlsProtocol" json:"tls_maximum_protocol_version,omitempty"` - // If specified, the TLS listener will only support the specified `cipher list - // `_ - // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). If not - // specified, the default list will be used. - // - // In non-FIPS builds, the default cipher list is: - // - // .. code-block:: none - // - // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] - // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] - // ECDHE-ECDSA-AES128-SHA - // ECDHE-RSA-AES128-SHA - // AES128-GCM-SHA256 - // AES128-SHA - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // ECDHE-ECDSA-AES256-SHA - // ECDHE-RSA-AES256-SHA - // AES256-GCM-SHA384 - // AES256-SHA - // - // In builds using :ref:`BoringSSL FIPS `, the default cipher list is: - // - // .. code-block:: none - // - // ECDHE-ECDSA-AES128-GCM-SHA256 - // ECDHE-RSA-AES128-GCM-SHA256 - // ECDHE-ECDSA-AES128-SHA - // ECDHE-RSA-AES128-SHA - // AES128-GCM-SHA256 - // AES128-SHA - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // ECDHE-ECDSA-AES256-SHA - // ECDHE-RSA-AES256-SHA - // AES256-GCM-SHA384 - // AES256-SHA - CipherSuites []string `protobuf:"bytes,3,rep,name=cipher_suites,json=cipherSuites,proto3" json:"cipher_suites,omitempty"` - // If specified, the TLS connection will only support the specified ECDH - // curves. If not specified, the default curves will be used. - // - // In non-FIPS builds, the default curves are: - // - // .. code-block:: none - // - // X25519 - // P-256 - // - // In builds using :ref:`BoringSSL FIPS `, the default curve is: - // - // .. code-block:: none - // - // P-256 - EcdhCurves []string `protobuf:"bytes,4,rep,name=ecdh_curves,json=ecdhCurves,proto3" json:"ecdh_curves,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CipherSuites []string `protobuf:"bytes,3,rep,name=cipher_suites,json=cipherSuites,proto3" json:"cipher_suites,omitempty"` + EcdhCurves []string `protobuf:"bytes,4,rep,name=ecdh_curves,json=ecdhCurves,proto3" json:"ecdh_curves,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TlsParameters) Reset() { *m = TlsParameters{} } @@ -139,26 +103,18 @@ func (*TlsParameters) ProtoMessage() {} func (*TlsParameters) Descriptor() ([]byte, []int) { return fileDescriptor_0c3851c0865b2745, []int{0} } + func (m *TlsParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TlsParameters.Unmarshal(m, b) } func (m *TlsParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TlsParameters.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TlsParameters.Marshal(b, m, deterministic) } func (m *TlsParameters) XXX_Merge(src proto.Message) { xxx_messageInfo_TlsParameters.Merge(m, src) } func (m *TlsParameters) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TlsParameters.Size(m) } func (m *TlsParameters) XXX_DiscardUnknown() { xxx_messageInfo_TlsParameters.DiscardUnknown(m) @@ -194,49 +150,125 @@ func (m *TlsParameters) GetEcdhCurves() []string { return nil } +type PrivateKeyProvider struct { + ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *PrivateKeyProvider_Config + // *PrivateKeyProvider_TypedConfig + ConfigType isPrivateKeyProvider_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PrivateKeyProvider) Reset() { *m = PrivateKeyProvider{} } +func (m *PrivateKeyProvider) String() string { return proto.CompactTextString(m) } +func (*PrivateKeyProvider) ProtoMessage() {} +func (*PrivateKeyProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_0c3851c0865b2745, []int{1} +} + +func (m *PrivateKeyProvider) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PrivateKeyProvider.Unmarshal(m, b) +} +func (m *PrivateKeyProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PrivateKeyProvider.Marshal(b, m, deterministic) +} +func (m *PrivateKeyProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrivateKeyProvider.Merge(m, src) +} +func (m *PrivateKeyProvider) XXX_Size() int { + return xxx_messageInfo_PrivateKeyProvider.Size(m) +} +func (m *PrivateKeyProvider) XXX_DiscardUnknown() { + xxx_messageInfo_PrivateKeyProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_PrivateKeyProvider proto.InternalMessageInfo + +func (m *PrivateKeyProvider) GetProviderName() string { + if m != nil { + return m.ProviderName + } + return "" +} + +type isPrivateKeyProvider_ConfigType interface { + isPrivateKeyProvider_ConfigType() +} + +type PrivateKeyProvider_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type PrivateKeyProvider_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*PrivateKeyProvider_Config) isPrivateKeyProvider_ConfigType() {} + +func (*PrivateKeyProvider_TypedConfig) isPrivateKeyProvider_ConfigType() {} + +func (m *PrivateKeyProvider) GetConfigType() isPrivateKeyProvider_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *PrivateKeyProvider) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*PrivateKeyProvider_Config); ok { + return x.Config + } + return nil +} + +func (m *PrivateKeyProvider) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*PrivateKeyProvider_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*PrivateKeyProvider) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*PrivateKeyProvider_Config)(nil), + (*PrivateKeyProvider_TypedConfig)(nil), + } +} + type TlsCertificate struct { - // The TLS certificate chain. - CertificateChain *core.DataSource `protobuf:"bytes,1,opt,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // The TLS private key. - PrivateKey *core.DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // The password to decrypt the TLS private key. If this field is not set, it is assumed that the - // TLS private key is not password encrypted. - Password *core.DataSource `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - // [#not-implemented-hide:] - OcspStaple *core.DataSource `protobuf:"bytes,4,opt,name=ocsp_staple,json=ocspStaple,proto3" json:"ocsp_staple,omitempty"` - // [#not-implemented-hide:] - SignedCertificateTimestamp []*core.DataSource `protobuf:"bytes,5,rep,name=signed_certificate_timestamp,json=signedCertificateTimestamp,proto3" json:"signed_certificate_timestamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CertificateChain *core.DataSource `protobuf:"bytes,1,opt,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` + PrivateKey *core.DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + PrivateKeyProvider *PrivateKeyProvider `protobuf:"bytes,6,opt,name=private_key_provider,json=privateKeyProvider,proto3" json:"private_key_provider,omitempty"` + Password *core.DataSource `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + OcspStaple *core.DataSource `protobuf:"bytes,4,opt,name=ocsp_staple,json=ocspStaple,proto3" json:"ocsp_staple,omitempty"` + SignedCertificateTimestamp []*core.DataSource `protobuf:"bytes,5,rep,name=signed_certificate_timestamp,json=signedCertificateTimestamp,proto3" json:"signed_certificate_timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TlsCertificate) Reset() { *m = TlsCertificate{} } func (m *TlsCertificate) String() string { return proto.CompactTextString(m) } func (*TlsCertificate) ProtoMessage() {} func (*TlsCertificate) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{1} + return fileDescriptor_0c3851c0865b2745, []int{2} } + func (m *TlsCertificate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TlsCertificate.Unmarshal(m, b) } func (m *TlsCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TlsCertificate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TlsCertificate.Marshal(b, m, deterministic) } func (m *TlsCertificate) XXX_Merge(src proto.Message) { xxx_messageInfo_TlsCertificate.Merge(m, src) } func (m *TlsCertificate) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TlsCertificate.Size(m) } func (m *TlsCertificate) XXX_DiscardUnknown() { xxx_messageInfo_TlsCertificate.DiscardUnknown(m) @@ -258,6 +290,13 @@ func (m *TlsCertificate) GetPrivateKey() *core.DataSource { return nil } +func (m *TlsCertificate) GetPrivateKeyProvider() *PrivateKeyProvider { + if m != nil { + return m.PrivateKeyProvider + } + return nil +} + func (m *TlsCertificate) GetPassword() *core.DataSource { if m != nil { return m.Password @@ -280,29 +319,6 @@ func (m *TlsCertificate) GetSignedCertificateTimestamp() []*core.DataSource { } type TlsSessionTicketKeys struct { - // Keys for encrypting and decrypting TLS session tickets. The - // first key in the array contains the key to encrypt all new sessions created by this context. - // All keys are candidates for decrypting received tickets. This allows for easy rotation of keys - // by, for example, putting the new key first, and the previous key second. - // - // If :ref:`session_ticket_keys ` - // is not specified, the TLS library will still support resuming sessions via tickets, but it will - // use an internally-generated and managed key, so sessions cannot be resumed across hot restarts - // or on different hosts. - // - // Each key must contain exactly 80 bytes of cryptographically-secure random data. For - // example, the output of ``openssl rand 80``. - // - // .. attention:: - // - // Using this feature has serious security considerations and risks. Improper handling of keys - // may result in loss of secrecy in connections, even if ciphers supporting perfect forward - // secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some - // discussion. To minimize the risk, you must: - // - // * Keep the session ticket keys at least as secure as your TLS certificate private keys - // * Rotate session ticket keys at least daily, and preferably hourly - // * Always generate keys using a cryptographically-secure random data source Keys []*core.DataSource `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -313,28 +329,20 @@ func (m *TlsSessionTicketKeys) Reset() { *m = TlsSessionTicketKeys{} } func (m *TlsSessionTicketKeys) String() string { return proto.CompactTextString(m) } func (*TlsSessionTicketKeys) ProtoMessage() {} func (*TlsSessionTicketKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{2} + return fileDescriptor_0c3851c0865b2745, []int{3} } + func (m *TlsSessionTicketKeys) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TlsSessionTicketKeys.Unmarshal(m, b) } func (m *TlsSessionTicketKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TlsSessionTicketKeys.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TlsSessionTicketKeys.Marshal(b, m, deterministic) } func (m *TlsSessionTicketKeys) XXX_Merge(src proto.Message) { xxx_messageInfo_TlsSessionTicketKeys.Merge(m, src) } func (m *TlsSessionTicketKeys) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TlsSessionTicketKeys.Size(m) } func (m *TlsSessionTicketKeys) XXX_DiscardUnknown() { xxx_messageInfo_TlsSessionTicketKeys.DiscardUnknown(m) @@ -350,136 +358,39 @@ func (m *TlsSessionTicketKeys) GetKeys() []*core.DataSource { } type CertificateValidationContext struct { - // TLS certificate data containing certificate authority certificates to use in verifying - // a presented peer certificate (e.g. server certificate for clusters or client certificate - // for listeners). If not specified and a peer certificate is presented it will not be - // verified. By default, a client certificate is optional, unless one of the additional - // options (:ref:`require_client_certificate - // `, - // :ref:`verify_certificate_spki - // `, - // :ref:`verify_certificate_hash - // `, or - // :ref:`verify_subject_alt_name - // `) is also - // specified. - // - // It can optionally contain certificate revocation lists, in which case Envoy will verify - // that the presented peer certificate has not been revoked by one of the included CRLs. - // - // See :ref:`the TLS overview ` for a list of common - // system CA locations. - TrustedCa *core.DataSource `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"` - // An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the - // SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate - // matches one of the specified values. - // - // A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -pubkey \ - // | openssl pkey -pubin -outform DER \ - // | openssl dgst -sha256 -binary \ - // | openssl enc -base64 - // NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= - // - // This is the format used in HTTP Public Key Pinning. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - // - // .. attention:: - // - // This option is preferred over :ref:`verify_certificate_hash - // `, - // because SPKI is tied to a private key, so it doesn't change when the certificate - // is renewed using the same private key. - VerifyCertificateSpki []string `protobuf:"bytes,3,rep,name=verify_certificate_spki,json=verifyCertificateSpki,proto3" json:"verify_certificate_spki,omitempty"` - // An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that - // the SHA-256 of the DER-encoded presented certificate matches one of the specified values. - // - // A hex-encoded SHA-256 of the certificate can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 - // df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a - // - // A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 - // DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A - // - // Both of those formats are acceptable. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - VerifyCertificateHash []string `protobuf:"bytes,2,rep,name=verify_certificate_hash,json=verifyCertificateHash,proto3" json:"verify_certificate_hash,omitempty"` - // An optional list of Subject Alternative Names. If specified, Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified values. - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - VerifySubjectAltName []string `protobuf:"bytes,4,rep,name=verify_subject_alt_name,json=verifySubjectAltName,proto3" json:"verify_subject_alt_name,omitempty"` - // [#not-implemented-hide:] Must present a signed time-stamped OCSP response. - RequireOcspStaple *types.BoolValue `protobuf:"bytes,5,opt,name=require_ocsp_staple,json=requireOcspStaple,proto3" json:"require_ocsp_staple,omitempty"` - // [#not-implemented-hide:] Must present signed certificate time-stamp. - RequireSignedCertificateTimestamp *types.BoolValue `protobuf:"bytes,6,opt,name=require_signed_certificate_timestamp,json=requireSignedCertificateTimestamp,proto3" json:"require_signed_certificate_timestamp,omitempty"` - // An optional `certificate revocation list - // `_ - // (in PEM format). If specified, Envoy will verify that the presented peer - // certificate has not been revoked by this CRL. If this DataSource contains - // multiple CRLs, all of them will be used. - Crl *core.DataSource `protobuf:"bytes,7,opt,name=crl,proto3" json:"crl,omitempty"` - // If specified, Envoy will not reject expired certificates. - AllowExpiredCertificate bool `protobuf:"varint,8,opt,name=allow_expired_certificate,json=allowExpiredCertificate,proto3" json:"allow_expired_certificate,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + TrustedCa *core.DataSource `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"` + VerifyCertificateSpki []string `protobuf:"bytes,3,rep,name=verify_certificate_spki,json=verifyCertificateSpki,proto3" json:"verify_certificate_spki,omitempty"` + VerifyCertificateHash []string `protobuf:"bytes,2,rep,name=verify_certificate_hash,json=verifyCertificateHash,proto3" json:"verify_certificate_hash,omitempty"` + VerifySubjectAltName []string `protobuf:"bytes,4,rep,name=verify_subject_alt_name,json=verifySubjectAltName,proto3" json:"verify_subject_alt_name,omitempty"` // Deprecated: Do not use. + MatchSubjectAltNames []*matcher.StringMatcher `protobuf:"bytes,9,rep,name=match_subject_alt_names,json=matchSubjectAltNames,proto3" json:"match_subject_alt_names,omitempty"` + RequireOcspStaple *wrappers.BoolValue `protobuf:"bytes,5,opt,name=require_ocsp_staple,json=requireOcspStaple,proto3" json:"require_ocsp_staple,omitempty"` + RequireSignedCertificateTimestamp *wrappers.BoolValue `protobuf:"bytes,6,opt,name=require_signed_certificate_timestamp,json=requireSignedCertificateTimestamp,proto3" json:"require_signed_certificate_timestamp,omitempty"` + Crl *core.DataSource `protobuf:"bytes,7,opt,name=crl,proto3" json:"crl,omitempty"` + AllowExpiredCertificate bool `protobuf:"varint,8,opt,name=allow_expired_certificate,json=allowExpiredCertificate,proto3" json:"allow_expired_certificate,omitempty"` + TrustChainVerification CertificateValidationContext_TrustChainVerification `protobuf:"varint,10,opt,name=trust_chain_verification,json=trustChainVerification,proto3,enum=envoy.api.v2.auth.CertificateValidationContext_TrustChainVerification" json:"trust_chain_verification,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CertificateValidationContext) Reset() { *m = CertificateValidationContext{} } func (m *CertificateValidationContext) String() string { return proto.CompactTextString(m) } func (*CertificateValidationContext) ProtoMessage() {} func (*CertificateValidationContext) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{3} + return fileDescriptor_0c3851c0865b2745, []int{4} } + func (m *CertificateValidationContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CertificateValidationContext.Unmarshal(m, b) } func (m *CertificateValidationContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CertificateValidationContext.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CertificateValidationContext.Marshal(b, m, deterministic) } func (m *CertificateValidationContext) XXX_Merge(src proto.Message) { xxx_messageInfo_CertificateValidationContext.Merge(m, src) } func (m *CertificateValidationContext) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CertificateValidationContext.Size(m) } func (m *CertificateValidationContext) XXX_DiscardUnknown() { xxx_messageInfo_CertificateValidationContext.DiscardUnknown(m) @@ -508,6 +419,7 @@ func (m *CertificateValidationContext) GetVerifyCertificateHash() []string { return nil } +// Deprecated: Do not use. func (m *CertificateValidationContext) GetVerifySubjectAltName() []string { if m != nil { return m.VerifySubjectAltName @@ -515,14 +427,21 @@ func (m *CertificateValidationContext) GetVerifySubjectAltName() []string { return nil } -func (m *CertificateValidationContext) GetRequireOcspStaple() *types.BoolValue { +func (m *CertificateValidationContext) GetMatchSubjectAltNames() []*matcher.StringMatcher { + if m != nil { + return m.MatchSubjectAltNames + } + return nil +} + +func (m *CertificateValidationContext) GetRequireOcspStaple() *wrappers.BoolValue { if m != nil { return m.RequireOcspStaple } return nil } -func (m *CertificateValidationContext) GetRequireSignedCertificateTimestamp() *types.BoolValue { +func (m *CertificateValidationContext) GetRequireSignedCertificateTimestamp() *wrappers.BoolValue { if m != nil { return m.RequireSignedCertificateTimestamp } @@ -543,66 +462,46 @@ func (m *CertificateValidationContext) GetAllowExpiredCertificate() bool { return false } -// TLS context shared by both client and server TLS contexts. +func (m *CertificateValidationContext) GetTrustChainVerification() CertificateValidationContext_TrustChainVerification { + if m != nil { + return m.TrustChainVerification + } + return CertificateValidationContext_VERIFY_TRUST_CHAIN +} + type CommonTlsContext struct { - // TLS protocol versions, cipher suites etc. - TlsParams *TlsParameters `protobuf:"bytes,1,opt,name=tls_params,json=tlsParams,proto3" json:"tls_params,omitempty"` - // :ref:`Multiple TLS certificates ` can be associated with the - // same context to allow both RSA and ECDSA certificates. - // - // Only a single TLS certificate is supported in client contexts. In server contexts, the first - // RSA certificate is used for clients that only support RSA and the first ECDSA certificate is - // used for clients that support ECDSA. - TlsCertificates []*TlsCertificate `protobuf:"bytes,2,rep,name=tls_certificates,json=tlsCertificates,proto3" json:"tls_certificates,omitempty"` - // Configs for fetching TLS certificates via SDS API. + TlsParams *TlsParameters `protobuf:"bytes,1,opt,name=tls_params,json=tlsParams,proto3" json:"tls_params,omitempty"` + TlsCertificates []*TlsCertificate `protobuf:"bytes,2,rep,name=tls_certificates,json=tlsCertificates,proto3" json:"tls_certificates,omitempty"` TlsCertificateSdsSecretConfigs []*SdsSecretConfig `protobuf:"bytes,6,rep,name=tls_certificate_sds_secret_configs,json=tlsCertificateSdsSecretConfigs,proto3" json:"tls_certificate_sds_secret_configs,omitempty"` // Types that are valid to be assigned to ValidationContextType: // *CommonTlsContext_ValidationContext // *CommonTlsContext_ValidationContextSdsSecretConfig // *CommonTlsContext_CombinedValidationContext ValidationContextType isCommonTlsContext_ValidationContextType `protobuf_oneof:"validation_context_type"` - // Supplies the list of ALPN protocols that the listener should expose. In - // practice this is likely to be set to one of two values (see the - // :ref:`codec_type - // ` - // parameter in the HTTP connection manager for more information): - // - // * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1. - // * "http/1.1" If the listener is only going to support HTTP/1.1. - // - // There is no default for this parameter. If empty, Envoy will not expose ALPN. - AlpnProtocols []string `protobuf:"bytes,4,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AlpnProtocols []string `protobuf:"bytes,4,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CommonTlsContext) Reset() { *m = CommonTlsContext{} } func (m *CommonTlsContext) String() string { return proto.CompactTextString(m) } func (*CommonTlsContext) ProtoMessage() {} func (*CommonTlsContext) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{4} + return fileDescriptor_0c3851c0865b2745, []int{5} } + func (m *CommonTlsContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CommonTlsContext.Unmarshal(m, b) } func (m *CommonTlsContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommonTlsContext.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CommonTlsContext.Marshal(b, m, deterministic) } func (m *CommonTlsContext) XXX_Merge(src proto.Message) { xxx_messageInfo_CommonTlsContext.Merge(m, src) } func (m *CommonTlsContext) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CommonTlsContext.Size(m) } func (m *CommonTlsContext) XXX_DiscardUnknown() { xxx_messageInfo_CommonTlsContext.DiscardUnknown(m) @@ -610,34 +509,6 @@ func (m *CommonTlsContext) XXX_DiscardUnknown() { var xxx_messageInfo_CommonTlsContext proto.InternalMessageInfo -type isCommonTlsContext_ValidationContextType interface { - isCommonTlsContext_ValidationContextType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type CommonTlsContext_ValidationContext struct { - ValidationContext *CertificateValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext,proto3,oneof"` -} -type CommonTlsContext_ValidationContextSdsSecretConfig struct { - ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,7,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3,oneof"` -} -type CommonTlsContext_CombinedValidationContext struct { - CombinedValidationContext *CommonTlsContext_CombinedCertificateValidationContext `protobuf:"bytes,8,opt,name=combined_validation_context,json=combinedValidationContext,proto3,oneof"` -} - -func (*CommonTlsContext_ValidationContext) isCommonTlsContext_ValidationContextType() {} -func (*CommonTlsContext_ValidationContextSdsSecretConfig) isCommonTlsContext_ValidationContextType() {} -func (*CommonTlsContext_CombinedValidationContext) isCommonTlsContext_ValidationContextType() {} - -func (m *CommonTlsContext) GetValidationContextType() isCommonTlsContext_ValidationContextType { - if m != nil { - return m.ValidationContextType - } - return nil -} - func (m *CommonTlsContext) GetTlsParams() *TlsParameters { if m != nil { return m.TlsParams @@ -659,6 +530,35 @@ func (m *CommonTlsContext) GetTlsCertificateSdsSecretConfigs() []*SdsSecretConfi return nil } +type isCommonTlsContext_ValidationContextType interface { + isCommonTlsContext_ValidationContextType() +} + +type CommonTlsContext_ValidationContext struct { + ValidationContext *CertificateValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext,proto3,oneof"` +} + +type CommonTlsContext_ValidationContextSdsSecretConfig struct { + ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,7,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3,oneof"` +} + +type CommonTlsContext_CombinedValidationContext struct { + CombinedValidationContext *CommonTlsContext_CombinedCertificateValidationContext `protobuf:"bytes,8,opt,name=combined_validation_context,json=combinedValidationContext,proto3,oneof"` +} + +func (*CommonTlsContext_ValidationContext) isCommonTlsContext_ValidationContextType() {} + +func (*CommonTlsContext_ValidationContextSdsSecretConfig) isCommonTlsContext_ValidationContextType() {} + +func (*CommonTlsContext_CombinedValidationContext) isCommonTlsContext_ValidationContextType() {} + +func (m *CommonTlsContext) GetValidationContextType() isCommonTlsContext_ValidationContextType { + if m != nil { + return m.ValidationContextType + } + return nil +} + func (m *CommonTlsContext) GetValidationContext() *CertificateValidationContext { if x, ok := m.GetValidationContextType().(*CommonTlsContext_ValidationContext); ok { return x.ValidationContext @@ -687,107 +587,21 @@ func (m *CommonTlsContext) GetAlpnProtocols() []string { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CommonTlsContext) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _CommonTlsContext_OneofMarshaler, _CommonTlsContext_OneofUnmarshaler, _CommonTlsContext_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CommonTlsContext) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*CommonTlsContext_ValidationContext)(nil), (*CommonTlsContext_ValidationContextSdsSecretConfig)(nil), (*CommonTlsContext_CombinedValidationContext)(nil), } } -func _CommonTlsContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CommonTlsContext) - // validation_context_type - switch x := m.ValidationContextType.(type) { - case *CommonTlsContext_ValidationContext: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ValidationContext); err != nil { - return err - } - case *CommonTlsContext_ValidationContextSdsSecretConfig: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ValidationContextSdsSecretConfig); err != nil { - return err - } - case *CommonTlsContext_CombinedValidationContext: - _ = b.EncodeVarint(8<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.CombinedValidationContext); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("CommonTlsContext.ValidationContextType has unexpected type %T", x) - } - return nil -} - -func _CommonTlsContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CommonTlsContext) - switch tag { - case 3: // validation_context_type.validation_context - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(CertificateValidationContext) - err := b.DecodeMessage(msg) - m.ValidationContextType = &CommonTlsContext_ValidationContext{msg} - return true, err - case 7: // validation_context_type.validation_context_sds_secret_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SdsSecretConfig) - err := b.DecodeMessage(msg) - m.ValidationContextType = &CommonTlsContext_ValidationContextSdsSecretConfig{msg} - return true, err - case 8: // validation_context_type.combined_validation_context - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(CommonTlsContext_CombinedCertificateValidationContext) - err := b.DecodeMessage(msg) - m.ValidationContextType = &CommonTlsContext_CombinedValidationContext{msg} - return true, err - default: - return false, nil - } -} - -func _CommonTlsContext_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CommonTlsContext) - // validation_context_type - switch x := m.ValidationContextType.(type) { - case *CommonTlsContext_ValidationContext: - s := proto.Size(x.ValidationContext) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *CommonTlsContext_ValidationContextSdsSecretConfig: - s := proto.Size(x.ValidationContextSdsSecretConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *CommonTlsContext_CombinedValidationContext: - s := proto.Size(x.CombinedValidationContext) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type CommonTlsContext_CombinedCertificateValidationContext struct { - // How to validate peer certificates. - DefaultValidationContext *CertificateValidationContext `protobuf:"bytes,1,opt,name=default_validation_context,json=defaultValidationContext,proto3" json:"default_validation_context,omitempty"` - // Config for fetching validation context via SDS API. - ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,2,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3" json:"validation_context_sds_secret_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + DefaultValidationContext *CertificateValidationContext `protobuf:"bytes,1,opt,name=default_validation_context,json=defaultValidationContext,proto3" json:"default_validation_context,omitempty"` + ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,2,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3" json:"validation_context_sds_secret_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CommonTlsContext_CombinedCertificateValidationContext) Reset() { @@ -798,28 +612,20 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) String() string } func (*CommonTlsContext_CombinedCertificateValidationContext) ProtoMessage() {} func (*CommonTlsContext_CombinedCertificateValidationContext) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{4, 0} + return fileDescriptor_0c3851c0865b2745, []int{5, 0} } + func (m *CommonTlsContext_CombinedCertificateValidationContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CommonTlsContext_CombinedCertificateValidationContext.Unmarshal(m, b) } func (m *CommonTlsContext_CombinedCertificateValidationContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommonTlsContext_CombinedCertificateValidationContext.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CommonTlsContext_CombinedCertificateValidationContext.Marshal(b, m, deterministic) } func (m *CommonTlsContext_CombinedCertificateValidationContext) XXX_Merge(src proto.Message) { xxx_messageInfo_CommonTlsContext_CombinedCertificateValidationContext.Merge(m, src) } func (m *CommonTlsContext_CombinedCertificateValidationContext) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CommonTlsContext_CombinedCertificateValidationContext.Size(m) } func (m *CommonTlsContext_CombinedCertificateValidationContext) XXX_DiscardUnknown() { xxx_messageInfo_CommonTlsContext_CombinedCertificateValidationContext.DiscardUnknown(m) @@ -842,52 +648,33 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) GetValidationCon } type UpstreamTlsContext struct { - // Common TLS context settings. - CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"` - // SNI string to use when creating TLS backend connections. - Sni string `protobuf:"bytes,2,opt,name=sni,proto3" json:"sni,omitempty"` - // If true, server-initiated TLS renegotiation will be allowed. - // - // .. attention:: - // - // TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. - AllowRenegotiation bool `protobuf:"varint,3,opt,name=allow_renegotiation,json=allowRenegotiation,proto3" json:"allow_renegotiation,omitempty"` - // Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets - // for TLSv1.2 and older) to store for the purpose of session resumption. - // - // Defaults to 1, setting this to 0 disables session resumption. - MaxSessionKeys *types.UInt32Value `protobuf:"bytes,4,opt,name=max_session_keys,json=maxSessionKeys,proto3" json:"max_session_keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"` + Sni string `protobuf:"bytes,2,opt,name=sni,proto3" json:"sni,omitempty"` + AllowRenegotiation bool `protobuf:"varint,3,opt,name=allow_renegotiation,json=allowRenegotiation,proto3" json:"allow_renegotiation,omitempty"` + MaxSessionKeys *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_session_keys,json=maxSessionKeys,proto3" json:"max_session_keys,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UpstreamTlsContext) Reset() { *m = UpstreamTlsContext{} } func (m *UpstreamTlsContext) String() string { return proto.CompactTextString(m) } func (*UpstreamTlsContext) ProtoMessage() {} func (*UpstreamTlsContext) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{5} + return fileDescriptor_0c3851c0865b2745, []int{6} } + func (m *UpstreamTlsContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_UpstreamTlsContext.Unmarshal(m, b) } func (m *UpstreamTlsContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpstreamTlsContext.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_UpstreamTlsContext.Marshal(b, m, deterministic) } func (m *UpstreamTlsContext) XXX_Merge(src proto.Message) { xxx_messageInfo_UpstreamTlsContext.Merge(m, src) } func (m *UpstreamTlsContext) XXX_Size() int { - return m.Size() + return xxx_messageInfo_UpstreamTlsContext.Size(m) } func (m *UpstreamTlsContext) XXX_DiscardUnknown() { xxx_messageInfo_UpstreamTlsContext.DiscardUnknown(m) @@ -916,7 +703,7 @@ func (m *UpstreamTlsContext) GetAllowRenegotiation() bool { return false } -func (m *UpstreamTlsContext) GetMaxSessionKeys() *types.UInt32Value { +func (m *UpstreamTlsContext) GetMaxSessionKeys() *wrappers.UInt32Value { if m != nil { return m.MaxSessionKeys } @@ -924,18 +711,14 @@ func (m *UpstreamTlsContext) GetMaxSessionKeys() *types.UInt32Value { } type DownstreamTlsContext struct { - // Common TLS context settings. - CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"` - // If specified, Envoy will reject connections without a valid client - // certificate. - RequireClientCertificate *types.BoolValue `protobuf:"bytes,2,opt,name=require_client_certificate,json=requireClientCertificate,proto3" json:"require_client_certificate,omitempty"` - // If specified, Envoy will reject connections without a valid and matching SNI. - // [#not-implemented-hide:] - RequireSni *types.BoolValue `protobuf:"bytes,3,opt,name=require_sni,json=requireSni,proto3" json:"require_sni,omitempty"` + CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"` + RequireClientCertificate *wrappers.BoolValue `protobuf:"bytes,2,opt,name=require_client_certificate,json=requireClientCertificate,proto3" json:"require_client_certificate,omitempty"` + RequireSni *wrappers.BoolValue `protobuf:"bytes,3,opt,name=require_sni,json=requireSni,proto3" json:"require_sni,omitempty"` // Types that are valid to be assigned to SessionTicketKeysType: // *DownstreamTlsContext_SessionTicketKeys // *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig SessionTicketKeysType isDownstreamTlsContext_SessionTicketKeysType `protobuf_oneof:"session_ticket_keys_type"` + SessionTimeout *duration.Duration `protobuf:"bytes,6,opt,name=session_timeout,json=sessionTimeout,proto3" json:"session_timeout,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -945,28 +728,20 @@ func (m *DownstreamTlsContext) Reset() { *m = DownstreamTlsContext{} } func (m *DownstreamTlsContext) String() string { return proto.CompactTextString(m) } func (*DownstreamTlsContext) ProtoMessage() {} func (*DownstreamTlsContext) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{6} + return fileDescriptor_0c3851c0865b2745, []int{7} } + func (m *DownstreamTlsContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DownstreamTlsContext.Unmarshal(m, b) } func (m *DownstreamTlsContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DownstreamTlsContext.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_DownstreamTlsContext.Marshal(b, m, deterministic) } func (m *DownstreamTlsContext) XXX_Merge(src proto.Message) { xxx_messageInfo_DownstreamTlsContext.Merge(m, src) } func (m *DownstreamTlsContext) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DownstreamTlsContext.Size(m) } func (m *DownstreamTlsContext) XXX_DiscardUnknown() { xxx_messageInfo_DownstreamTlsContext.DiscardUnknown(m) @@ -974,31 +749,6 @@ func (m *DownstreamTlsContext) XXX_DiscardUnknown() { var xxx_messageInfo_DownstreamTlsContext proto.InternalMessageInfo -type isDownstreamTlsContext_SessionTicketKeysType interface { - isDownstreamTlsContext_SessionTicketKeysType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type DownstreamTlsContext_SessionTicketKeys struct { - SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,4,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"` -} -type DownstreamTlsContext_SessionTicketKeysSdsSecretConfig struct { - SessionTicketKeysSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,5,opt,name=session_ticket_keys_sds_secret_config,json=sessionTicketKeysSdsSecretConfig,proto3,oneof"` -} - -func (*DownstreamTlsContext_SessionTicketKeys) isDownstreamTlsContext_SessionTicketKeysType() {} -func (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) isDownstreamTlsContext_SessionTicketKeysType() { -} - -func (m *DownstreamTlsContext) GetSessionTicketKeysType() isDownstreamTlsContext_SessionTicketKeysType { - if m != nil { - return m.SessionTicketKeysType - } - return nil -} - func (m *DownstreamTlsContext) GetCommonTlsContext() *CommonTlsContext { if m != nil { return m.CommonTlsContext @@ -1006,20 +756,44 @@ func (m *DownstreamTlsContext) GetCommonTlsContext() *CommonTlsContext { return nil } -func (m *DownstreamTlsContext) GetRequireClientCertificate() *types.BoolValue { +func (m *DownstreamTlsContext) GetRequireClientCertificate() *wrappers.BoolValue { if m != nil { return m.RequireClientCertificate } return nil } -func (m *DownstreamTlsContext) GetRequireSni() *types.BoolValue { +func (m *DownstreamTlsContext) GetRequireSni() *wrappers.BoolValue { if m != nil { return m.RequireSni } return nil } +type isDownstreamTlsContext_SessionTicketKeysType interface { + isDownstreamTlsContext_SessionTicketKeysType() +} + +type DownstreamTlsContext_SessionTicketKeys struct { + SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,4,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"` +} + +type DownstreamTlsContext_SessionTicketKeysSdsSecretConfig struct { + SessionTicketKeysSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,5,opt,name=session_ticket_keys_sds_secret_config,json=sessionTicketKeysSdsSecretConfig,proto3,oneof"` +} + +func (*DownstreamTlsContext_SessionTicketKeys) isDownstreamTlsContext_SessionTicketKeysType() {} + +func (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) isDownstreamTlsContext_SessionTicketKeysType() { +} + +func (m *DownstreamTlsContext) GetSessionTicketKeysType() isDownstreamTlsContext_SessionTicketKeysType { + if m != nil { + return m.SessionTicketKeysType + } + return nil +} + func (m *DownstreamTlsContext) GetSessionTicketKeys() *TlsSessionTicketKeys { if x, ok := m.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeys); ok { return x.SessionTicketKeys @@ -1034,85 +808,61 @@ func (m *DownstreamTlsContext) GetSessionTicketKeysSdsSecretConfig() *SdsSecretC return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*DownstreamTlsContext) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _DownstreamTlsContext_OneofMarshaler, _DownstreamTlsContext_OneofUnmarshaler, _DownstreamTlsContext_OneofSizer, []interface{}{ +func (m *DownstreamTlsContext) GetSessionTimeout() *duration.Duration { + if m != nil { + return m.SessionTimeout + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*DownstreamTlsContext) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*DownstreamTlsContext_SessionTicketKeys)(nil), (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig)(nil), } } -func _DownstreamTlsContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*DownstreamTlsContext) - // session_ticket_keys_type - switch x := m.SessionTicketKeysType.(type) { - case *DownstreamTlsContext_SessionTicketKeys: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SessionTicketKeys); err != nil { - return err - } - case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SessionTicketKeysSdsSecretConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("DownstreamTlsContext.SessionTicketKeysType has unexpected type %T", x) +type GenericSecret struct { + Secret *core.DataSource `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenericSecret) Reset() { *m = GenericSecret{} } +func (m *GenericSecret) String() string { return proto.CompactTextString(m) } +func (*GenericSecret) ProtoMessage() {} +func (*GenericSecret) Descriptor() ([]byte, []int) { + return fileDescriptor_0c3851c0865b2745, []int{8} +} + +func (m *GenericSecret) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenericSecret.Unmarshal(m, b) +} +func (m *GenericSecret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenericSecret.Marshal(b, m, deterministic) +} +func (m *GenericSecret) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenericSecret.Merge(m, src) +} +func (m *GenericSecret) XXX_Size() int { + return xxx_messageInfo_GenericSecret.Size(m) +} +func (m *GenericSecret) XXX_DiscardUnknown() { + xxx_messageInfo_GenericSecret.DiscardUnknown(m) +} + +var xxx_messageInfo_GenericSecret proto.InternalMessageInfo + +func (m *GenericSecret) GetSecret() *core.DataSource { + if m != nil { + return m.Secret } return nil } -func _DownstreamTlsContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*DownstreamTlsContext) - switch tag { - case 4: // session_ticket_keys_type.session_ticket_keys - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TlsSessionTicketKeys) - err := b.DecodeMessage(msg) - m.SessionTicketKeysType = &DownstreamTlsContext_SessionTicketKeys{msg} - return true, err - case 5: // session_ticket_keys_type.session_ticket_keys_sds_secret_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SdsSecretConfig) - err := b.DecodeMessage(msg) - m.SessionTicketKeysType = &DownstreamTlsContext_SessionTicketKeysSdsSecretConfig{msg} - return true, err - default: - return false, nil - } -} - -func _DownstreamTlsContext_OneofSizer(msg proto.Message) (n int) { - m := msg.(*DownstreamTlsContext) - // session_ticket_keys_type - switch x := m.SessionTicketKeysType.(type) { - case *DownstreamTlsContext_SessionTicketKeys: - s := proto.Size(x.SessionTicketKeys) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: - s := proto.Size(x.SessionTicketKeysSdsSecretConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// [#proto-status: experimental] type SdsSecretConfig struct { - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - // When both name and config are specified, then secret can be fetched and/or reloaded via SDS. - // When only name is specified, then secret will be loaded from static resources [V2-API-DIFF]. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` SdsConfig *core.ConfigSource `protobuf:"bytes,2,opt,name=sds_config,json=sdsConfig,proto3" json:"sds_config,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1124,28 +874,20 @@ func (m *SdsSecretConfig) Reset() { *m = SdsSecretConfig{} } func (m *SdsSecretConfig) String() string { return proto.CompactTextString(m) } func (*SdsSecretConfig) ProtoMessage() {} func (*SdsSecretConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{7} + return fileDescriptor_0c3851c0865b2745, []int{9} } + func (m *SdsSecretConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_SdsSecretConfig.Unmarshal(m, b) } func (m *SdsSecretConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SdsSecretConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_SdsSecretConfig.Marshal(b, m, deterministic) } func (m *SdsSecretConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_SdsSecretConfig.Merge(m, src) } func (m *SdsSecretConfig) XXX_Size() int { - return m.Size() + return xxx_messageInfo_SdsSecretConfig.Size(m) } func (m *SdsSecretConfig) XXX_DiscardUnknown() { xxx_messageInfo_SdsSecretConfig.DiscardUnknown(m) @@ -1167,14 +909,13 @@ func (m *SdsSecretConfig) GetSdsConfig() *core.ConfigSource { return nil } -// [#proto-status: experimental] type Secret struct { - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are valid to be assigned to Type: // *Secret_TlsCertificate // *Secret_SessionTicketKeys // *Secret_ValidationContext + // *Secret_GenericSecret Type isSecret_Type `protobuf_oneof:"type"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1185,28 +926,20 @@ func (m *Secret) Reset() { *m = Secret{} } func (m *Secret) String() string { return proto.CompactTextString(m) } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3851c0865b2745, []int{8} + return fileDescriptor_0c3851c0865b2745, []int{10} } + func (m *Secret) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Secret.Unmarshal(m, b) } func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Secret.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Secret.Marshal(b, m, deterministic) } func (m *Secret) XXX_Merge(src proto.Message) { xxx_messageInfo_Secret.Merge(m, src) } func (m *Secret) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Secret.Size(m) } func (m *Secret) XXX_DiscardUnknown() { xxx_messageInfo_Secret.DiscardUnknown(m) @@ -1214,27 +947,41 @@ func (m *Secret) XXX_DiscardUnknown() { var xxx_messageInfo_Secret proto.InternalMessageInfo +func (m *Secret) GetName() string { + if m != nil { + return m.Name + } + return "" +} + type isSecret_Type interface { isSecret_Type() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type Secret_TlsCertificate struct { TlsCertificate *TlsCertificate `protobuf:"bytes,2,opt,name=tls_certificate,json=tlsCertificate,proto3,oneof"` } + type Secret_SessionTicketKeys struct { SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,3,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"` } + type Secret_ValidationContext struct { ValidationContext *CertificateValidationContext `protobuf:"bytes,4,opt,name=validation_context,json=validationContext,proto3,oneof"` } -func (*Secret_TlsCertificate) isSecret_Type() {} +type Secret_GenericSecret struct { + GenericSecret *GenericSecret `protobuf:"bytes,5,opt,name=generic_secret,json=genericSecret,proto3,oneof"` +} + +func (*Secret_TlsCertificate) isSecret_Type() {} + func (*Secret_SessionTicketKeys) isSecret_Type() {} + func (*Secret_ValidationContext) isSecret_Type() {} +func (*Secret_GenericSecret) isSecret_Type() {} + func (m *Secret) GetType() isSecret_Type { if m != nil { return m.Type @@ -1242,13 +989,6 @@ func (m *Secret) GetType() isSecret_Type { return nil } -func (m *Secret) GetName() string { - if m != nil { - return m.Name - } - return "" -} - func (m *Secret) GetTlsCertificate() *TlsCertificate { if x, ok := m.GetType().(*Secret_TlsCertificate); ok { return x.TlsCertificate @@ -1270,102 +1010,28 @@ func (m *Secret) GetValidationContext() *CertificateValidationContext { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Secret) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Secret_OneofMarshaler, _Secret_OneofUnmarshaler, _Secret_OneofSizer, []interface{}{ - (*Secret_TlsCertificate)(nil), - (*Secret_SessionTicketKeys)(nil), - (*Secret_ValidationContext)(nil), - } -} - -func _Secret_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Secret) - // type - switch x := m.Type.(type) { - case *Secret_TlsCertificate: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TlsCertificate); err != nil { - return err - } - case *Secret_SessionTicketKeys: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SessionTicketKeys); err != nil { - return err - } - case *Secret_ValidationContext: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ValidationContext); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Secret.Type has unexpected type %T", x) +func (m *Secret) GetGenericSecret() *GenericSecret { + if x, ok := m.GetType().(*Secret_GenericSecret); ok { + return x.GenericSecret } return nil } -func _Secret_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Secret) - switch tag { - case 2: // type.tls_certificate - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TlsCertificate) - err := b.DecodeMessage(msg) - m.Type = &Secret_TlsCertificate{msg} - return true, err - case 3: // type.session_ticket_keys - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TlsSessionTicketKeys) - err := b.DecodeMessage(msg) - m.Type = &Secret_SessionTicketKeys{msg} - return true, err - case 4: // type.validation_context - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(CertificateValidationContext) - err := b.DecodeMessage(msg) - m.Type = &Secret_ValidationContext{msg} - return true, err - default: - return false, nil +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Secret) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Secret_TlsCertificate)(nil), + (*Secret_SessionTicketKeys)(nil), + (*Secret_ValidationContext)(nil), + (*Secret_GenericSecret)(nil), } } -func _Secret_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Secret) - // type - switch x := m.Type.(type) { - case *Secret_TlsCertificate: - s := proto.Size(x.TlsCertificate) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Secret_SessionTicketKeys: - s := proto.Size(x.SessionTicketKeys) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Secret_ValidationContext: - s := proto.Size(x.ValidationContext) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { proto.RegisterEnum("envoy.api.v2.auth.TlsParameters_TlsProtocol", TlsParameters_TlsProtocol_name, TlsParameters_TlsProtocol_value) + proto.RegisterEnum("envoy.api.v2.auth.CertificateValidationContext_TrustChainVerification", CertificateValidationContext_TrustChainVerification_name, CertificateValidationContext_TrustChainVerification_value) proto.RegisterType((*TlsParameters)(nil), "envoy.api.v2.auth.TlsParameters") + proto.RegisterType((*PrivateKeyProvider)(nil), "envoy.api.v2.auth.PrivateKeyProvider") proto.RegisterType((*TlsCertificate)(nil), "envoy.api.v2.auth.TlsCertificate") proto.RegisterType((*TlsSessionTicketKeys)(nil), "envoy.api.v2.auth.TlsSessionTicketKeys") proto.RegisterType((*CertificateValidationContext)(nil), "envoy.api.v2.auth.CertificateValidationContext") @@ -1373,6 +1039,7 @@ func init() { proto.RegisterType((*CommonTlsContext_CombinedCertificateValidationContext)(nil), "envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext") proto.RegisterType((*UpstreamTlsContext)(nil), "envoy.api.v2.auth.UpstreamTlsContext") proto.RegisterType((*DownstreamTlsContext)(nil), "envoy.api.v2.auth.DownstreamTlsContext") + proto.RegisterType((*GenericSecret)(nil), "envoy.api.v2.auth.GenericSecret") proto.RegisterType((*SdsSecretConfig)(nil), "envoy.api.v2.auth.SdsSecretConfig") proto.RegisterType((*Secret)(nil), "envoy.api.v2.auth.Secret") } @@ -1380,3843 +1047,115 @@ func init() { func init() { proto.RegisterFile("envoy/api/v2/auth/cert.proto", fileDescriptor_0c3851c0865b2745) } var fileDescriptor_0c3851c0865b2745 = []byte{ - // 1325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 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x60, 0xa5, 0xe3, 0x89, 0x16, 0xe1, 0x92, - 0x1e, 0x50, 0x17, 0x4b, 0x82, 0xee, 0xc1, 0xaa, 0x7b, 0xb6, 0x74, 0xdc, 0x3e, 0xa6, 0x51, 0x52, - 0x4a, 0x8d, 0x57, 0x26, 0x23, 0xa3, 0x34, 0x54, 0xbb, 0x8b, 0x25, 0x6e, 0x6b, 0x01, 0xd9, 0x66, - 0xc2, 0xaf, 0xa5, 0xdc, 0xd0, 0x6d, 0x28, 0x85, 0x9c, 0x0e, 0x15, 0xce, 0x21, 0x19, 0xe9, 0xf8, - 0xce, 0x44, 0x81, 0xd8, 0xe3, 0x3e, 0x19, 0xa1, 0x37, 0xa0, 0x18, 0x62, 0x21, 0x8e, 0x18, 0xef, - 0x5a, 0xf9, 0x79, 0x9c, 0x4f, 0x8f, 0x2b, 0x6a, 0xe6, 0x8a, 0xd0, 0x11, 0x12, 0x87, 0x1e, 0xb1, - 0x0a, 0x73, 0x51, 0x2b, 0x8f, 0xb6, 0x76, 0x40, 0x0e, 0x6c, 0x0a, 0xda, 0x0b, 0x48, 0xd7, 0x49, - 0x46, 0x43, 0x52, 0x9f, 0x08, 0x89, 0xfd, 0xd0, 0x5a, 0xac, 0xe4, 0x67, 0x03, 0x96, 0x23, 0x88, - 0x44, 0x78, 0x3b, 0x63, 0x80, 0xea, 0x1e, 0xac, 0x75, 0x3c, 0xd1, 0x26, 0x42, 0xe9, 0xa3, 0x43, - 0xdd, 0x43, 0x22, 0xef, 0x93, 0x91, 0x40, 0xef, 0x40, 0xe1, 0x90, 0x8c, 0x84, 0x65, 0xcc, 0x41, - 0x10, 0xab, 0xef, 0x89, 0x91, 0x2b, 0x1a, 0xb6, 0x76, 0xab, 0xfe, 0x5a, 0x80, 0xcd, 0x04, 0xdf, - 0xa3, 0xa8, 0x48, 0x29, 0x0b, 0x5a, 0x2c, 0x90, 0xe4, 0x58, 0xa2, 0xb7, 0x01, 0x24, 0x1f, 0x08, - 0xa9, 0x5e, 0x86, 0xe7, 0x4b, 0xec, 0x72, 0xec, 0xd0, 0xc2, 0x68, 0x07, 0xd6, 0x87, 0x84, 0xd3, - 0x83, 0xd1, 0x44, 0x58, 0x44, 0x78, 0x48, 0x23, 0x45, 0x37, 0x4d, 0x75, 0xa3, 0xd2, 0x13, 0xa3, - 0x58, 0x5d, 0xe2, 0x85, 0xca, 0x8d, 0xed, 0x1b, 0xf6, 0x4b, 0x91, 0x43, 0xe2, 0x52, 0xed, 0xf0, - 0x90, 0x3e, 0x03, 0xa9, 0x8f, 0x45, 0xdf, 0xca, 0x65, 0x20, 0xbd, 0xb7, 0xed, 0x64, 0x20, 0xed, - 0x60, 0xd1, 0x47, 0xaf, 0x9f, 0x22, 0x89, 0xc1, 0xfe, 0x97, 0xc4, 0x95, 0x0e, 0xf6, 0xa4, 0x13, - 0x60, 0x9f, 0xc4, 0x25, 0xb4, 0x16, 0x99, 0xdb, 0x91, 0xf5, 0x8e, 0x27, 0x3f, 0xc6, 0xbe, 0x12, - 0xfa, 0x25, 0x4e, 0xbe, 0x1a, 0x50, 0x4e, 0x9c, 0xa4, 0x52, 0x16, 0x75, 0x44, 0xca, 0xb5, 0xa8, - 0x0f, 0xd6, 0xc6, 0x7d, 0xb0, 0xd6, 0x64, 0xcc, 0x7b, 0x84, 0xbd, 0x01, 0xb1, 0x57, 0x63, 0xb7, - 0x07, 0x67, 0x6a, 0x39, 0x84, 0x6b, 0x63, 0xac, 0xe7, 0xaa, 0x66, 0x69, 0x26, 0xf8, 0x95, 0x18, - 0xa7, 0xfd, 0x4c, 0xe5, 0xa0, 0x3a, 0xe4, 0x5d, 0xee, 0x59, 0xe7, 0xe6, 0x49, 0x9d, 0x3a, 0x89, - 0xde, 0x84, 0x0d, 0xec, 0x79, 0xec, 0xc8, 0x21, 0xc7, 0x21, 0xe5, 0x93, 0x97, 0xb3, 0x8a, 0x15, - 0x63, 0xbb, 0x68, 0xaf, 0xeb, 0x03, 0xef, 0x47, 0xf6, 0x04, 0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x78, 0x94, 0x26, 0x6b, 0x2e, - 0x2b, 0x36, 0x3d, 0x11, 0x1e, 0x1a, 0x9f, 0x17, 0xd4, 0xd6, 0xfe, 0x92, 0x16, 0xfb, 0xad, 0x7f, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xd6, 0xa7, 0x9e, 0x50, 0x0f, 0x00, 0x00, + // 1756 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x73, 0x1b, 0x49, + 0x15, 0xf7, 0x48, 0xb2, 0x22, 0x3f, 0xc5, 0xce, 0xa4, 0x63, 0xe2, 0xb1, 0xf0, 0x6e, 0xb4, 0xda, + 0xa4, 0x30, 0x45, 0x4a, 0x62, 0x9d, 0x13, 0x2c, 0x2c, 0x78, 0x94, 0x18, 0x25, 0x9b, 0x4d, 0xcc, + 0x48, 0x36, 0x9b, 0xd3, 0xd0, 0x1e, 0xb5, 0xe5, 0xc6, 0xa3, 0x99, 0xa1, 0xbb, 0x25, 0x5b, 0x55, + 0x1c, 0x5c, 0x1c, 0x97, 0x03, 0x55, 0x7b, 0xda, 0x0b, 0x37, 0x4e, 0x7c, 0x01, 0x28, 0xce, 0x1c, + 0xb8, 0xee, 0x47, 0xe0, 0xc6, 0x99, 0xa3, 0x6b, 0x0b, 0xa8, 0xee, 0x9e, 0x91, 0x47, 0x9a, 0x49, + 0xac, 0x85, 0xd4, 0xde, 0xa6, 0xfb, 0xbd, 0xf7, 0x7b, 0xfd, 0xfe, 0xbf, 0x81, 0x2d, 0x12, 0x8c, + 0xc3, 0x49, 0x0b, 0x47, 0xb4, 0x35, 0xde, 0x69, 0xe1, 0x91, 0x38, 0x69, 0x79, 0x84, 0x89, 0x66, + 0xc4, 0x42, 0x11, 0xa2, 0xdb, 0x8a, 0xda, 0xc4, 0x11, 0x6d, 0x8e, 0x77, 0x9a, 0x92, 0x5a, 0x9b, + 0x15, 0xf0, 0x42, 0x46, 0x5a, 0x47, 0x98, 0x13, 0x2d, 0x50, 0x7b, 0x90, 0xa5, 0x7a, 0x61, 0x70, + 0x4c, 0x07, 0x2e, 0x0f, 0x47, 0xcc, 0x4b, 0xd8, 0xee, 0x69, 0x36, 0x31, 0x89, 0x48, 0x6b, 0x88, + 0x85, 0x77, 0x42, 0x58, 0x8b, 0x0b, 0x46, 0x83, 0x41, 0xcc, 0xb0, 0x39, 0x08, 0xc3, 0x81, 0x4f, + 0x5a, 0xea, 0x74, 0x34, 0x3a, 0x6e, 0xe1, 0x60, 0x12, 0x93, 0xde, 0x9d, 0x27, 0xf5, 0x47, 0x0c, + 0x0b, 0x1a, 0x06, 0x31, 0x7d, 0x6b, 0x9e, 0xce, 0x05, 0x1b, 0x79, 0xe2, 0x75, 0xd2, 0x67, 0x0c, + 0x47, 0x11, 0x61, 0x3c, 0xa1, 0x8f, 0xfa, 0x11, 0x6e, 0xe1, 0x20, 0x08, 0x85, 0x02, 0xe5, 0xad, + 0x21, 0x1d, 0x30, 0x2c, 0x92, 0x97, 0xd7, 0x33, 0x74, 0x4e, 0x02, 0x4e, 0x05, 0x1d, 0x27, 0x1c, + 0xef, 0x64, 0x39, 0x04, 0x16, 0xa3, 0x44, 0xc1, 0xc6, 0x18, 0xfb, 0xb4, 0x8f, 0x05, 0x69, 0x25, + 0x1f, 0x9a, 0xd0, 0xf8, 0xa2, 0x08, 0xab, 0x3d, 0x9f, 0xef, 0x63, 0x86, 0x87, 0x44, 0x10, 0xc6, + 0xd1, 0x19, 0x6c, 0x09, 0x9f, 0xbb, 0x43, 0x1a, 0xd0, 0xe1, 0x68, 0xe8, 0x2a, 0x36, 0x2f, 0xf4, + 0xdd, 0x31, 0x61, 0x9c, 0x86, 0x81, 0x65, 0xd4, 0x8d, 0xed, 0xb5, 0x9d, 0x87, 0xcd, 0x4c, 0x90, + 0x9a, 0x33, 0x38, 0xea, 0x14, 0xcb, 0xda, 0x95, 0x4b, 0x7b, 0xf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, 0xae, 0x2f, 0x1a, 0x97, 0x05, 0x28, 0xc7, 0x0f, 0xce, 0x83, + 0x7f, 0x0e, 0xb7, 0xe6, 0x46, 0x6c, 0xac, 0xe3, 0xfa, 0x79, 0xdd, 0x59, 0x72, 0xd6, 0x66, 0xc7, + 0xe8, 0xeb, 0xf2, 0xac, 0xf8, 0x16, 0xf2, 0x2c, 0x7f, 0x22, 0x97, 0xde, 0xe2, 0x44, 0x7e, 0x0a, + 0x6b, 0x03, 0x1d, 0xe0, 0x38, 0x73, 0xe3, 0x94, 0xcd, 0x5b, 0x80, 0x66, 0x32, 0xa1, 0xb3, 0xe4, + 0xac, 0x0e, 0xd2, 0x17, 0x76, 0x19, 0x4a, 0x32, 0x67, 0xec, 0xc1, 0xbf, 0xbe, 0xf8, 0xf7, 0xef, + 0x97, 0xbf, 0x87, 0xbe, 0xab, 0x11, 0xc8, 0xb9, 0x20, 0x81, 0xb4, 0x8b, 0x37, 0x05, 0xc3, 0x01, + 0x8f, 0x42, 0x26, 0x5c, 0x1e, 0x4a, 0x1b, 0x79, 0x53, 0xf8, 0xbc, 0x39, 0x7e, 0xf4, 0xd7, 0x8b, + 0xbf, 0x7f, 0x59, 0x2e, 0x98, 0x06, 0xdc, 0xa3, 0xa1, 0xd6, 0x1b, 0xb1, 0xf0, 0x7c, 0x92, 0x7d, + 0x82, 0xbd, 0x22, 0x2d, 0x54, 0x53, 0x72, 0xdf, 0x38, 0x2a, 0xab, 0x6c, 0x7f, 0xf4, 0xdf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x09, 0x79, 0xa6, 0x61, 0x8d, 0x13, 0x00, 0x00, } - -func (this *TlsParameters) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TlsParameters) - if !ok { - that2, ok := that.(TlsParameters) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.TlsMinimumProtocolVersion != that1.TlsMinimumProtocolVersion { - return false - } - if this.TlsMaximumProtocolVersion != that1.TlsMaximumProtocolVersion { - return false - } - if len(this.CipherSuites) != len(that1.CipherSuites) { - return false - } - for i := range this.CipherSuites { - if this.CipherSuites[i] != that1.CipherSuites[i] { - return false - } - } - if len(this.EcdhCurves) != len(that1.EcdhCurves) { - return false - } - for i := range this.EcdhCurves { - if this.EcdhCurves[i] != that1.EcdhCurves[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TlsCertificate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TlsCertificate) - if !ok { - that2, ok := that.(TlsCertificate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.CertificateChain.Equal(that1.CertificateChain) { - return false - } - if !this.PrivateKey.Equal(that1.PrivateKey) { - return false - } - if !this.Password.Equal(that1.Password) { - return false - } - if !this.OcspStaple.Equal(that1.OcspStaple) { - return false - } - if len(this.SignedCertificateTimestamp) != len(that1.SignedCertificateTimestamp) { - return false - } - for i := range this.SignedCertificateTimestamp { - if !this.SignedCertificateTimestamp[i].Equal(that1.SignedCertificateTimestamp[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TlsSessionTicketKeys) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TlsSessionTicketKeys) - if !ok { - that2, ok := that.(TlsSessionTicketKeys) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Keys) != len(that1.Keys) { - return false - } - for i := range this.Keys { - if !this.Keys[i].Equal(that1.Keys[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CertificateValidationContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CertificateValidationContext) - if !ok { - that2, ok := that.(CertificateValidationContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TrustedCa.Equal(that1.TrustedCa) { - return false - } - if len(this.VerifyCertificateSpki) != len(that1.VerifyCertificateSpki) { - return false - } - for i := range this.VerifyCertificateSpki { - if this.VerifyCertificateSpki[i] != that1.VerifyCertificateSpki[i] { - return false - } - } - if len(this.VerifyCertificateHash) != len(that1.VerifyCertificateHash) { - return false - } - for i := range this.VerifyCertificateHash { - if this.VerifyCertificateHash[i] != that1.VerifyCertificateHash[i] { - return false - } - } - if len(this.VerifySubjectAltName) != len(that1.VerifySubjectAltName) { - return false - } - for i := range this.VerifySubjectAltName { - if this.VerifySubjectAltName[i] != that1.VerifySubjectAltName[i] { - return false - } - } - if !this.RequireOcspStaple.Equal(that1.RequireOcspStaple) { - return false - } - if !this.RequireSignedCertificateTimestamp.Equal(that1.RequireSignedCertificateTimestamp) { - return false - } - if !this.Crl.Equal(that1.Crl) { - return false - } - if this.AllowExpiredCertificate != that1.AllowExpiredCertificate { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CommonTlsContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommonTlsContext) - if !ok { - that2, ok := that.(CommonTlsContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TlsParams.Equal(that1.TlsParams) { - return false - } - if len(this.TlsCertificates) != len(that1.TlsCertificates) { - return false - } - for i := range this.TlsCertificates { - if !this.TlsCertificates[i].Equal(that1.TlsCertificates[i]) { - return false - } - } - if len(this.TlsCertificateSdsSecretConfigs) != len(that1.TlsCertificateSdsSecretConfigs) { - return false - } - for i := range this.TlsCertificateSdsSecretConfigs { - if !this.TlsCertificateSdsSecretConfigs[i].Equal(that1.TlsCertificateSdsSecretConfigs[i]) { - return false - } - } - if that1.ValidationContextType == nil { - if this.ValidationContextType != nil { - return false - } - } else if this.ValidationContextType == nil { - return false - } else if !this.ValidationContextType.Equal(that1.ValidationContextType) { - return false - } - if len(this.AlpnProtocols) != len(that1.AlpnProtocols) { - return false - } - for i := range this.AlpnProtocols { - if this.AlpnProtocols[i] != that1.AlpnProtocols[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CommonTlsContext_ValidationContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommonTlsContext_ValidationContext) - if !ok { - that2, ok := that.(CommonTlsContext_ValidationContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ValidationContext.Equal(that1.ValidationContext) { - return false - } - return true -} -func (this *CommonTlsContext_ValidationContextSdsSecretConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommonTlsContext_ValidationContextSdsSecretConfig) - if !ok { - that2, ok := that.(CommonTlsContext_ValidationContextSdsSecretConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ValidationContextSdsSecretConfig.Equal(that1.ValidationContextSdsSecretConfig) { - return false - } - return true -} -func (this *CommonTlsContext_CombinedValidationContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommonTlsContext_CombinedValidationContext) - if !ok { - that2, ok := that.(CommonTlsContext_CombinedValidationContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.CombinedValidationContext.Equal(that1.CombinedValidationContext) { - return false - } - return true -} -func (this *CommonTlsContext_CombinedCertificateValidationContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CommonTlsContext_CombinedCertificateValidationContext) - if !ok { - that2, ok := that.(CommonTlsContext_CombinedCertificateValidationContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.DefaultValidationContext.Equal(that1.DefaultValidationContext) { - return false - } - if !this.ValidationContextSdsSecretConfig.Equal(that1.ValidationContextSdsSecretConfig) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UpstreamTlsContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UpstreamTlsContext) - if !ok { - that2, ok := that.(UpstreamTlsContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.CommonTlsContext.Equal(that1.CommonTlsContext) { - return false - } - if this.Sni != that1.Sni { - return false - } - if this.AllowRenegotiation != that1.AllowRenegotiation { - return false - } - if !this.MaxSessionKeys.Equal(that1.MaxSessionKeys) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DownstreamTlsContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DownstreamTlsContext) - if !ok { - that2, ok := that.(DownstreamTlsContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.CommonTlsContext.Equal(that1.CommonTlsContext) { - return false - } - if !this.RequireClientCertificate.Equal(that1.RequireClientCertificate) { - return false - } - if !this.RequireSni.Equal(that1.RequireSni) { - return false - } - if that1.SessionTicketKeysType == nil { - if this.SessionTicketKeysType != nil { - return false - } - } else if this.SessionTicketKeysType == nil { - return false - } else if !this.SessionTicketKeysType.Equal(that1.SessionTicketKeysType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DownstreamTlsContext_SessionTicketKeys) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DownstreamTlsContext_SessionTicketKeys) - if !ok { - that2, ok := that.(DownstreamTlsContext_SessionTicketKeys) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SessionTicketKeys.Equal(that1.SessionTicketKeys) { - return false - } - return true -} -func (this *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) - if !ok { - that2, ok := that.(DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SessionTicketKeysSdsSecretConfig.Equal(that1.SessionTicketKeysSdsSecretConfig) { - return false - } - return true -} -func (this *SdsSecretConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SdsSecretConfig) - if !ok { - that2, ok := that.(SdsSecretConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !this.SdsConfig.Equal(that1.SdsConfig) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Secret) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Secret) - if !ok { - that2, ok := that.(Secret) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.Type == nil { - if this.Type != nil { - return false - } - } else if this.Type == nil { - return false - } else if !this.Type.Equal(that1.Type) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Secret_TlsCertificate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Secret_TlsCertificate) - if !ok { - that2, ok := that.(Secret_TlsCertificate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TlsCertificate.Equal(that1.TlsCertificate) { - return false - } - return true -} -func (this *Secret_SessionTicketKeys) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Secret_SessionTicketKeys) - if !ok { - that2, ok := that.(Secret_SessionTicketKeys) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SessionTicketKeys.Equal(that1.SessionTicketKeys) { - return false - } - return true -} -func (this *Secret_ValidationContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Secret_ValidationContext) - if !ok { - that2, ok := that.(Secret_ValidationContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ValidationContext.Equal(that1.ValidationContext) { - return false - } - return true -} -func (m *TlsParameters) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TlsParameters) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TlsMinimumProtocolVersion != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.TlsMinimumProtocolVersion)) - } - if m.TlsMaximumProtocolVersion != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.TlsMaximumProtocolVersion)) - } - if len(m.CipherSuites) > 0 { - for _, s := range m.CipherSuites { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.EcdhCurves) > 0 { - for _, s := range m.EcdhCurves { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TlsCertificate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TlsCertificate) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.CertificateChain != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(m.CertificateChain.Size())) - n1, err := m.CertificateChain.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.PrivateKey != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.PrivateKey.Size())) - n2, err := m.PrivateKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Password != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.Password.Size())) - n3, err := m.Password.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.OcspStaple != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.OcspStaple.Size())) - n4, err := m.OcspStaple.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if len(m.SignedCertificateTimestamp) > 0 { - for _, msg := range m.SignedCertificateTimestamp { - dAtA[i] = 0x2a - i++ - i = encodeVarintCert(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TlsSessionTicketKeys) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TlsSessionTicketKeys) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for _, msg := range m.Keys { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CertificateValidationContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CertificateValidationContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TrustedCa != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(m.TrustedCa.Size())) - n5, err := m.TrustedCa.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.VerifyCertificateHash) > 0 { - for _, s := range m.VerifyCertificateHash { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.VerifyCertificateSpki) > 0 { - for _, s := range m.VerifyCertificateSpki { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.VerifySubjectAltName) > 0 { - for _, s := range m.VerifySubjectAltName { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.RequireOcspStaple != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.RequireOcspStaple.Size())) - n6, err := m.RequireOcspStaple.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.RequireSignedCertificateTimestamp != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.RequireSignedCertificateTimestamp.Size())) - n7, err := m.RequireSignedCertificateTimestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.Crl != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.Crl.Size())) - n8, err := m.Crl.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.AllowExpiredCertificate { - dAtA[i] = 0x40 - i++ - if m.AllowExpiredCertificate { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CommonTlsContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommonTlsContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TlsParams != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(m.TlsParams.Size())) - n9, err := m.TlsParams.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if len(m.TlsCertificates) > 0 { - for _, msg := range m.TlsCertificates { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.ValidationContextType != nil { - nn10, err := m.ValidationContextType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn10 - } - if len(m.AlpnProtocols) > 0 { - for _, s := range m.AlpnProtocols { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.TlsCertificateSdsSecretConfigs) > 0 { - for _, msg := range m.TlsCertificateSdsSecretConfigs { - dAtA[i] = 0x32 - i++ - i = encodeVarintCert(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CommonTlsContext_ValidationContext) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ValidationContext != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.ValidationContext.Size())) - n11, err := m.ValidationContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} -func (m *CommonTlsContext_ValidationContextSdsSecretConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ValidationContextSdsSecretConfig != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.ValidationContextSdsSecretConfig.Size())) - n12, err := m.ValidationContextSdsSecretConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - return i, nil -} -func (m *CommonTlsContext_CombinedValidationContext) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.CombinedValidationContext != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.CombinedValidationContext.Size())) - n13, err := m.CombinedValidationContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - return i, nil -} -func (m *CommonTlsContext_CombinedCertificateValidationContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommonTlsContext_CombinedCertificateValidationContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.DefaultValidationContext != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(m.DefaultValidationContext.Size())) - n14, err := m.DefaultValidationContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - if m.ValidationContextSdsSecretConfig != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.ValidationContextSdsSecretConfig.Size())) - n15, err := m.ValidationContextSdsSecretConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UpstreamTlsContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpstreamTlsContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.CommonTlsContext != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(m.CommonTlsContext.Size())) - n16, err := m.CommonTlsContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if len(m.Sni) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(len(m.Sni))) - i += copy(dAtA[i:], m.Sni) - } - if m.AllowRenegotiation { - dAtA[i] = 0x18 - i++ - if m.AllowRenegotiation { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.MaxSessionKeys != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.MaxSessionKeys.Size())) - n17, err := m.MaxSessionKeys.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DownstreamTlsContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DownstreamTlsContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.CommonTlsContext != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(m.CommonTlsContext.Size())) - n18, err := m.CommonTlsContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.RequireClientCertificate != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.RequireClientCertificate.Size())) - n19, err := m.RequireClientCertificate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.RequireSni != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.RequireSni.Size())) - n20, err := m.RequireSni.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if m.SessionTicketKeysType != nil { - nn21, err := m.SessionTicketKeysType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn21 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DownstreamTlsContext_SessionTicketKeys) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SessionTicketKeys != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.SessionTicketKeys.Size())) - n22, err := m.SessionTicketKeys.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - return i, nil -} -func (m *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SessionTicketKeysSdsSecretConfig != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.SessionTicketKeysSdsSecretConfig.Size())) - n23, err := m.SessionTicketKeysSdsSecretConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - return i, nil -} -func (m *SdsSecretConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SdsSecretConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.SdsConfig != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.SdsConfig.Size())) - n24, err := m.SdsConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Secret) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Secret) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintCert(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Type != nil { - nn25, err := m.Type.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn25 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Secret_TlsCertificate) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TlsCertificate != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.TlsCertificate.Size())) - n26, err := m.TlsCertificate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } - return i, nil -} -func (m *Secret_SessionTicketKeys) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SessionTicketKeys != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCert(dAtA, i, uint64(m.SessionTicketKeys.Size())) - n27, err := m.SessionTicketKeys.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - return i, nil -} -func (m *Secret_ValidationContext) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ValidationContext != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCert(dAtA, i, uint64(m.ValidationContext.Size())) - n28, err := m.ValidationContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n28 - } - return i, nil -} -func encodeVarintCert(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *TlsParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TlsMinimumProtocolVersion != 0 { - n += 1 + sovCert(uint64(m.TlsMinimumProtocolVersion)) - } - if m.TlsMaximumProtocolVersion != 0 { - n += 1 + sovCert(uint64(m.TlsMaximumProtocolVersion)) - } - if len(m.CipherSuites) > 0 { - for _, s := range m.CipherSuites { - l = len(s) - n += 1 + l + sovCert(uint64(l)) - } - } - if len(m.EcdhCurves) > 0 { - for _, s := range m.EcdhCurves { - l = len(s) - n += 1 + l + sovCert(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TlsCertificate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CertificateChain != nil { - l = m.CertificateChain.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.PrivateKey != nil { - l = m.PrivateKey.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.Password != nil { - l = m.Password.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.OcspStaple != nil { - l = m.OcspStaple.Size() - n += 1 + l + sovCert(uint64(l)) - } - if len(m.SignedCertificateTimestamp) > 0 { - for _, e := range m.SignedCertificateTimestamp { - l = e.Size() - n += 1 + l + sovCert(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TlsSessionTicketKeys) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { - l = e.Size() - n += 1 + l + sovCert(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CertificateValidationContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TrustedCa != nil { - l = m.TrustedCa.Size() - n += 1 + l + sovCert(uint64(l)) - } - if len(m.VerifyCertificateHash) > 0 { - for _, s := range m.VerifyCertificateHash { - l = len(s) - n += 1 + l + sovCert(uint64(l)) - } - } - if len(m.VerifyCertificateSpki) > 0 { - for _, s := range m.VerifyCertificateSpki { - l = len(s) - n += 1 + l + sovCert(uint64(l)) - } - } - if len(m.VerifySubjectAltName) > 0 { - for _, s := range m.VerifySubjectAltName { - l = len(s) - n += 1 + l + sovCert(uint64(l)) - } - } - if m.RequireOcspStaple != nil { - l = m.RequireOcspStaple.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.RequireSignedCertificateTimestamp != nil { - l = m.RequireSignedCertificateTimestamp.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.Crl != nil { - l = m.Crl.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.AllowExpiredCertificate { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CommonTlsContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TlsParams != nil { - l = m.TlsParams.Size() - n += 1 + l + sovCert(uint64(l)) - } - if len(m.TlsCertificates) > 0 { - for _, e := range m.TlsCertificates { - l = e.Size() - n += 1 + l + sovCert(uint64(l)) - } - } - if m.ValidationContextType != nil { - n += m.ValidationContextType.Size() - } - if len(m.AlpnProtocols) > 0 { - for _, s := range m.AlpnProtocols { - l = len(s) - n += 1 + l + sovCert(uint64(l)) - } - } - if len(m.TlsCertificateSdsSecretConfigs) > 0 { - for _, e := range m.TlsCertificateSdsSecretConfigs { - l = e.Size() - n += 1 + l + sovCert(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CommonTlsContext_ValidationContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidationContext != nil { - l = m.ValidationContext.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *CommonTlsContext_ValidationContextSdsSecretConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidationContextSdsSecretConfig != nil { - l = m.ValidationContextSdsSecretConfig.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *CommonTlsContext_CombinedValidationContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CombinedValidationContext != nil { - l = m.CombinedValidationContext.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *CommonTlsContext_CombinedCertificateValidationContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DefaultValidationContext != nil { - l = m.DefaultValidationContext.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.ValidationContextSdsSecretConfig != nil { - l = m.ValidationContextSdsSecretConfig.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpstreamTlsContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommonTlsContext != nil { - l = m.CommonTlsContext.Size() - n += 1 + l + sovCert(uint64(l)) - } - l = len(m.Sni) - if l > 0 { - n += 1 + l + sovCert(uint64(l)) - } - if m.AllowRenegotiation { - n += 2 - } - if m.MaxSessionKeys != nil { - l = m.MaxSessionKeys.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DownstreamTlsContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommonTlsContext != nil { - l = m.CommonTlsContext.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.RequireClientCertificate != nil { - l = m.RequireClientCertificate.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.RequireSni != nil { - l = m.RequireSni.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.SessionTicketKeysType != nil { - n += m.SessionTicketKeysType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DownstreamTlsContext_SessionTicketKeys) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SessionTicketKeys != nil { - l = m.SessionTicketKeys.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SessionTicketKeysSdsSecretConfig != nil { - l = m.SessionTicketKeysSdsSecretConfig.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *SdsSecretConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCert(uint64(l)) - } - if m.SdsConfig != nil { - l = m.SdsConfig.Size() - n += 1 + l + sovCert(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Secret) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCert(uint64(l)) - } - if m.Type != nil { - n += m.Type.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Secret_TlsCertificate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TlsCertificate != nil { - l = m.TlsCertificate.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *Secret_SessionTicketKeys) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SessionTicketKeys != nil { - l = m.SessionTicketKeys.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} -func (m *Secret_ValidationContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidationContext != nil { - l = m.ValidationContext.Size() - n += 1 + l + sovCert(uint64(l)) - } - return n -} - -func sovCert(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCert(x uint64) (n int) { - return sovCert(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TlsParameters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TlsParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TlsParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsMinimumProtocolVersion", wireType) - } - m.TlsMinimumProtocolVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TlsMinimumProtocolVersion |= TlsParameters_TlsProtocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsMaximumProtocolVersion", wireType) - } - m.TlsMaximumProtocolVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TlsMaximumProtocolVersion |= TlsParameters_TlsProtocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CipherSuites", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CipherSuites = append(m.CipherSuites, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EcdhCurves", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EcdhCurves = append(m.EcdhCurves, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *TlsCertificate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TlsCertificate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TlsCertificate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CertificateChain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CertificateChain == nil { - m.CertificateChain = &core.DataSource{} - } - if err := m.CertificateChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrivateKey == nil { - m.PrivateKey = &core.DataSource{} - } - if err := m.PrivateKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Password == nil { - m.Password = &core.DataSource{} - } - if err := m.Password.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OcspStaple", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OcspStaple == nil { - m.OcspStaple = &core.DataSource{} - } - if err := m.OcspStaple.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedCertificateTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignedCertificateTimestamp = append(m.SignedCertificateTimestamp, &core.DataSource{}) - if err := m.SignedCertificateTimestamp[len(m.SignedCertificateTimestamp)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *TlsSessionTicketKeys) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TlsSessionTicketKeys: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TlsSessionTicketKeys: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, &core.DataSource{}) - if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *CertificateValidationContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CertificateValidationContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CertificateValidationContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustedCa", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TrustedCa == nil { - m.TrustedCa = &core.DataSource{} - } - if err := m.TrustedCa.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyCertificateHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerifyCertificateHash = append(m.VerifyCertificateHash, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyCertificateSpki", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerifyCertificateSpki = append(m.VerifyCertificateSpki, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifySubjectAltName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerifySubjectAltName = append(m.VerifySubjectAltName, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequireOcspStaple", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequireOcspStaple == nil { - m.RequireOcspStaple = &types.BoolValue{} - } - if err := m.RequireOcspStaple.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequireSignedCertificateTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequireSignedCertificateTimestamp == nil { - m.RequireSignedCertificateTimestamp = &types.BoolValue{} - } - if err := m.RequireSignedCertificateTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Crl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Crl == nil { - m.Crl = &core.DataSource{} - } - if err := m.Crl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowExpiredCertificate", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowExpiredCertificate = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *CommonTlsContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommonTlsContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommonTlsContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TlsParams == nil { - m.TlsParams = &TlsParameters{} - } - if err := m.TlsParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsCertificates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TlsCertificates = append(m.TlsCertificates, &TlsCertificate{}) - if err := m.TlsCertificates[len(m.TlsCertificates)-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 ValidationContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CertificateValidationContext{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ValidationContextType = &CommonTlsContext_ValidationContext{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AlpnProtocols", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AlpnProtocols = append(m.AlpnProtocols, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsCertificateSdsSecretConfigs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TlsCertificateSdsSecretConfigs = append(m.TlsCertificateSdsSecretConfigs, &SdsSecretConfig{}) - if err := m.TlsCertificateSdsSecretConfigs[len(m.TlsCertificateSdsSecretConfigs)-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 ValidationContextSdsSecretConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SdsSecretConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ValidationContextType = &CommonTlsContext_ValidationContextSdsSecretConfig{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CombinedValidationContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CommonTlsContext_CombinedCertificateValidationContext{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ValidationContextType = &CommonTlsContext_CombinedValidationContext{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *CommonTlsContext_CombinedCertificateValidationContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CombinedCertificateValidationContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CombinedCertificateValidationContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultValidationContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DefaultValidationContext == nil { - m.DefaultValidationContext = &CertificateValidationContext{} - } - if err := m.DefaultValidationContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidationContextSdsSecretConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidationContextSdsSecretConfig == nil { - m.ValidationContextSdsSecretConfig = &SdsSecretConfig{} - } - if err := m.ValidationContextSdsSecretConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *UpstreamTlsContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpstreamTlsContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpstreamTlsContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonTlsContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommonTlsContext == nil { - m.CommonTlsContext = &CommonTlsContext{} - } - if err := m.CommonTlsContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sni", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sni = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowRenegotiation", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowRenegotiation = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSessionKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxSessionKeys == nil { - m.MaxSessionKeys = &types.UInt32Value{} - } - if err := m.MaxSessionKeys.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *DownstreamTlsContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DownstreamTlsContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DownstreamTlsContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonTlsContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommonTlsContext == nil { - m.CommonTlsContext = &CommonTlsContext{} - } - if err := m.CommonTlsContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequireClientCertificate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequireClientCertificate == nil { - m.RequireClientCertificate = &types.BoolValue{} - } - if err := m.RequireClientCertificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequireSni", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequireSni == nil { - m.RequireSni = &types.BoolValue{} - } - if err := m.RequireSni.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionTicketKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TlsSessionTicketKeys{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SessionTicketKeysType = &DownstreamTlsContext_SessionTicketKeys{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionTicketKeysSdsSecretConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SdsSecretConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SessionTicketKeysType = &DownstreamTlsContext_SessionTicketKeysSdsSecretConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *SdsSecretConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SdsSecretConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SdsSecretConfig: 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 ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - 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 SdsConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SdsConfig == nil { - m.SdsConfig = &core.ConfigSource{} - } - if err := m.SdsConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 *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 ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCert - } - 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 TlsCertificate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TlsCertificate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Secret_TlsCertificate{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionTicketKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TlsSessionTicketKeys{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Secret_SessionTicketKeys{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidationContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCert - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCert - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCert - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CertificateValidationContext{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Secret_ValidationContext{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCert(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCert - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCert - } - 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 skipCert(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCert - } - 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, ErrIntOverflowCert - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCert - } - 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, ErrInvalidLengthCert - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthCert - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCert - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCert(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthCert - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCert = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCert = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go index f1d38c74e3..c508575cdf 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/auth/cert.proto -package auth +package envoy_api_v2_auth import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _cert_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on TlsParameters with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. @@ -112,6 +115,108 @@ var _ interface { ErrorName() string } = TlsParametersValidationError{} +// Validate checks the field values on PrivateKeyProvider with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *PrivateKeyProvider) Validate() error { + if m == nil { + return nil + } + + if len(m.GetProviderName()) < 1 { + return PrivateKeyProviderValidationError{ + field: "ProviderName", + reason: "value length must be at least 1 bytes", + } + } + + switch m.ConfigType.(type) { + + case *PrivateKeyProvider_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrivateKeyProviderValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *PrivateKeyProvider_TypedConfig: + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrivateKeyProviderValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// PrivateKeyProviderValidationError is the validation error returned by +// PrivateKeyProvider.Validate if the designated constraints aren't met. +type PrivateKeyProviderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PrivateKeyProviderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PrivateKeyProviderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PrivateKeyProviderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PrivateKeyProviderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PrivateKeyProviderValidationError) ErrorName() string { + return "PrivateKeyProviderValidationError" +} + +// Error satisfies the builtin error interface +func (e PrivateKeyProviderValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPrivateKeyProvider.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PrivateKeyProviderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PrivateKeyProviderValidationError{} + // Validate checks the field values on TlsCertificate with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. @@ -120,62 +225,52 @@ func (m *TlsCertificate) Validate() error { return nil } - { - tmp := m.GetCertificateChain() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "CertificateChain", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: "CertificateChain", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetPrivateKey() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: "PrivateKey", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetPassword() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "Password", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: "PrivateKeyProvider", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetOcspStaple() + if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: "Password", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "OcspStaple", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: "OcspStaple", + reason: "embedded message failed validation", + cause: err, } } } @@ -183,17 +278,12 @@ func (m *TlsCertificate) Validate() error { for idx, item := range m.GetSignedCertificateTimestamp() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsCertificateValidationError{ + field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -275,17 +365,12 @@ func (m *TlsSessionTicketKeys) Validate() error { for idx, item := range m.GetKeys() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TlsSessionTicketKeysValidationError{ - field: fmt.Sprintf("Keys[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TlsSessionTicketKeysValidationError{ + field: fmt.Sprintf("Keys[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -359,17 +444,12 @@ func (m *CertificateValidationContext) Validate() error { return nil } - { - tmp := m.GetTrustedCa() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "TrustedCa", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: "TrustedCa", + reason: "embedded message failed validation", + cause: err, } } } @@ -398,53 +478,60 @@ func (m *CertificateValidationContext) Validate() error { } - { - tmp := m.GetRequireOcspStaple() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + for idx, item := range m.GetMatchSubjectAltNames() { + _, _ = idx, item + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ - field: "RequireOcspStaple", + field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), reason: "embedded message failed validation", cause: err, } } } + } - { - tmp := m.GetRequireSignedCertificateTimestamp() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "RequireSignedCertificateTimestamp", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRequireOcspStaple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: "RequireOcspStaple", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetCrl() + if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: "RequireSignedCertificateTimestamp", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "Crl", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateValidationContextValidationError{ + field: "Crl", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for AllowExpiredCertificate + if _, ok := CertificateValidationContext_TrustChainVerification_name[int32(m.GetTrustChainVerification())]; !ok { + return CertificateValidationContextValidationError{ + field: "TrustChainVerification", + reason: "value must be one of the defined enum values", + } + } + return nil } @@ -513,17 +600,12 @@ func (m *CommonTlsContext) Validate() error { return nil } - { - tmp := m.GetTlsParams() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "TlsParams", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: "TlsParams", + reason: "embedded message failed validation", + cause: err, } } } @@ -531,17 +613,12 @@ func (m *CommonTlsContext) Validate() error { for idx, item := range m.GetTlsCertificates() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -558,17 +635,12 @@ func (m *CommonTlsContext) Validate() error { for idx, item := range m.GetTlsCertificateSdsSecretConfigs() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -579,51 +651,36 @@ func (m *CommonTlsContext) Validate() error { case *CommonTlsContext_ValidationContext: - { - tmp := m.GetValidationContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, } } } case *CommonTlsContext_ValidationContextSdsSecretConfig: - { - tmp := m.GetValidationContextSdsSecretConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, } } } case *CommonTlsContext_CombinedValidationContext: - { - tmp := m.GetCombinedValidationContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "CombinedValidationContext", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContextValidationError{ + field: "CombinedValidationContext", + reason: "embedded message failed validation", + cause: err, } } } @@ -695,17 +752,12 @@ func (m *UpstreamTlsContext) Validate() error { return nil } - { - tmp := m.GetCommonTlsContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, } } } @@ -719,17 +771,12 @@ func (m *UpstreamTlsContext) Validate() error { // no validation rules for AllowRenegotiation - { - tmp := m.GetMaxSessionKeys() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamTlsContextValidationError{ - field: "MaxSessionKeys", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamTlsContextValidationError{ + field: "MaxSessionKeys", + reason: "embedded message failed validation", + cause: err, } } } @@ -801,83 +848,80 @@ func (m *DownstreamTlsContext) Validate() error { return nil } - { - tmp := m.GetCommonTlsContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DownstreamTlsContextValidationError{ + field: "CommonTlsContext", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetRequireClientCertificate() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "RequireClientCertificate", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DownstreamTlsContextValidationError{ + field: "RequireClientCertificate", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetRequireSni() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "RequireSni", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DownstreamTlsContextValidationError{ + field: "RequireSni", + reason: "embedded message failed validation", + cause: err, } } } + if d := m.GetSessionTimeout(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return DownstreamTlsContextValidationError{ + field: "SessionTimeout", + reason: "value is not a valid duration", + cause: err, + } + } + + lt := time.Duration(4294967296*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte || dur >= lt { + return DownstreamTlsContextValidationError{ + field: "SessionTimeout", + reason: "value must be inside range [0s, 1193046h28m16s)", + } + } + + } + switch m.SessionTicketKeysType.(type) { case *DownstreamTlsContext_SessionTicketKeys: - { - tmp := m.GetSessionTicketKeys() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DownstreamTlsContextValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, } } } case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: - { - tmp := m.GetSessionTicketKeysSdsSecretConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "SessionTicketKeysSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DownstreamTlsContextValidationError{ + field: "SessionTicketKeysSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, } } } @@ -943,6 +987,81 @@ var _ interface { ErrorName() string } = DownstreamTlsContextValidationError{} +// Validate checks the field values on GenericSecret with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *GenericSecret) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GenericSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// GenericSecretValidationError is the validation error returned by +// GenericSecret.Validate if the designated constraints aren't met. +type GenericSecretValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GenericSecretValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GenericSecretValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GenericSecretValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GenericSecretValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GenericSecretValidationError) ErrorName() string { return "GenericSecretValidationError" } + +// Error satisfies the builtin error interface +func (e GenericSecretValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGenericSecret.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GenericSecretValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GenericSecretValidationError{} + // Validate checks the field values on SdsSecretConfig with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -953,17 +1072,12 @@ func (m *SdsSecretConfig) Validate() error { // no validation rules for Name - { - tmp := m.GetSdsConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return SdsSecretConfigValidationError{ - field: "SdsConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SdsSecretConfigValidationError{ + field: "SdsConfig", + reason: "embedded message failed validation", + cause: err, } } } @@ -1038,51 +1152,48 @@ func (m *Secret) Validate() error { case *Secret_TlsCertificate: - { - tmp := m.GetTlsCertificate() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "TlsCertificate", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretValidationError{ + field: "TlsCertificate", + reason: "embedded message failed validation", + cause: err, } } } case *Secret_SessionTicketKeys: - { - tmp := m.GetSessionTicketKeys() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretValidationError{ + field: "SessionTicketKeys", + reason: "embedded message failed validation", + cause: err, } } } case *Secret_ValidationContext: - { - tmp := m.GetValidationContext() + if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretValidationError{ + field: "ValidationContext", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + case *Secret_GenericSecret: - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretValidationError{ + field: "GenericSecret", + reason: "embedded message failed validation", + cause: err, } } } @@ -1162,17 +1273,12 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } } - { - tmp := m.GetDefaultValidationContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "DefaultValidationContext", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "DefaultValidationContext", + reason: "embedded message failed validation", + cause: err, } } } @@ -1184,17 +1290,12 @@ func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error } } - { - tmp := m.GetValidationContextSdsSecretConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonTlsContext_CombinedCertificateValidationContextValidationError{ + field: "ValidationContextSdsSecretConfig", + reason: "embedded message failed validation", + cause: err, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go index 981c014536..87d416dfbf 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go @@ -1,2694 +1,94 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/cds.proto -package v2 +package envoy_api_v2 import ( - bytes "bytes" context "context" fmt "fmt" - io "io" - math "math" - time "time" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/googleapis/google/api" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" - - auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" - cluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _type "github.com/envoyproxy/go-control-plane/envoy/type" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Refer to :ref:`service discovery type ` -// for an explanation on each type. -type Cluster_DiscoveryType int32 - -const ( - // Refer to the :ref:`static discovery type` - // for an explanation. - Cluster_STATIC Cluster_DiscoveryType = 0 - // Refer to the :ref:`strict DNS discovery - // type` - // for an explanation. - Cluster_STRICT_DNS Cluster_DiscoveryType = 1 - // Refer to the :ref:`logical DNS discovery - // type` - // for an explanation. - Cluster_LOGICAL_DNS Cluster_DiscoveryType = 2 - // Refer to the :ref:`service discovery type` - // for an explanation. - Cluster_EDS Cluster_DiscoveryType = 3 - // Refer to the :ref:`original destination discovery - // type` - // for an explanation. - Cluster_ORIGINAL_DST Cluster_DiscoveryType = 4 -) - -var Cluster_DiscoveryType_name = map[int32]string{ - 0: "STATIC", - 1: "STRICT_DNS", - 2: "LOGICAL_DNS", - 3: "EDS", - 4: "ORIGINAL_DST", +type CdsDummy struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -var Cluster_DiscoveryType_value = map[string]int32{ - "STATIC": 0, - "STRICT_DNS": 1, - "LOGICAL_DNS": 2, - "EDS": 3, - "ORIGINAL_DST": 4, -} - -func (x Cluster_DiscoveryType) String() string { - return proto.EnumName(Cluster_DiscoveryType_name, int32(x)) -} - -func (Cluster_DiscoveryType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 0} -} - -// Refer to :ref:`load balancer type ` architecture -// overview section for information on each type. -type Cluster_LbPolicy int32 - -const ( - // Refer to the :ref:`round robin load balancing - // policy` - // for an explanation. - Cluster_ROUND_ROBIN Cluster_LbPolicy = 0 - // Refer to the :ref:`least request load balancing - // policy` - // for an explanation. - Cluster_LEAST_REQUEST Cluster_LbPolicy = 1 - // Refer to the :ref:`ring hash load balancing - // policy` - // for an explanation. - Cluster_RING_HASH Cluster_LbPolicy = 2 - // Refer to the :ref:`random load balancing - // policy` - // for an explanation. - Cluster_RANDOM Cluster_LbPolicy = 3 - // Refer to the :ref:`original destination load balancing - // policy` - // for an explanation. - Cluster_ORIGINAL_DST_LB Cluster_LbPolicy = 4 - // Refer to the :ref:`Maglev load balancing policy` - // for an explanation. - Cluster_MAGLEV Cluster_LbPolicy = 5 -) - -var Cluster_LbPolicy_name = map[int32]string{ - 0: "ROUND_ROBIN", - 1: "LEAST_REQUEST", - 2: "RING_HASH", - 3: "RANDOM", - 4: "ORIGINAL_DST_LB", - 5: "MAGLEV", -} - -var Cluster_LbPolicy_value = map[string]int32{ - "ROUND_ROBIN": 0, - "LEAST_REQUEST": 1, - "RING_HASH": 2, - "RANDOM": 3, - "ORIGINAL_DST_LB": 4, - "MAGLEV": 5, -} - -func (x Cluster_LbPolicy) String() string { - return proto.EnumName(Cluster_LbPolicy_name, int32(x)) -} - -func (Cluster_LbPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 1} -} - -// When V4_ONLY is selected, the DNS resolver will only perform a lookup for -// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will -// only perform a lookup for addresses in the IPv6 family. If AUTO is -// specified, the DNS resolver will first perform a lookup for addresses in -// the IPv6 family and fallback to a lookup for addresses in the IPv4 family. -// For cluster types other than -// :ref:`STRICT_DNS` and -// :ref:`LOGICAL_DNS`, -// this setting is -// ignored. -type Cluster_DnsLookupFamily int32 - -const ( - Cluster_AUTO Cluster_DnsLookupFamily = 0 - Cluster_V4_ONLY Cluster_DnsLookupFamily = 1 - Cluster_V6_ONLY Cluster_DnsLookupFamily = 2 -) - -var Cluster_DnsLookupFamily_name = map[int32]string{ - 0: "AUTO", - 1: "V4_ONLY", - 2: "V6_ONLY", -} - -var Cluster_DnsLookupFamily_value = map[string]int32{ - "AUTO": 0, - "V4_ONLY": 1, - "V6_ONLY": 2, -} - -func (x Cluster_DnsLookupFamily) String() string { - return proto.EnumName(Cluster_DnsLookupFamily_name, int32(x)) -} - -func (Cluster_DnsLookupFamily) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 2} -} - -type Cluster_ClusterProtocolSelection int32 - -const ( - // Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). - // If :ref:`http2_protocol_options ` are - // present, HTTP2 will be used, otherwise HTTP1.1 will be used. - Cluster_USE_CONFIGURED_PROTOCOL Cluster_ClusterProtocolSelection = 0 - // Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. - Cluster_USE_DOWNSTREAM_PROTOCOL Cluster_ClusterProtocolSelection = 1 -) - -var Cluster_ClusterProtocolSelection_name = map[int32]string{ - 0: "USE_CONFIGURED_PROTOCOL", - 1: "USE_DOWNSTREAM_PROTOCOL", -} - -var Cluster_ClusterProtocolSelection_value = map[string]int32{ - "USE_CONFIGURED_PROTOCOL": 0, - "USE_DOWNSTREAM_PROTOCOL": 1, -} - -func (x Cluster_ClusterProtocolSelection) String() string { - return proto.EnumName(Cluster_ClusterProtocolSelection_name, int32(x)) -} - -func (Cluster_ClusterProtocolSelection) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 3} -} - -// If NO_FALLBACK is selected, a result -// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, -// any cluster endpoint may be returned (subject to policy, health checks, -// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the -// endpoints matching the values from the default_subset field. -type Cluster_LbSubsetConfig_LbSubsetFallbackPolicy int32 - -const ( - Cluster_LbSubsetConfig_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 0 - Cluster_LbSubsetConfig_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 1 - Cluster_LbSubsetConfig_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 2 -) - -var Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name = map[int32]string{ - 0: "NO_FALLBACK", - 1: "ANY_ENDPOINT", - 2: "DEFAULT_SUBSET", -} - -var Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value = map[string]int32{ - "NO_FALLBACK": 0, - "ANY_ENDPOINT": 1, - "DEFAULT_SUBSET": 2, -} - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) String() string { - return proto.EnumName(Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name, int32(x)) -} - -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 4, 0} -} - -// The hash function used to hash hosts onto the ketama ring. -type Cluster_RingHashLbConfig_HashFunction int32 - -const ( - // Use `xxHash `_, this is the default hash function. - Cluster_RingHashLbConfig_XX_HASH Cluster_RingHashLbConfig_HashFunction = 0 - // Use `MurmurHash2 `_, this is compatible with - // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled - // on Linux and not macOS. - Cluster_RingHashLbConfig_MURMUR_HASH_2 Cluster_RingHashLbConfig_HashFunction = 1 -) - -var Cluster_RingHashLbConfig_HashFunction_name = map[int32]string{ - 0: "XX_HASH", - 1: "MURMUR_HASH_2", -} - -var Cluster_RingHashLbConfig_HashFunction_value = map[string]int32{ - "XX_HASH": 0, - "MURMUR_HASH_2": 1, -} - -func (x Cluster_RingHashLbConfig_HashFunction) String() string { - return proto.EnumName(Cluster_RingHashLbConfig_HashFunction_name, int32(x)) -} - -func (Cluster_RingHashLbConfig_HashFunction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 6, 0} -} - -// Configuration for a single upstream cluster. -// [#comment:next free field: 39] -type Cluster struct { - // Supplies the name of the cluster which must be unique across all clusters. - // The cluster name is used when emitting - // :ref:`statistics ` if :ref:`alt_stat_name - // ` is not provided. - // Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. - // By default, the maximum length of a cluster name is limited to 60 - // characters. This limit can be increased by setting the - // :option:`--max-obj-name-len` command line argument to the desired value. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An optional alternative to the cluster name to be used while emitting stats. - // Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be - // confused with :ref:`Router Filter Header - // `. - AltStatName string `protobuf:"bytes,28,opt,name=alt_stat_name,json=altStatName,proto3" json:"alt_stat_name,omitempty"` - // Types that are valid to be assigned to ClusterDiscoveryType: - // *Cluster_Type - // *Cluster_ClusterType - ClusterDiscoveryType isCluster_ClusterDiscoveryType `protobuf_oneof:"cluster_discovery_type"` - // Configuration to use for EDS updates for the Cluster. - EdsClusterConfig *Cluster_EdsClusterConfig `protobuf:"bytes,3,opt,name=eds_cluster_config,json=edsClusterConfig,proto3" json:"eds_cluster_config,omitempty"` - // The timeout for new network connections to hosts in the cluster. - ConnectTimeout time.Duration `protobuf:"bytes,4,opt,name=connect_timeout,json=connectTimeout,proto3,stdduration" json:"connect_timeout"` - // Soft limit on size of the cluster’s connections read and write buffers. If - // unspecified, an implementation defined default is applied (1MiB). - PerConnectionBufferLimitBytes *types.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` - // The :ref:`load balancer type ` to use - // when picking a host in the cluster. - LbPolicy Cluster_LbPolicy `protobuf:"varint,6,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.api.v2.Cluster_LbPolicy" json:"lb_policy,omitempty"` - // If the service discovery type is - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS`, - // then hosts is required. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`load_assignment` field instead. - // - Hosts []*core.Address `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` // Deprecated: Do not use. - // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. - // This field supersedes :ref:`hosts` field. - // [#comment:TODO(dio): Deprecate the hosts field and add it to :ref:`deprecated log` - // once load_assignment is implemented.] - // - // .. attention:: - // - // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. - // Setting this overrides :ref:`hosts` values. - // - LoadAssignment *ClusterLoadAssignment `protobuf:"bytes,33,opt,name=load_assignment,json=loadAssignment,proto3" json:"load_assignment,omitempty"` - // Optional :ref:`active health checking ` - // configuration for the cluster. If no - // configuration is specified no health checking will be done and all cluster - // members will be considered healthy at all times. - HealthChecks []*core.HealthCheck `protobuf:"bytes,8,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` - // Optional maximum requests for a single upstream connection. This parameter - // is respected by both the HTTP/1.1 and HTTP/2 connection pool - // implementations. If not specified, there is no limit. Setting this - // parameter to 1 will effectively disable keep alive. - MaxRequestsPerConnection *types.UInt32Value `protobuf:"bytes,9,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` - // Optional :ref:`circuit breaking ` for the cluster. - CircuitBreakers *cluster.CircuitBreakers `protobuf:"bytes,10,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` - // The TLS configuration for connections to the upstream cluster. If no TLS - // configuration is specified, TLS will not be used for new connections. - // - // .. attention:: - // - // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable - // verification. - TlsContext *auth.UpstreamTlsContext `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` - // Additional options when handling HTTP requests. These options will be applicable to both - // HTTP1 and HTTP2 requests. - CommonHttpProtocolOptions *core.HttpProtocolOptions `protobuf:"bytes,29,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions,proto3" json:"common_http_protocol_options,omitempty"` - // Additional options when handling HTTP1 requests. - HttpProtocolOptions *core.Http1ProtocolOptions `protobuf:"bytes,13,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` - // Even if default HTTP2 protocol options are desired, this field must be - // set so that Envoy will assume that the upstream supports HTTP/2 when - // making new HTTP connection pool connections. Currently, Envoy only - // supports prior knowledge for upstream connections. Even if TLS is used - // with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 - // connections to happen over plain text. - Http2ProtocolOptions *core.Http2ProtocolOptions `protobuf:"bytes,14,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - ExtensionProtocolOptions map[string]*types.Struct `protobuf:"bytes,35,rep,name=extension_protocol_options,json=extensionProtocolOptions,proto3" json:"extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - TypedExtensionProtocolOptions map[string]*types.Any `protobuf:"bytes,36,rep,name=typed_extension_protocol_options,json=typedExtensionProtocolOptions,proto3" json:"typed_extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // If the DNS refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used as the cluster’s DNS refresh - // rate. If this setting is not specified, the value defaults to 5000ms. For - // cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - DnsRefreshRate *time.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3,stdduration" json:"dns_refresh_rate,omitempty"` - // The DNS IP address resolution policy. If this setting is not specified, the - // value defaults to - // :ref:`AUTO`. - DnsLookupFamily Cluster_DnsLookupFamily `protobuf:"varint,17,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.api.v2.Cluster_DnsLookupFamily" json:"dns_lookup_family,omitempty"` - // If DNS resolvers are specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used to specify the cluster’s dns resolvers. - // If this setting is not specified, the value defaults to the default - // resolver, which uses /etc/resolv.conf for configuration. For cluster types - // other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - DnsResolvers []*core.Address `protobuf:"bytes,18,rep,name=dns_resolvers,json=dnsResolvers,proto3" json:"dns_resolvers,omitempty"` - // If specified, outlier detection will be enabled for this upstream cluster. - // Each of the configuration values can be overridden via - // :ref:`runtime values `. - OutlierDetection *cluster.OutlierDetection `protobuf:"bytes,19,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - // The interval for removing stale hosts from a cluster type - // :ref:`ORIGINAL_DST`. - // Hosts are considered stale if they have not been used - // as upstream destinations during this interval. New hosts are added - // to original destination clusters on demand as new connections are - // redirected to Envoy, causing the number of hosts in the cluster to - // grow over time. Hosts that are not stale (they are actively used as - // destinations) are kept in the cluster, which allows connections to - // them remain open, saving the latency that would otherwise be spent - // on opening new connections. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`ORIGINAL_DST` - // this setting is ignored. - CleanupInterval *time.Duration `protobuf:"bytes,20,opt,name=cleanup_interval,json=cleanupInterval,proto3,stdduration" json:"cleanup_interval,omitempty"` - // Optional configuration used to bind newly established upstream connections. - // This overrides any bind_config specified in the bootstrap proto. - // If the address and port are empty, no bind will be performed. - UpstreamBindConfig *core.BindConfig `protobuf:"bytes,21,opt,name=upstream_bind_config,json=upstreamBindConfig,proto3" json:"upstream_bind_config,omitempty"` - // Configuration for load balancing subsetting. - LbSubsetConfig *Cluster_LbSubsetConfig `protobuf:"bytes,22,opt,name=lb_subset_config,json=lbSubsetConfig,proto3" json:"lb_subset_config,omitempty"` - // Optional configuration for the load balancing algorithm selected by - // LbPolicy. Currently only - // :ref:`RING_HASH` and - // :ref:`LEAST_REQUEST` - // has additional configuration options. - // Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding - // LbPolicy will generate an error at runtime. - // - // Types that are valid to be assigned to LbConfig: - // *Cluster_RingHashLbConfig_ - // *Cluster_OriginalDstLbConfig_ - // *Cluster_LeastRequestLbConfig_ - LbConfig isCluster_LbConfig `protobuf_oneof:"lb_config"` - // Common configuration for all load balancer implementations. - CommonLbConfig *Cluster_CommonLbConfig `protobuf:"bytes,27,opt,name=common_lb_config,json=commonLbConfig,proto3" json:"common_lb_config,omitempty"` - // Optional custom transport socket implementation to use for upstream connections. - TransportSocket *core.TransportSocket `protobuf:"bytes,24,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` - // The Metadata field can be used to provide additional information about the - // cluster. It can be used for stats, logging, and varying filter behavior. - // Fields should use reverse DNS notation to denote which entity within Envoy - // will need the information. For instance, if the metadata is intended for - // the Router filter, the filter name should be specified as *envoy.router*. - Metadata *core.Metadata `protobuf:"bytes,25,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Determines how Envoy selects the protocol used to speak to upstream hosts. - ProtocolSelection Cluster_ClusterProtocolSelection `protobuf:"varint,26,opt,name=protocol_selection,json=protocolSelection,proto3,enum=envoy.api.v2.Cluster_ClusterProtocolSelection" json:"protocol_selection,omitempty"` - // Optional options for upstream connections. - UpstreamConnectionOptions *UpstreamConnectionOptions `protobuf:"bytes,30,opt,name=upstream_connection_options,json=upstreamConnectionOptions,proto3" json:"upstream_connection_options,omitempty"` - // If an upstream host becomes unhealthy (as determined by the configured health checks - // or outlier detection), immediately close all connections to the failed host. - // - // .. note:: - // - // This is currently only supported for connections created by tcp_proxy. - // - // .. note:: - // - // The current implementation of this feature closes all connections immediately when - // the unhealthy status is detected. If there are a large number of connections open - // to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of - // time exclusively closing these connections, and not processing any other traffic. - CloseConnectionsOnHostHealthFailure bool `protobuf:"varint,31,opt,name=close_connections_on_host_health_failure,json=closeConnectionsOnHostHealthFailure,proto3" json:"close_connections_on_host_health_failure,omitempty"` - // If this cluster uses EDS or STRICT_DNS to configure its hosts, immediately drain - // connections from any hosts that are removed from service discovery. - // - // This only affects behavior for hosts that are being actively health checked. - // If this flag is not set to true, Envoy will wait until the hosts fail active health - // checking before removing it from the cluster. - DrainConnectionsOnHostRemoval bool `protobuf:"varint,32,opt,name=drain_connections_on_host_removal,json=drainConnectionsOnHostRemoval,proto3" json:"drain_connections_on_host_removal,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster) Reset() { *m = Cluster{} } -func (m *Cluster) String() string { return proto.CompactTextString(m) } -func (*Cluster) ProtoMessage() {} -func (*Cluster) Descriptor() ([]byte, []int) { +func (m *CdsDummy) Reset() { *m = CdsDummy{} } +func (m *CdsDummy) String() string { return proto.CompactTextString(m) } +func (*CdsDummy) ProtoMessage() {} +func (*CdsDummy) Descriptor() ([]byte, []int) { return fileDescriptor_e73f50fbb1daa302, []int{0} } -func (m *Cluster) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster.Merge(m, src) -} -func (m *Cluster) XXX_Size() int { - return m.Size() -} -func (m *Cluster) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster proto.InternalMessageInfo - -type isCluster_ClusterDiscoveryType interface { - isCluster_ClusterDiscoveryType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} -type isCluster_LbConfig interface { - isCluster_LbConfig() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type Cluster_Type struct { - Type Cluster_DiscoveryType `protobuf:"varint,2,opt,name=type,proto3,enum=envoy.api.v2.Cluster_DiscoveryType,oneof"` -} -type Cluster_ClusterType struct { - ClusterType *Cluster_CustomClusterType `protobuf:"bytes,38,opt,name=cluster_type,json=clusterType,proto3,oneof"` -} -type Cluster_RingHashLbConfig_ struct { - RingHashLbConfig *Cluster_RingHashLbConfig `protobuf:"bytes,23,opt,name=ring_hash_lb_config,json=ringHashLbConfig,proto3,oneof"` -} -type Cluster_OriginalDstLbConfig_ struct { - OriginalDstLbConfig *Cluster_OriginalDstLbConfig `protobuf:"bytes,34,opt,name=original_dst_lb_config,json=originalDstLbConfig,proto3,oneof"` -} -type Cluster_LeastRequestLbConfig_ struct { - LeastRequestLbConfig *Cluster_LeastRequestLbConfig `protobuf:"bytes,37,opt,name=least_request_lb_config,json=leastRequestLbConfig,proto3,oneof"` -} - -func (*Cluster_Type) isCluster_ClusterDiscoveryType() {} -func (*Cluster_ClusterType) isCluster_ClusterDiscoveryType() {} -func (*Cluster_RingHashLbConfig_) isCluster_LbConfig() {} -func (*Cluster_OriginalDstLbConfig_) isCluster_LbConfig() {} -func (*Cluster_LeastRequestLbConfig_) isCluster_LbConfig() {} - -func (m *Cluster) GetClusterDiscoveryType() isCluster_ClusterDiscoveryType { - if m != nil { - return m.ClusterDiscoveryType - } - return nil -} -func (m *Cluster) GetLbConfig() isCluster_LbConfig { - if m != nil { - return m.LbConfig - } - return nil -} - -func (m *Cluster) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Cluster) GetAltStatName() string { - if m != nil { - return m.AltStatName - } - return "" -} - -func (m *Cluster) GetType() Cluster_DiscoveryType { - if x, ok := m.GetClusterDiscoveryType().(*Cluster_Type); ok { - return x.Type - } - return Cluster_STATIC -} - -func (m *Cluster) GetClusterType() *Cluster_CustomClusterType { - if x, ok := m.GetClusterDiscoveryType().(*Cluster_ClusterType); ok { - return x.ClusterType - } - return nil -} -func (m *Cluster) GetEdsClusterConfig() *Cluster_EdsClusterConfig { - if m != nil { - return m.EdsClusterConfig - } - return nil +func (m *CdsDummy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CdsDummy.Unmarshal(m, b) } - -func (m *Cluster) GetConnectTimeout() time.Duration { - if m != nil { - return m.ConnectTimeout - } - return 0 +func (m *CdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CdsDummy.Marshal(b, m, deterministic) } - -func (m *Cluster) GetPerConnectionBufferLimitBytes() *types.UInt32Value { - if m != nil { - return m.PerConnectionBufferLimitBytes - } - return nil +func (m *CdsDummy) XXX_Merge(src proto.Message) { + xxx_messageInfo_CdsDummy.Merge(m, src) } - -func (m *Cluster) GetLbPolicy() Cluster_LbPolicy { - if m != nil { - return m.LbPolicy - } - return Cluster_ROUND_ROBIN -} - -// Deprecated: Do not use. -func (m *Cluster) GetHosts() []*core.Address { - if m != nil { - return m.Hosts - } - return nil -} - -func (m *Cluster) GetLoadAssignment() *ClusterLoadAssignment { - if m != nil { - return m.LoadAssignment - } - return nil -} - -func (m *Cluster) GetHealthChecks() []*core.HealthCheck { - if m != nil { - return m.HealthChecks - } - return nil +func (m *CdsDummy) XXX_Size() int { + return xxx_messageInfo_CdsDummy.Size(m) } - -func (m *Cluster) GetMaxRequestsPerConnection() *types.UInt32Value { - if m != nil { - return m.MaxRequestsPerConnection - } - return nil -} - -func (m *Cluster) GetCircuitBreakers() *cluster.CircuitBreakers { - if m != nil { - return m.CircuitBreakers - } - return nil -} - -func (m *Cluster) GetTlsContext() *auth.UpstreamTlsContext { - if m != nil { - return m.TlsContext - } - return nil -} - -func (m *Cluster) GetCommonHttpProtocolOptions() *core.HttpProtocolOptions { - if m != nil { - return m.CommonHttpProtocolOptions - } - return nil -} - -func (m *Cluster) GetHttpProtocolOptions() *core.Http1ProtocolOptions { - if m != nil { - return m.HttpProtocolOptions - } - return nil -} - -func (m *Cluster) GetHttp2ProtocolOptions() *core.Http2ProtocolOptions { - if m != nil { - return m.Http2ProtocolOptions - } - return nil -} - -func (m *Cluster) GetExtensionProtocolOptions() map[string]*types.Struct { - if m != nil { - return m.ExtensionProtocolOptions - } - return nil -} - -func (m *Cluster) GetTypedExtensionProtocolOptions() map[string]*types.Any { - if m != nil { - return m.TypedExtensionProtocolOptions - } - return nil -} - -func (m *Cluster) GetDnsRefreshRate() *time.Duration { - if m != nil { - return m.DnsRefreshRate - } - return nil -} - -func (m *Cluster) GetDnsLookupFamily() Cluster_DnsLookupFamily { - if m != nil { - return m.DnsLookupFamily - } - return Cluster_AUTO -} - -func (m *Cluster) GetDnsResolvers() []*core.Address { - if m != nil { - return m.DnsResolvers - } - return nil -} - -func (m *Cluster) GetOutlierDetection() *cluster.OutlierDetection { - if m != nil { - return m.OutlierDetection - } - return nil -} - -func (m *Cluster) GetCleanupInterval() *time.Duration { - if m != nil { - return m.CleanupInterval - } - return nil -} - -func (m *Cluster) GetUpstreamBindConfig() *core.BindConfig { - if m != nil { - return m.UpstreamBindConfig - } - return nil -} - -func (m *Cluster) GetLbSubsetConfig() *Cluster_LbSubsetConfig { - if m != nil { - return m.LbSubsetConfig - } - return nil -} - -func (m *Cluster) GetRingHashLbConfig() *Cluster_RingHashLbConfig { - if x, ok := m.GetLbConfig().(*Cluster_RingHashLbConfig_); ok { - return x.RingHashLbConfig - } - return nil -} - -func (m *Cluster) GetOriginalDstLbConfig() *Cluster_OriginalDstLbConfig { - if x, ok := m.GetLbConfig().(*Cluster_OriginalDstLbConfig_); ok { - return x.OriginalDstLbConfig - } - return nil -} - -func (m *Cluster) GetLeastRequestLbConfig() *Cluster_LeastRequestLbConfig { - if x, ok := m.GetLbConfig().(*Cluster_LeastRequestLbConfig_); ok { - return x.LeastRequestLbConfig - } - return nil -} - -func (m *Cluster) GetCommonLbConfig() *Cluster_CommonLbConfig { - if m != nil { - return m.CommonLbConfig - } - return nil -} - -func (m *Cluster) GetTransportSocket() *core.TransportSocket { - if m != nil { - return m.TransportSocket - } - return nil -} - -func (m *Cluster) GetMetadata() *core.Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *Cluster) GetProtocolSelection() Cluster_ClusterProtocolSelection { - if m != nil { - return m.ProtocolSelection - } - return Cluster_USE_CONFIGURED_PROTOCOL -} - -func (m *Cluster) GetUpstreamConnectionOptions() *UpstreamConnectionOptions { - if m != nil { - return m.UpstreamConnectionOptions - } - return nil -} - -func (m *Cluster) GetCloseConnectionsOnHostHealthFailure() bool { - if m != nil { - return m.CloseConnectionsOnHostHealthFailure - } - return false -} - -func (m *Cluster) GetDrainConnectionsOnHostRemoval() bool { - if m != nil { - return m.DrainConnectionsOnHostRemoval - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Cluster) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Cluster_OneofMarshaler, _Cluster_OneofUnmarshaler, _Cluster_OneofSizer, []interface{}{ - (*Cluster_Type)(nil), - (*Cluster_ClusterType)(nil), - (*Cluster_RingHashLbConfig_)(nil), - (*Cluster_OriginalDstLbConfig_)(nil), - (*Cluster_LeastRequestLbConfig_)(nil), - } -} - -func _Cluster_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Cluster) - // cluster_discovery_type - switch x := m.ClusterDiscoveryType.(type) { - case *Cluster_Type: - _ = b.EncodeVarint(2<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Type)) - case *Cluster_ClusterType: - _ = b.EncodeVarint(38<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ClusterType); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Cluster.ClusterDiscoveryType has unexpected type %T", x) - } - // lb_config - switch x := m.LbConfig.(type) { - case *Cluster_RingHashLbConfig_: - _ = b.EncodeVarint(23<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.RingHashLbConfig); err != nil { - return err - } - case *Cluster_OriginalDstLbConfig_: - _ = b.EncodeVarint(34<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.OriginalDstLbConfig); err != nil { - return err - } - case *Cluster_LeastRequestLbConfig_: - _ = b.EncodeVarint(37<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.LeastRequestLbConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Cluster.LbConfig has unexpected type %T", x) - } - return nil -} - -func _Cluster_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Cluster) - switch tag { - case 2: // cluster_discovery_type.type - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.ClusterDiscoveryType = &Cluster_Type{Cluster_DiscoveryType(x)} - return true, err - case 38: // cluster_discovery_type.cluster_type - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Cluster_CustomClusterType) - err := b.DecodeMessage(msg) - m.ClusterDiscoveryType = &Cluster_ClusterType{msg} - return true, err - case 23: // lb_config.ring_hash_lb_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Cluster_RingHashLbConfig) - err := b.DecodeMessage(msg) - m.LbConfig = &Cluster_RingHashLbConfig_{msg} - return true, err - case 34: // lb_config.original_dst_lb_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Cluster_OriginalDstLbConfig) - err := b.DecodeMessage(msg) - m.LbConfig = &Cluster_OriginalDstLbConfig_{msg} - return true, err - case 37: // lb_config.least_request_lb_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Cluster_LeastRequestLbConfig) - err := b.DecodeMessage(msg) - m.LbConfig = &Cluster_LeastRequestLbConfig_{msg} - return true, err - default: - return false, nil - } -} - -func _Cluster_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Cluster) - // cluster_discovery_type - switch x := m.ClusterDiscoveryType.(type) { - case *Cluster_Type: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Type)) - case *Cluster_ClusterType: - s := proto.Size(x.ClusterType) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // lb_config - switch x := m.LbConfig.(type) { - case *Cluster_RingHashLbConfig_: - s := proto.Size(x.RingHashLbConfig) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Cluster_OriginalDstLbConfig_: - s := proto.Size(x.OriginalDstLbConfig) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Cluster_LeastRequestLbConfig_: - s := proto.Size(x.LeastRequestLbConfig) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Extended cluster type. -type Cluster_CustomClusterType struct { - // The type of the cluster to instantiate. The name must match a supported cluster type. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Cluster specific configuration which depends on the cluster being instantiated. - // See the supported cluster for further documentation. - TypedConfig *types.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_CustomClusterType) Reset() { *m = Cluster_CustomClusterType{} } -func (m *Cluster_CustomClusterType) String() string { return proto.CompactTextString(m) } -func (*Cluster_CustomClusterType) ProtoMessage() {} -func (*Cluster_CustomClusterType) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 0} -} -func (m *Cluster_CustomClusterType) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_CustomClusterType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_CustomClusterType) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_CustomClusterType.Merge(m, src) -} -func (m *Cluster_CustomClusterType) XXX_Size() int { - return m.Size() -} -func (m *Cluster_CustomClusterType) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_CustomClusterType.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_CustomClusterType proto.InternalMessageInfo - -func (m *Cluster_CustomClusterType) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Cluster_CustomClusterType) GetTypedConfig() *types.Any { - if m != nil { - return m.TypedConfig - } - return nil -} - -// Only valid when discovery type is EDS. -type Cluster_EdsClusterConfig struct { - // Configuration for the source of EDS updates for this Cluster. - EdsConfig *core.ConfigSource `protobuf:"bytes,1,opt,name=eds_config,json=edsConfig,proto3" json:"eds_config,omitempty"` - // Optional alternative to cluster name to present to EDS. This does not - // have the same restrictions as cluster name, i.e. it may be arbitrary - // length. - ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_EdsClusterConfig) Reset() { *m = Cluster_EdsClusterConfig{} } -func (m *Cluster_EdsClusterConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_EdsClusterConfig) ProtoMessage() {} -func (*Cluster_EdsClusterConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 1} -} -func (m *Cluster_EdsClusterConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_EdsClusterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_EdsClusterConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_EdsClusterConfig.Merge(m, src) -} -func (m *Cluster_EdsClusterConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_EdsClusterConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_EdsClusterConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_EdsClusterConfig proto.InternalMessageInfo - -func (m *Cluster_EdsClusterConfig) GetEdsConfig() *core.ConfigSource { - if m != nil { - return m.EdsConfig - } - return nil -} - -func (m *Cluster_EdsClusterConfig) GetServiceName() string { - if m != nil { - return m.ServiceName - } - return "" -} - -// Optionally divide the endpoints in this cluster into subsets defined by -// endpoint metadata and selected by route and weighted cluster metadata. -type Cluster_LbSubsetConfig struct { - // The behavior used when no endpoint subset matches the selected route's - // metadata. The value defaults to - // :ref:`NO_FALLBACK`. - FallbackPolicy Cluster_LbSubsetConfig_LbSubsetFallbackPolicy `protobuf:"varint,1,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy" json:"fallback_policy,omitempty"` - // Specifies the default subset of endpoints used during fallback if - // fallback_policy is - // :ref:`DEFAULT_SUBSET`. - // Each field in default_subset is - // compared to the matching LbEndpoint.Metadata under the *envoy.lb* - // namespace. It is valid for no hosts to match, in which case the behavior - // is the same as a fallback_policy of - // :ref:`NO_FALLBACK`. - DefaultSubset *types.Struct `protobuf:"bytes,2,opt,name=default_subset,json=defaultSubset,proto3" json:"default_subset,omitempty"` - // For each entry, LbEndpoint.Metadata's - // *envoy.lb* namespace is traversed and a subset is created for each unique - // combination of key and value. For example: - // - // .. code-block:: json - // - // { "subset_selectors": [ - // { "keys": [ "version" ] }, - // { "keys": [ "stage", "hardware_type" ] } - // ]} - // - // A subset is matched when the metadata from the selected route and - // weighted cluster contains the same keys and values as the subset's - // metadata. The same host may appear in multiple subsets. - SubsetSelectors []*Cluster_LbSubsetConfig_LbSubsetSelector `protobuf:"bytes,3,rep,name=subset_selectors,json=subsetSelectors,proto3" json:"subset_selectors,omitempty"` - // If true, routing to subsets will take into account the localities and locality weights of the - // endpoints when making the routing decision. - // - // There are some potential pitfalls associated with enabling this feature, as the resulting - // traffic split after applying both a subset match and locality weights might be undesirable. - // - // Consider for example a situation in which you have 50/50 split across two localities X/Y - // which have 100 hosts each without subsetting. If the subset LB results in X having only 1 - // host selected but Y having 100, then a lot more load is being dumped on the single host in X - // than originally anticipated in the load balancing assignment delivered via EDS. - LocalityWeightAware bool `protobuf:"varint,4,opt,name=locality_weight_aware,json=localityWeightAware,proto3" json:"locality_weight_aware,omitempty"` - // When used with locality_weight_aware, scales the weight of each locality by the ratio - // of hosts in the subset vs hosts in the original subset. This aims to even out the load - // going to an individual locality if said locality is disproportionally affected by the - // subset predicate. - ScaleLocalityWeight bool `protobuf:"varint,5,opt,name=scale_locality_weight,json=scaleLocalityWeight,proto3" json:"scale_locality_weight,omitempty"` - // If true, when a fallback policy is configured and its corresponding subset fails to find - // a host this will cause any host to be selected instead. - // - // This is useful when using the default subset as the fallback policy, given the default - // subset might become empty. With this option enabled, if that happens the LB will attempt - // to select a host from the entire cluster. - PanicModeAny bool `protobuf:"varint,6,opt,name=panic_mode_any,json=panicModeAny,proto3" json:"panic_mode_any,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_LbSubsetConfig) Reset() { *m = Cluster_LbSubsetConfig{} } -func (m *Cluster_LbSubsetConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_LbSubsetConfig) ProtoMessage() {} -func (*Cluster_LbSubsetConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 4} -} -func (m *Cluster_LbSubsetConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_LbSubsetConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_LbSubsetConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_LbSubsetConfig.Merge(m, src) -} -func (m *Cluster_LbSubsetConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_LbSubsetConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_LbSubsetConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_LbSubsetConfig proto.InternalMessageInfo - -func (m *Cluster_LbSubsetConfig) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { - if m != nil { - return m.FallbackPolicy - } - return Cluster_LbSubsetConfig_NO_FALLBACK -} - -func (m *Cluster_LbSubsetConfig) GetDefaultSubset() *types.Struct { - if m != nil { - return m.DefaultSubset - } - return nil -} - -func (m *Cluster_LbSubsetConfig) GetSubsetSelectors() []*Cluster_LbSubsetConfig_LbSubsetSelector { - if m != nil { - return m.SubsetSelectors - } - return nil -} - -func (m *Cluster_LbSubsetConfig) GetLocalityWeightAware() bool { - if m != nil { - return m.LocalityWeightAware - } - return false -} - -func (m *Cluster_LbSubsetConfig) GetScaleLocalityWeight() bool { - if m != nil { - return m.ScaleLocalityWeight - } - return false +func (m *CdsDummy) XXX_DiscardUnknown() { + xxx_messageInfo_CdsDummy.DiscardUnknown(m) } -func (m *Cluster_LbSubsetConfig) GetPanicModeAny() bool { - if m != nil { - return m.PanicModeAny - } - return false -} - -// Specifications for subsets. -type Cluster_LbSubsetConfig_LbSubsetSelector struct { - // List of keys to match with the weighted cluster metadata. - Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Reset() { - *m = Cluster_LbSubsetConfig_LbSubsetSelector{} -} -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) String() string { return proto.CompactTextString(m) } -func (*Cluster_LbSubsetConfig_LbSubsetSelector) ProtoMessage() {} -func (*Cluster_LbSubsetConfig_LbSubsetSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 4, 0} -} -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Merge(m, src) -} -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Size() int { - return m.Size() -} -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector proto.InternalMessageInfo - -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) GetKeys() []string { - if m != nil { - return m.Keys - } - return nil -} - -// Specific configuration for the LeastRequest load balancing policy. -type Cluster_LeastRequestLbConfig struct { - // The number of random healthy hosts from which the host with the fewest active requests will - // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. - ChoiceCount *types.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_LeastRequestLbConfig) Reset() { *m = Cluster_LeastRequestLbConfig{} } -func (m *Cluster_LeastRequestLbConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_LeastRequestLbConfig) ProtoMessage() {} -func (*Cluster_LeastRequestLbConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 5} -} -func (m *Cluster_LeastRequestLbConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_LeastRequestLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_LeastRequestLbConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_LeastRequestLbConfig.Merge(m, src) -} -func (m *Cluster_LeastRequestLbConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_LeastRequestLbConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_LeastRequestLbConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_LeastRequestLbConfig proto.InternalMessageInfo - -func (m *Cluster_LeastRequestLbConfig) GetChoiceCount() *types.UInt32Value { - if m != nil { - return m.ChoiceCount - } - return nil -} - -// Specific configuration for the :ref:`RingHash` -// load balancing policy. -type Cluster_RingHashLbConfig struct { - // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each - // provided host) the better the request distribution will reflect the desired weights. Defaults - // to 1024 entries, and limited to 8M entries. See also - // :ref:`maximum_ring_size`. - MinimumRingSize *types.UInt64Value `protobuf:"bytes,1,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` - // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. - HashFunction Cluster_RingHashLbConfig_HashFunction `protobuf:"varint,3,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.api.v2.Cluster_RingHashLbConfig_HashFunction" json:"hash_function,omitempty"` - // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered - // to further constrain resource use. See also - // :ref:`minimum_ring_size`. - MaximumRingSize *types.UInt64Value `protobuf:"bytes,4,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_RingHashLbConfig) Reset() { *m = Cluster_RingHashLbConfig{} } -func (m *Cluster_RingHashLbConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_RingHashLbConfig) ProtoMessage() {} -func (*Cluster_RingHashLbConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 6} -} -func (m *Cluster_RingHashLbConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_RingHashLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_RingHashLbConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_RingHashLbConfig.Merge(m, src) -} -func (m *Cluster_RingHashLbConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_RingHashLbConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_RingHashLbConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_RingHashLbConfig proto.InternalMessageInfo - -func (m *Cluster_RingHashLbConfig) GetMinimumRingSize() *types.UInt64Value { - if m != nil { - return m.MinimumRingSize - } - return nil -} - -func (m *Cluster_RingHashLbConfig) GetHashFunction() Cluster_RingHashLbConfig_HashFunction { - if m != nil { - return m.HashFunction - } - return Cluster_RingHashLbConfig_XX_HASH -} - -func (m *Cluster_RingHashLbConfig) GetMaximumRingSize() *types.UInt64Value { - if m != nil { - return m.MaximumRingSize - } - return nil -} - -// Specific configuration for the -// :ref:`Original Destination ` -// load balancing policy. -type Cluster_OriginalDstLbConfig struct { - // When true, :ref:`x-envoy-original-dst-host - // ` can be used to override destination - // address. - // - // .. attention:: - // - // This header isn't sanitized by default, so enabling this feature allows HTTP clients to - // route traffic to arbitrary hosts and/or ports, which may have serious security - // consequences. - UseHttpHeader bool `protobuf:"varint,1,opt,name=use_http_header,json=useHttpHeader,proto3" json:"use_http_header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_OriginalDstLbConfig) Reset() { *m = Cluster_OriginalDstLbConfig{} } -func (m *Cluster_OriginalDstLbConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_OriginalDstLbConfig) ProtoMessage() {} -func (*Cluster_OriginalDstLbConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 7} -} -func (m *Cluster_OriginalDstLbConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_OriginalDstLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_OriginalDstLbConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_OriginalDstLbConfig.Merge(m, src) -} -func (m *Cluster_OriginalDstLbConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_OriginalDstLbConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_OriginalDstLbConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_OriginalDstLbConfig proto.InternalMessageInfo - -func (m *Cluster_OriginalDstLbConfig) GetUseHttpHeader() bool { - if m != nil { - return m.UseHttpHeader - } - return false -} - -// Common configuration for all load balancer implementations. -type Cluster_CommonLbConfig struct { - // Configures the :ref:`healthy panic threshold `. - // If not specified, the default is 50%. - // - // .. note:: - // The specified percent will be truncated to the nearest 1%. - HealthyPanicThreshold *_type.Percent `protobuf:"bytes,1,opt,name=healthy_panic_threshold,json=healthyPanicThreshold,proto3" json:"healthy_panic_threshold,omitempty"` - // Types that are valid to be assigned to LocalityConfigSpecifier: - // *Cluster_CommonLbConfig_ZoneAwareLbConfig_ - // *Cluster_CommonLbConfig_LocalityWeightedLbConfig_ - LocalityConfigSpecifier isCluster_CommonLbConfig_LocalityConfigSpecifier `protobuf_oneof:"locality_config_specifier"` - // If set, all health check/weight/metadata updates that happen within this duration will be - // merged and delivered in one shot when the duration expires. The start of the duration is when - // the first update happens. This is useful for big clusters, with potentially noisy deploys - // that might trigger excessive CPU usage due to a constant stream of healthcheck state changes - // or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new - // cluster). - // - // If this is not set, we default to a merge window of 1000ms. To disable it, set the merge - // window to 0. - // - // Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is - // because merging those updates isn't currently safe. See - // https://github.com/envoyproxy/envoy/pull/3941. - UpdateMergeWindow *types.Duration `protobuf:"bytes,4,opt,name=update_merge_window,json=updateMergeWindow,proto3" json:"update_merge_window,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_CommonLbConfig) Reset() { *m = Cluster_CommonLbConfig{} } -func (m *Cluster_CommonLbConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_CommonLbConfig) ProtoMessage() {} -func (*Cluster_CommonLbConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 8} -} -func (m *Cluster_CommonLbConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_CommonLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_CommonLbConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_CommonLbConfig.Merge(m, src) -} -func (m *Cluster_CommonLbConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_CommonLbConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_CommonLbConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_CommonLbConfig proto.InternalMessageInfo - -type isCluster_CommonLbConfig_LocalityConfigSpecifier interface { - isCluster_CommonLbConfig_LocalityConfigSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type Cluster_CommonLbConfig_ZoneAwareLbConfig_ struct { - ZoneAwareLbConfig *Cluster_CommonLbConfig_ZoneAwareLbConfig `protobuf:"bytes,2,opt,name=zone_aware_lb_config,json=zoneAwareLbConfig,proto3,oneof"` -} -type Cluster_CommonLbConfig_LocalityWeightedLbConfig_ struct { - LocalityWeightedLbConfig *Cluster_CommonLbConfig_LocalityWeightedLbConfig `protobuf:"bytes,3,opt,name=locality_weighted_lb_config,json=localityWeightedLbConfig,proto3,oneof"` -} - -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig_) isCluster_CommonLbConfig_LocalityConfigSpecifier() {} -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_) isCluster_CommonLbConfig_LocalityConfigSpecifier() { -} - -func (m *Cluster_CommonLbConfig) GetLocalityConfigSpecifier() isCluster_CommonLbConfig_LocalityConfigSpecifier { - if m != nil { - return m.LocalityConfigSpecifier - } - return nil -} - -func (m *Cluster_CommonLbConfig) GetHealthyPanicThreshold() *_type.Percent { - if m != nil { - return m.HealthyPanicThreshold - } - return nil -} - -func (m *Cluster_CommonLbConfig) GetZoneAwareLbConfig() *Cluster_CommonLbConfig_ZoneAwareLbConfig { - if x, ok := m.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_ZoneAwareLbConfig_); ok { - return x.ZoneAwareLbConfig - } - return nil -} - -func (m *Cluster_CommonLbConfig) GetLocalityWeightedLbConfig() *Cluster_CommonLbConfig_LocalityWeightedLbConfig { - if x, ok := m.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_LocalityWeightedLbConfig_); ok { - return x.LocalityWeightedLbConfig - } - return nil -} - -func (m *Cluster_CommonLbConfig) GetUpdateMergeWindow() *types.Duration { - if m != nil { - return m.UpdateMergeWindow - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Cluster_CommonLbConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Cluster_CommonLbConfig_OneofMarshaler, _Cluster_CommonLbConfig_OneofUnmarshaler, _Cluster_CommonLbConfig_OneofSizer, []interface{}{ - (*Cluster_CommonLbConfig_ZoneAwareLbConfig_)(nil), - (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_)(nil), - } -} - -func _Cluster_CommonLbConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Cluster_CommonLbConfig) - // locality_config_specifier - switch x := m.LocalityConfigSpecifier.(type) { - case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ZoneAwareLbConfig); err != nil { - return err - } - case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.LocalityWeightedLbConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Cluster_CommonLbConfig.LocalityConfigSpecifier has unexpected type %T", x) - } - return nil -} - -func _Cluster_CommonLbConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Cluster_CommonLbConfig) - switch tag { - case 2: // locality_config_specifier.zone_aware_lb_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Cluster_CommonLbConfig_ZoneAwareLbConfig) - err := b.DecodeMessage(msg) - m.LocalityConfigSpecifier = &Cluster_CommonLbConfig_ZoneAwareLbConfig_{msg} - return true, err - case 3: // locality_config_specifier.locality_weighted_lb_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Cluster_CommonLbConfig_LocalityWeightedLbConfig) - err := b.DecodeMessage(msg) - m.LocalityConfigSpecifier = &Cluster_CommonLbConfig_LocalityWeightedLbConfig_{msg} - return true, err - default: - return false, nil - } -} - -func _Cluster_CommonLbConfig_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Cluster_CommonLbConfig) - // locality_config_specifier - switch x := m.LocalityConfigSpecifier.(type) { - case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: - s := proto.Size(x.ZoneAwareLbConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: - s := proto.Size(x.LocalityWeightedLbConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Configuration for :ref:`zone aware routing -// `. -type Cluster_CommonLbConfig_ZoneAwareLbConfig struct { - // Configures percentage of requests that will be considered for zone aware routing - // if zone aware routing is configured. If not specified, the default is 100%. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - RoutingEnabled *_type.Percent `protobuf:"bytes,1,opt,name=routing_enabled,json=routingEnabled,proto3" json:"routing_enabled,omitempty"` - // Configures minimum upstream cluster size required for zone aware routing - // If upstream cluster size is less than specified, zone aware routing is not performed - // even if zone aware routing is configured. If not specified, the default is 6. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - MinClusterSize *types.UInt64Value `protobuf:"bytes,2,opt,name=min_cluster_size,json=minClusterSize,proto3" json:"min_cluster_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Reset() { - *m = Cluster_CommonLbConfig_ZoneAwareLbConfig{} -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) String() string { return proto.CompactTextString(m) } -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoMessage() {} -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 8, 0} -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.Merge(m, src) -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig proto.InternalMessageInfo - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *_type.Percent { - if m != nil { - return m.RoutingEnabled - } - return nil -} - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetMinClusterSize() *types.UInt64Value { - if m != nil { - return m.MinClusterSize - } - return nil -} - -// Configuration for :ref:`locality weighted load balancing -// ` -type Cluster_CommonLbConfig_LocalityWeightedLbConfig struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Reset() { - *m = Cluster_CommonLbConfig_LocalityWeightedLbConfig{} -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) String() string { - return proto.CompactTextString(m) -} -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoMessage() {} -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{0, 8, 1} -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.Merge(m, src) -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Size() int { - return m.Size() -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig proto.InternalMessageInfo - -// An extensible structure containing the address Envoy should bind to when -// establishing upstream connections. -type UpstreamBindConfig struct { - // The address Envoy should bind to when establishing upstream connections. - SourceAddress *core.Address `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpstreamBindConfig) Reset() { *m = UpstreamBindConfig{} } -func (m *UpstreamBindConfig) String() string { return proto.CompactTextString(m) } -func (*UpstreamBindConfig) ProtoMessage() {} -func (*UpstreamBindConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{1} -} -func (m *UpstreamBindConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpstreamBindConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UpstreamBindConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpstreamBindConfig.Merge(m, src) -} -func (m *UpstreamBindConfig) XXX_Size() int { - return m.Size() -} -func (m *UpstreamBindConfig) XXX_DiscardUnknown() { - xxx_messageInfo_UpstreamBindConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_UpstreamBindConfig proto.InternalMessageInfo - -func (m *UpstreamBindConfig) GetSourceAddress() *core.Address { - if m != nil { - return m.SourceAddress - } - return nil -} - -type UpstreamConnectionOptions struct { - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - TcpKeepalive *core.TcpKeepalive `protobuf:"bytes,1,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcp_keepalive,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpstreamConnectionOptions) Reset() { *m = UpstreamConnectionOptions{} } -func (m *UpstreamConnectionOptions) String() string { return proto.CompactTextString(m) } -func (*UpstreamConnectionOptions) ProtoMessage() {} -func (*UpstreamConnectionOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_e73f50fbb1daa302, []int{2} -} -func (m *UpstreamConnectionOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpstreamConnectionOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UpstreamConnectionOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpstreamConnectionOptions.Merge(m, src) -} -func (m *UpstreamConnectionOptions) XXX_Size() int { - return m.Size() -} -func (m *UpstreamConnectionOptions) XXX_DiscardUnknown() { - xxx_messageInfo_UpstreamConnectionOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_UpstreamConnectionOptions proto.InternalMessageInfo - -func (m *UpstreamConnectionOptions) GetTcpKeepalive() *core.TcpKeepalive { - if m != nil { - return m.TcpKeepalive - } - return nil -} +var xxx_messageInfo_CdsDummy proto.InternalMessageInfo func init() { - proto.RegisterEnum("envoy.api.v2.Cluster_DiscoveryType", Cluster_DiscoveryType_name, Cluster_DiscoveryType_value) - proto.RegisterEnum("envoy.api.v2.Cluster_LbPolicy", Cluster_LbPolicy_name, Cluster_LbPolicy_value) - proto.RegisterEnum("envoy.api.v2.Cluster_DnsLookupFamily", Cluster_DnsLookupFamily_name, Cluster_DnsLookupFamily_value) - proto.RegisterEnum("envoy.api.v2.Cluster_ClusterProtocolSelection", Cluster_ClusterProtocolSelection_name, Cluster_ClusterProtocolSelection_value) - proto.RegisterEnum("envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy", Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name, Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value) - proto.RegisterEnum("envoy.api.v2.Cluster_RingHashLbConfig_HashFunction", Cluster_RingHashLbConfig_HashFunction_name, Cluster_RingHashLbConfig_HashFunction_value) - proto.RegisterType((*Cluster)(nil), "envoy.api.v2.Cluster") - proto.RegisterMapType((map[string]*types.Struct)(nil), "envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry") - proto.RegisterMapType((map[string]*types.Any)(nil), "envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry") - proto.RegisterType((*Cluster_CustomClusterType)(nil), "envoy.api.v2.Cluster.CustomClusterType") - proto.RegisterType((*Cluster_EdsClusterConfig)(nil), "envoy.api.v2.Cluster.EdsClusterConfig") - proto.RegisterType((*Cluster_LbSubsetConfig)(nil), "envoy.api.v2.Cluster.LbSubsetConfig") - proto.RegisterType((*Cluster_LbSubsetConfig_LbSubsetSelector)(nil), "envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector") - proto.RegisterType((*Cluster_LeastRequestLbConfig)(nil), "envoy.api.v2.Cluster.LeastRequestLbConfig") - proto.RegisterType((*Cluster_RingHashLbConfig)(nil), "envoy.api.v2.Cluster.RingHashLbConfig") - proto.RegisterType((*Cluster_OriginalDstLbConfig)(nil), "envoy.api.v2.Cluster.OriginalDstLbConfig") - proto.RegisterType((*Cluster_CommonLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig") - proto.RegisterType((*Cluster_CommonLbConfig_ZoneAwareLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig") - proto.RegisterType((*Cluster_CommonLbConfig_LocalityWeightedLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig") - proto.RegisterType((*UpstreamBindConfig)(nil), "envoy.api.v2.UpstreamBindConfig") - proto.RegisterType((*UpstreamConnectionOptions)(nil), "envoy.api.v2.UpstreamConnectionOptions") + proto.RegisterType((*CdsDummy)(nil), "envoy.api.v2.CdsDummy") } func init() { proto.RegisterFile("envoy/api/v2/cds.proto", fileDescriptor_e73f50fbb1daa302) } var fileDescriptor_e73f50fbb1daa302 = []byte{ - // 2590 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x4d, 0x73, 0x1b, 0xc7, - 0xd1, 0xe6, 0x82, 0x90, 0x05, 0x0d, 0xf1, 0xb1, 0x1c, 0x52, 0xd2, 0x0a, 0x94, 0x28, 0x0a, 0x96, - 0xf4, 0xf2, 0xd5, 0xfb, 0x06, 0x4c, 0x28, 0x7f, 0x95, 0x13, 0xdb, 0x85, 0x2f, 0x8a, 0x94, 0x41, - 0x80, 0x19, 0x80, 0xa2, 0x1d, 0x97, 0x6b, 0x3c, 0xd8, 0x1d, 0x10, 0x1b, 0x2e, 0x76, 0xd7, 0x3b, - 0xb3, 0x94, 0xa0, 0x43, 0xca, 0xf1, 0x29, 0xe7, 0xe4, 0x92, 0xfc, 0x83, 0x54, 0xf2, 0x0f, 0x72, - 0xca, 0xd1, 0xb9, 0xa5, 0x2a, 0x97, 0x9c, 0x9c, 0x94, 0x2a, 0x87, 0xe4, 0x5f, 0xa4, 0x76, 0x66, - 0x16, 0xc4, 0xc7, 0x92, 0x94, 0x53, 0x39, 0x11, 0x33, 0xfd, 0xf4, 0xd3, 0xb3, 0x3d, 0x3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, 0x80, 0x73, 0x7c, 0x48, 0x82, 0x8a, 0x27, - 0x60, 0x79, 0xae, 0x01, 0xbe, 0xac, 0x93, 0x7f, 0x17, 0x64, 0x65, 0x61, 0x51, 0x01, 0x97, 0x12, - 0xee, 0x5a, 0x9d, 0xcb, 0x43, 0x15, 0x77, 0x84, 0x96, 0x04, 0x52, 0x46, 0x57, 0x31, 0x04, 0xfa, - 0x6c, 0x67, 0x0c, 0x3f, 0x04, 0x40, 0x74, 0xd7, 0x92, 0x4a, 0x13, 0x54, 0x77, 0x13, 0x82, 0x44, - 0xc2, 0x3b, 0xe2, 0xd2, 0x88, 0xae, 0x45, 0xed, 0xb4, 0xd4, 0xbf, 0x07, 0xb2, 0x8c, 0x06, 0xa7, - 0xb6, 0x49, 0xe5, 0xad, 0x22, 0x25, 0x6f, 0x15, 0x6a, 0x2e, 0xba, 0x55, 0x14, 0x2d, 0x70, 0xe7, - 0xc2, 0x2a, 0x06, 0x75, 0xb0, 0x78, 0x42, 0x47, 0xf2, 0x73, 0x51, 0xf4, 0x13, 0x7e, 0x0f, 0x5c, - 0x39, 0x8d, 0x3a, 0x32, 0xf5, 0x6d, 0x37, 0xe7, 0xbe, 0xad, 0x23, 0x2e, 0x55, 0x48, 0xa2, 0xde, - 0x4f, 0xbd, 0xa7, 0x15, 0xfb, 0xa0, 0x74, 0x79, 0xc1, 0x4c, 0x30, 0xf5, 0x68, 0xda, 0x54, 0xb2, - 0x1b, 0x27, 0xec, 0xfc, 0x3e, 0x0d, 0xf2, 0xd3, 0x59, 0x13, 0xfa, 0xa0, 0xd0, 0x27, 0x8e, 0xd3, - 0x23, 0xe6, 0x49, 0xdc, 0x91, 0x6b, 0xe2, 0xa8, 0xfc, 0xf0, 0x75, 0x92, 0xee, 0x78, 0xb8, 0xa3, - 0x38, 0x12, 0xda, 0xf5, 0x7c, 0x7f, 0x4a, 0x06, 0x3f, 0x04, 0x79, 0x8b, 0xf6, 0x49, 0x18, 0x5d, - 0xe8, 0x84, 0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 0xc9, 0x98, 0x77, 0xe6, 0x11, 0x51, 0x08, 0xe7, 0xc8, 0xef, 0x5f, 0x0c, 0x9a, 0xb2, 0xc0, - 0x40, 0x6e, 0x87, 0x72, 0x73, 0xf0, 0xdf, 0x5b, 0xf9, 0xbd, 0xaf, 0xff, 0xf2, 0x8f, 0x5f, 0xa5, - 0xd6, 0x4a, 0x37, 0xa6, 0xfe, 0x61, 0xf2, 0xbe, 0x8a, 0x15, 0xf6, 0xbe, 0xf6, 0xa8, 0xfa, 0xd1, - 0x6f, 0x5f, 0xad, 0x6b, 0xdf, 0xbc, 0x5a, 0xd7, 0xfe, 0xfc, 0x6a, 0x5d, 0xfb, 0xeb, 0xab, 0x75, - 0xed, 0xef, 0xaf, 0xd6, 0x35, 0x50, 0xb4, 0x3d, 0xc9, 0xed, 0x07, 0xde, 0x8b, 0xd1, 0x94, 0x99, - 0x6a, 0xa6, 0x66, 0x31, 0x11, 0xbc, 0x07, 0xda, 0x2f, 0x34, 0xad, 0xf7, 0x86, 0x48, 0x16, 0x8f, - 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x13, 0x20, 0xa5, 0x48, 0x1a, 0x00, 0x00, -} - -func (this *Cluster) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster) - if !ok { - that2, ok := that.(Cluster) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.AltStatName != that1.AltStatName { - return false - } - if that1.ClusterDiscoveryType == nil { - if this.ClusterDiscoveryType != nil { - return false - } - } else if this.ClusterDiscoveryType == nil { - return false - } else if !this.ClusterDiscoveryType.Equal(that1.ClusterDiscoveryType) { - return false - } - if !this.EdsClusterConfig.Equal(that1.EdsClusterConfig) { - return false - } - if this.ConnectTimeout != that1.ConnectTimeout { - return false - } - if !this.PerConnectionBufferLimitBytes.Equal(that1.PerConnectionBufferLimitBytes) { - return false - } - if this.LbPolicy != that1.LbPolicy { - return false - } - if len(this.Hosts) != len(that1.Hosts) { - return false - } - for i := range this.Hosts { - if !this.Hosts[i].Equal(that1.Hosts[i]) { - return false - } - } - if !this.LoadAssignment.Equal(that1.LoadAssignment) { - return false - } - if len(this.HealthChecks) != len(that1.HealthChecks) { - return false - } - for i := range this.HealthChecks { - if !this.HealthChecks[i].Equal(that1.HealthChecks[i]) { - return false - } - } - if !this.MaxRequestsPerConnection.Equal(that1.MaxRequestsPerConnection) { - return false - } - if !this.CircuitBreakers.Equal(that1.CircuitBreakers) { - return false - } - if !this.TlsContext.Equal(that1.TlsContext) { - return false - } - if !this.CommonHttpProtocolOptions.Equal(that1.CommonHttpProtocolOptions) { - return false - } - if !this.HttpProtocolOptions.Equal(that1.HttpProtocolOptions) { - return false - } - if !this.Http2ProtocolOptions.Equal(that1.Http2ProtocolOptions) { - return false - } - if len(this.ExtensionProtocolOptions) != len(that1.ExtensionProtocolOptions) { - return false - } - for i := range this.ExtensionProtocolOptions { - if !this.ExtensionProtocolOptions[i].Equal(that1.ExtensionProtocolOptions[i]) { - return false - } - } - if len(this.TypedExtensionProtocolOptions) != len(that1.TypedExtensionProtocolOptions) { - return false - } - for i := range this.TypedExtensionProtocolOptions { - if !this.TypedExtensionProtocolOptions[i].Equal(that1.TypedExtensionProtocolOptions[i]) { - return false - } - } - if this.DnsRefreshRate != nil && that1.DnsRefreshRate != nil { - if *this.DnsRefreshRate != *that1.DnsRefreshRate { - return false - } - } else if this.DnsRefreshRate != nil { - return false - } else if that1.DnsRefreshRate != nil { - return false - } - if this.DnsLookupFamily != that1.DnsLookupFamily { - return false - } - if len(this.DnsResolvers) != len(that1.DnsResolvers) { - return false - } - for i := range this.DnsResolvers { - if !this.DnsResolvers[i].Equal(that1.DnsResolvers[i]) { - return false - } - } - if !this.OutlierDetection.Equal(that1.OutlierDetection) { - return false - } - if this.CleanupInterval != nil && that1.CleanupInterval != nil { - if *this.CleanupInterval != *that1.CleanupInterval { - return false - } - } else if this.CleanupInterval != nil { - return false - } else if that1.CleanupInterval != nil { - return false - } - if !this.UpstreamBindConfig.Equal(that1.UpstreamBindConfig) { - return false - } - if !this.LbSubsetConfig.Equal(that1.LbSubsetConfig) { - return false - } - if that1.LbConfig == nil { - if this.LbConfig != nil { - return false - } - } else if this.LbConfig == nil { - return false - } else if !this.LbConfig.Equal(that1.LbConfig) { - return false - } - if !this.CommonLbConfig.Equal(that1.CommonLbConfig) { - return false - } - if !this.TransportSocket.Equal(that1.TransportSocket) { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if this.ProtocolSelection != that1.ProtocolSelection { - return false - } - if !this.UpstreamConnectionOptions.Equal(that1.UpstreamConnectionOptions) { - return false - } - if this.CloseConnectionsOnHostHealthFailure != that1.CloseConnectionsOnHostHealthFailure { - return false - } - if this.DrainConnectionsOnHostRemoval != that1.DrainConnectionsOnHostRemoval { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_Type) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_Type) - if !ok { - that2, ok := that.(Cluster_Type) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - return true -} -func (this *Cluster_ClusterType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_ClusterType) - if !ok { - that2, ok := that.(Cluster_ClusterType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ClusterType.Equal(that1.ClusterType) { - return false - } - return true -} -func (this *Cluster_RingHashLbConfig_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_RingHashLbConfig_) - if !ok { - that2, ok := that.(Cluster_RingHashLbConfig_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RingHashLbConfig.Equal(that1.RingHashLbConfig) { - return false - } - return true -} -func (this *Cluster_OriginalDstLbConfig_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_OriginalDstLbConfig_) - if !ok { - that2, ok := that.(Cluster_OriginalDstLbConfig_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.OriginalDstLbConfig.Equal(that1.OriginalDstLbConfig) { - return false - } - return true -} -func (this *Cluster_LeastRequestLbConfig_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_LeastRequestLbConfig_) - if !ok { - that2, ok := that.(Cluster_LeastRequestLbConfig_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.LeastRequestLbConfig.Equal(that1.LeastRequestLbConfig) { - return false - } - return true -} -func (this *Cluster_CustomClusterType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_CustomClusterType) - if !ok { - that2, ok := that.(Cluster_CustomClusterType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_EdsClusterConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_EdsClusterConfig) - if !ok { - that2, ok := that.(Cluster_EdsClusterConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.EdsConfig.Equal(that1.EdsConfig) { - return false - } - if this.ServiceName != that1.ServiceName { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_LbSubsetConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_LbSubsetConfig) - if !ok { - that2, ok := that.(Cluster_LbSubsetConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.FallbackPolicy != that1.FallbackPolicy { - return false - } - if !this.DefaultSubset.Equal(that1.DefaultSubset) { - return false - } - if len(this.SubsetSelectors) != len(that1.SubsetSelectors) { - return false - } - for i := range this.SubsetSelectors { - if !this.SubsetSelectors[i].Equal(that1.SubsetSelectors[i]) { - return false - } - } - if this.LocalityWeightAware != that1.LocalityWeightAware { - return false - } - if this.ScaleLocalityWeight != that1.ScaleLocalityWeight { - return false - } - if this.PanicModeAny != that1.PanicModeAny { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_LbSubsetConfig_LbSubsetSelector) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_LbSubsetConfig_LbSubsetSelector) - if !ok { - that2, ok := that.(Cluster_LbSubsetConfig_LbSubsetSelector) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Keys) != len(that1.Keys) { - return false - } - for i := range this.Keys { - if this.Keys[i] != that1.Keys[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_LeastRequestLbConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_LeastRequestLbConfig) - if !ok { - that2, ok := that.(Cluster_LeastRequestLbConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ChoiceCount.Equal(that1.ChoiceCount) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_RingHashLbConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_RingHashLbConfig) - if !ok { - that2, ok := that.(Cluster_RingHashLbConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.MinimumRingSize.Equal(that1.MinimumRingSize) { - return false - } - if this.HashFunction != that1.HashFunction { - return false - } - if !this.MaximumRingSize.Equal(that1.MaximumRingSize) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_OriginalDstLbConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_OriginalDstLbConfig) - if !ok { - that2, ok := that.(Cluster_OriginalDstLbConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UseHttpHeader != that1.UseHttpHeader { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_CommonLbConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_CommonLbConfig) - if !ok { - that2, ok := that.(Cluster_CommonLbConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.HealthyPanicThreshold.Equal(that1.HealthyPanicThreshold) { - return false - } - if that1.LocalityConfigSpecifier == nil { - if this.LocalityConfigSpecifier != nil { - return false - } - } else if this.LocalityConfigSpecifier == nil { - return false - } else if !this.LocalityConfigSpecifier.Equal(that1.LocalityConfigSpecifier) { - return false - } - if !this.UpdateMergeWindow.Equal(that1.UpdateMergeWindow) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_CommonLbConfig_ZoneAwareLbConfig_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_CommonLbConfig_ZoneAwareLbConfig_) - if !ok { - that2, ok := that.(Cluster_CommonLbConfig_ZoneAwareLbConfig_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ZoneAwareLbConfig.Equal(that1.ZoneAwareLbConfig) { - return false - } - return true -} -func (this *Cluster_CommonLbConfig_LocalityWeightedLbConfig_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_CommonLbConfig_LocalityWeightedLbConfig_) - if !ok { - that2, ok := that.(Cluster_CommonLbConfig_LocalityWeightedLbConfig_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.LocalityWeightedLbConfig.Equal(that1.LocalityWeightedLbConfig) { - return false - } - return true -} -func (this *Cluster_CommonLbConfig_ZoneAwareLbConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_CommonLbConfig_ZoneAwareLbConfig) - if !ok { - that2, ok := that.(Cluster_CommonLbConfig_ZoneAwareLbConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RoutingEnabled.Equal(that1.RoutingEnabled) { - return false - } - if !this.MinClusterSize.Equal(that1.MinClusterSize) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Cluster_CommonLbConfig_LocalityWeightedLbConfig) - if !ok { - that2, ok := that.(Cluster_CommonLbConfig_LocalityWeightedLbConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UpstreamBindConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UpstreamBindConfig) - if !ok { - that2, ok := that.(UpstreamBindConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SourceAddress.Equal(that1.SourceAddress) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UpstreamConnectionOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UpstreamConnectionOptions) - if !ok { - that2, ok := that.(UpstreamConnectionOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TcpKeepalive.Equal(that1.TcpKeepalive) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0xd2, 0x4f, 0x4e, 0x29, 0xd6, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x8b, 0xeb, 0x25, 0x16, 0x64, 0xea, 0x95, 0x19, 0x49, 0xc9, 0xa0, + 0xa8, 0x4a, 0xc9, 0x2c, 0x4e, 0xce, 0x2f, 0x4b, 0x2d, 0xaa, 0x84, 0xa8, 0x95, 0x92, 0x49, 0xcf, + 0xcf, 0x4f, 0xcf, 0x49, 0x05, 0x4b, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, + 0x41, 0x4d, 0x92, 0x52, 0x80, 0xea, 0x45, 0x48, 0xe8, 0x17, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, + 0xa7, 0x42, 0x55, 0xc8, 0x95, 0xa6, 0x14, 0x24, 0xa2, 0x28, 0xc8, 0xcd, 0x4c, 0x2f, 0x4a, 0x2c, +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0x2d, 0x86, 0x04, 0xb5, 0x1e, 0x2c, 0x82, 0xca, 0x8c, 0x77, + 0x35, 0x9c, 0xb8, 0xc8, 0xc6, 0x24, 0xc0, 0xc8, 0x25, 0x95, 0x99, 0x0f, 0x71, 0x53, 0x41, 0x51, + 0x7e, 0x45, 0x25, 0x8a, 0xf3, 0x9c, 0x40, 0xf1, 0x17, 0x00, 0x8a, 0xcb, 0x00, 0xc6, 0x0e, 0x46, + 0xc6, 0x00, 0xd6, 0x24, 0x36, 0x70, 0xcc, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x92, 0xc7, + 0xb6, 0xad, 0xba, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2794,6 +194,20 @@ type ClusterDiscoveryServiceServer interface { FetchClusters(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) } +// UnimplementedClusterDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedClusterDiscoveryServiceServer struct { +} + +func (*UnimplementedClusterDiscoveryServiceServer) StreamClusters(srv ClusterDiscoveryService_StreamClustersServer) error { + return status.Errorf(codes.Unimplemented, "method StreamClusters not implemented") +} +func (*UnimplementedClusterDiscoveryServiceServer) DeltaClusters(srv ClusterDiscoveryService_DeltaClustersServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaClusters not implemented") +} +func (*UnimplementedClusterDiscoveryServiceServer) FetchClusters(ctx context.Context, req *DiscoveryRequest) (*DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchClusters not implemented") +} + func RegisterClusterDiscoveryServiceServer(s *grpc.Server, srv ClusterDiscoveryServiceServer) { s.RegisterService(&_ClusterDiscoveryService_serviceDesc, srv) } @@ -2893,4400 +307,3 @@ var _ClusterDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, Metadata: "envoy/api/v2/cds.proto", } - -func (m *Cluster) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ClusterDiscoveryType != nil { - nn1, err := m.ClusterDiscoveryType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.EdsClusterConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCds(dAtA, i, uint64(m.EdsClusterConfig.Size())) - n2, err := m.EdsClusterConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - dAtA[i] = 0x22 - i++ - i = encodeVarintCds(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.ConnectTimeout))) - n3, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.ConnectTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if m.PerConnectionBufferLimitBytes != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintCds(dAtA, i, uint64(m.PerConnectionBufferLimitBytes.Size())) - n4, err := m.PerConnectionBufferLimitBytes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.LbPolicy != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.LbPolicy)) - } - if len(m.Hosts) > 0 { - for _, msg := range m.Hosts { - dAtA[i] = 0x3a - i++ - i = encodeVarintCds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.HealthChecks) > 0 { - for _, msg := range m.HealthChecks { - dAtA[i] = 0x42 - i++ - i = encodeVarintCds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.MaxRequestsPerConnection != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintCds(dAtA, i, uint64(m.MaxRequestsPerConnection.Size())) - n5, err := m.MaxRequestsPerConnection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.CircuitBreakers != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.CircuitBreakers.Size())) - n6, err := m.CircuitBreakers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.TlsContext != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintCds(dAtA, i, uint64(m.TlsContext.Size())) - n7, err := m.TlsContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.HttpProtocolOptions != nil { - dAtA[i] = 0x6a - i++ - i = encodeVarintCds(dAtA, i, uint64(m.HttpProtocolOptions.Size())) - n8, err := m.HttpProtocolOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Http2ProtocolOptions != nil { - dAtA[i] = 0x72 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.Http2ProtocolOptions.Size())) - n9, err := m.Http2ProtocolOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.DnsRefreshRate != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.DnsRefreshRate))) - n10, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.DnsRefreshRate, dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.DnsLookupFamily != 0 { - dAtA[i] = 0x88 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.DnsLookupFamily)) - } - if len(m.DnsResolvers) > 0 { - for _, msg := range m.DnsResolvers { - dAtA[i] = 0x92 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.OutlierDetection != nil { - dAtA[i] = 0x9a - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.OutlierDetection.Size())) - n11, err := m.OutlierDetection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.CleanupInterval != nil { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.CleanupInterval))) - n12, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.CleanupInterval, dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if m.UpstreamBindConfig != nil { - dAtA[i] = 0xaa - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.UpstreamBindConfig.Size())) - n13, err := m.UpstreamBindConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - if m.LbSubsetConfig != nil { - dAtA[i] = 0xb2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.LbSubsetConfig.Size())) - n14, err := m.LbSubsetConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - if m.LbConfig != nil { - nn15, err := m.LbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn15 - } - if m.TransportSocket != nil { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.TransportSocket.Size())) - n16, err := m.TransportSocket.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.Metadata != nil { - dAtA[i] = 0xca - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.Metadata.Size())) - n17, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.ProtocolSelection != 0 { - dAtA[i] = 0xd0 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.ProtocolSelection)) - } - if m.CommonLbConfig != nil { - dAtA[i] = 0xda - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.CommonLbConfig.Size())) - n18, err := m.CommonLbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if len(m.AltStatName) > 0 { - dAtA[i] = 0xe2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(len(m.AltStatName))) - i += copy(dAtA[i:], m.AltStatName) - } - if m.CommonHttpProtocolOptions != nil { - dAtA[i] = 0xea - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.CommonHttpProtocolOptions.Size())) - n19, err := m.CommonHttpProtocolOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.UpstreamConnectionOptions != nil { - dAtA[i] = 0xf2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.UpstreamConnectionOptions.Size())) - n20, err := m.UpstreamConnectionOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if m.CloseConnectionsOnHostHealthFailure { - dAtA[i] = 0xf8 - i++ - dAtA[i] = 0x1 - i++ - if m.CloseConnectionsOnHostHealthFailure { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.DrainConnectionsOnHostRemoval { - dAtA[i] = 0x80 - i++ - dAtA[i] = 0x2 - i++ - if m.DrainConnectionsOnHostRemoval { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.LoadAssignment != nil { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x2 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.LoadAssignment.Size())) - n21, err := m.LoadAssignment.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - if len(m.ExtensionProtocolOptions) > 0 { - keysForExtensionProtocolOptions := make([]string, 0, len(m.ExtensionProtocolOptions)) - for k, _ := range m.ExtensionProtocolOptions { - keysForExtensionProtocolOptions = append(keysForExtensionProtocolOptions, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtensionProtocolOptions) - for _, k := range keysForExtensionProtocolOptions { - dAtA[i] = 0x9a - i++ - dAtA[i] = 0x2 - i++ - v := m.ExtensionProtocolOptions[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovCds(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovCds(uint64(len(k))) + msgSize - i = encodeVarintCds(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(v.Size())) - n22, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - } - } - if len(m.TypedExtensionProtocolOptions) > 0 { - keysForTypedExtensionProtocolOptions := make([]string, 0, len(m.TypedExtensionProtocolOptions)) - for k, _ := range m.TypedExtensionProtocolOptions { - keysForTypedExtensionProtocolOptions = append(keysForTypedExtensionProtocolOptions, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForTypedExtensionProtocolOptions) - for _, k := range keysForTypedExtensionProtocolOptions { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x2 - i++ - v := m.TypedExtensionProtocolOptions[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovCds(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovCds(uint64(len(k))) + msgSize - i = encodeVarintCds(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(v.Size())) - n23, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_Type) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x10 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.Type)) - return i, nil -} -func (m *Cluster_RingHashLbConfig_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.RingHashLbConfig != nil { - dAtA[i] = 0xba - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.RingHashLbConfig.Size())) - n24, err := m.RingHashLbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - return i, nil -} -func (m *Cluster_OriginalDstLbConfig_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.OriginalDstLbConfig != nil { - dAtA[i] = 0x92 - i++ - dAtA[i] = 0x2 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.OriginalDstLbConfig.Size())) - n25, err := m.OriginalDstLbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n25 - } - return i, nil -} -func (m *Cluster_LeastRequestLbConfig_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.LeastRequestLbConfig != nil { - dAtA[i] = 0xaa - i++ - dAtA[i] = 0x2 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.LeastRequestLbConfig.Size())) - n26, err := m.LeastRequestLbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } - return i, nil -} -func (m *Cluster_ClusterType) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ClusterType != nil { - dAtA[i] = 0xb2 - i++ - dAtA[i] = 0x2 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.ClusterType.Size())) - n27, err := m.ClusterType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - return i, nil -} -func (m *Cluster_CustomClusterType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_CustomClusterType) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.TypedConfig != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.TypedConfig.Size())) - n28, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n28 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_EdsClusterConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_EdsClusterConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.EdsConfig != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.EdsConfig.Size())) - n29, err := m.EdsConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n29 - } - if len(m.ServiceName) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(len(m.ServiceName))) - i += copy(dAtA[i:], m.ServiceName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_LbSubsetConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_LbSubsetConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FallbackPolicy != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.FallbackPolicy)) - } - if m.DefaultSubset != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.DefaultSubset.Size())) - n30, err := m.DefaultSubset.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 - } - if len(m.SubsetSelectors) > 0 { - for _, msg := range m.SubsetSelectors { - dAtA[i] = 0x1a - i++ - i = encodeVarintCds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.LocalityWeightAware { - dAtA[i] = 0x20 - i++ - if m.LocalityWeightAware { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.ScaleLocalityWeight { - dAtA[i] = 0x28 - i++ - if m.ScaleLocalityWeight { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.PanicModeAny { - dAtA[i] = 0x30 - i++ - if m.PanicModeAny { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for _, s := range m.Keys { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_LeastRequestLbConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_LeastRequestLbConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ChoiceCount != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.ChoiceCount.Size())) - n31, err := m.ChoiceCount.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n31 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_RingHashLbConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_RingHashLbConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MinimumRingSize != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.MinimumRingSize.Size())) - n32, err := m.MinimumRingSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n32 - } - if m.HashFunction != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.HashFunction)) - } - if m.MaximumRingSize != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.MaximumRingSize.Size())) - n33, err := m.MaximumRingSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n33 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_OriginalDstLbConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_OriginalDstLbConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.UseHttpHeader { - dAtA[i] = 0x8 - i++ - if m.UseHttpHeader { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_CommonLbConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_CommonLbConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.HealthyPanicThreshold != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.HealthyPanicThreshold.Size())) - n34, err := m.HealthyPanicThreshold.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n34 - } - if m.LocalityConfigSpecifier != nil { - nn35, err := m.LocalityConfigSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn35 - } - if m.UpdateMergeWindow != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.UpdateMergeWindow.Size())) - n36, err := m.UpdateMergeWindow.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n36 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ZoneAwareLbConfig != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.ZoneAwareLbConfig.Size())) - n37, err := m.ZoneAwareLbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n37 - } - return i, nil -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.LocalityWeightedLbConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCds(dAtA, i, uint64(m.LocalityWeightedLbConfig.Size())) - n38, err := m.LocalityWeightedLbConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n38 - } - return i, nil -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.RoutingEnabled != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.RoutingEnabled.Size())) - n39, err := m.RoutingEnabled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n39 - } - if m.MinClusterSize != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCds(dAtA, i, uint64(m.MinClusterSize.Size())) - n40, err := m.MinClusterSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n40 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UpstreamBindConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpstreamBindConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.SourceAddress != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.SourceAddress.Size())) - n41, err := m.SourceAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n41 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UpstreamConnectionOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpstreamConnectionOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TcpKeepalive != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintCds(dAtA, i, uint64(m.TcpKeepalive.Size())) - n42, err := m.TcpKeepalive.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n42 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintCds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Cluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCds(uint64(l)) - } - if m.ClusterDiscoveryType != nil { - n += m.ClusterDiscoveryType.Size() - } - if m.EdsClusterConfig != nil { - l = m.EdsClusterConfig.Size() - n += 1 + l + sovCds(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.ConnectTimeout) - n += 1 + l + sovCds(uint64(l)) - if m.PerConnectionBufferLimitBytes != nil { - l = m.PerConnectionBufferLimitBytes.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.LbPolicy != 0 { - n += 1 + sovCds(uint64(m.LbPolicy)) - } - if len(m.Hosts) > 0 { - for _, e := range m.Hosts { - l = e.Size() - n += 1 + l + sovCds(uint64(l)) - } - } - if len(m.HealthChecks) > 0 { - for _, e := range m.HealthChecks { - l = e.Size() - n += 1 + l + sovCds(uint64(l)) - } - } - if m.MaxRequestsPerConnection != nil { - l = m.MaxRequestsPerConnection.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.CircuitBreakers != nil { - l = m.CircuitBreakers.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.TlsContext != nil { - l = m.TlsContext.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.HttpProtocolOptions != nil { - l = m.HttpProtocolOptions.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.Http2ProtocolOptions != nil { - l = m.Http2ProtocolOptions.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.DnsRefreshRate != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.DnsRefreshRate) - n += 2 + l + sovCds(uint64(l)) - } - if m.DnsLookupFamily != 0 { - n += 2 + sovCds(uint64(m.DnsLookupFamily)) - } - if len(m.DnsResolvers) > 0 { - for _, e := range m.DnsResolvers { - l = e.Size() - n += 2 + l + sovCds(uint64(l)) - } - } - if m.OutlierDetection != nil { - l = m.OutlierDetection.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.CleanupInterval != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.CleanupInterval) - n += 2 + l + sovCds(uint64(l)) - } - if m.UpstreamBindConfig != nil { - l = m.UpstreamBindConfig.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.LbSubsetConfig != nil { - l = m.LbSubsetConfig.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.LbConfig != nil { - n += m.LbConfig.Size() - } - if m.TransportSocket != nil { - l = m.TransportSocket.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.ProtocolSelection != 0 { - n += 2 + sovCds(uint64(m.ProtocolSelection)) - } - if m.CommonLbConfig != nil { - l = m.CommonLbConfig.Size() - n += 2 + l + sovCds(uint64(l)) - } - l = len(m.AltStatName) - if l > 0 { - n += 2 + l + sovCds(uint64(l)) - } - if m.CommonHttpProtocolOptions != nil { - l = m.CommonHttpProtocolOptions.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.UpstreamConnectionOptions != nil { - l = m.UpstreamConnectionOptions.Size() - n += 2 + l + sovCds(uint64(l)) - } - if m.CloseConnectionsOnHostHealthFailure { - n += 3 - } - if m.DrainConnectionsOnHostRemoval { - n += 3 - } - if m.LoadAssignment != nil { - l = m.LoadAssignment.Size() - n += 2 + l + sovCds(uint64(l)) - } - if len(m.ExtensionProtocolOptions) > 0 { - for k, v := range m.ExtensionProtocolOptions { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovCds(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovCds(uint64(len(k))) + l - n += mapEntrySize + 2 + sovCds(uint64(mapEntrySize)) - } - } - if len(m.TypedExtensionProtocolOptions) > 0 { - for k, v := range m.TypedExtensionProtocolOptions { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovCds(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovCds(uint64(len(k))) + l - n += mapEntrySize + 2 + sovCds(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_Type) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovCds(uint64(m.Type)) - return n -} -func (m *Cluster_RingHashLbConfig_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RingHashLbConfig != nil { - l = m.RingHashLbConfig.Size() - n += 2 + l + sovCds(uint64(l)) - } - return n -} -func (m *Cluster_OriginalDstLbConfig_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OriginalDstLbConfig != nil { - l = m.OriginalDstLbConfig.Size() - n += 2 + l + sovCds(uint64(l)) - } - return n -} -func (m *Cluster_LeastRequestLbConfig_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LeastRequestLbConfig != nil { - l = m.LeastRequestLbConfig.Size() - n += 2 + l + sovCds(uint64(l)) - } - return n -} -func (m *Cluster_ClusterType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClusterType != nil { - l = m.ClusterType.Size() - n += 2 + l + sovCds(uint64(l)) - } - return n -} -func (m *Cluster_CustomClusterType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCds(uint64(l)) - } - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_EdsClusterConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EdsConfig != nil { - l = m.EdsConfig.Size() - n += 1 + l + sovCds(uint64(l)) - } - l = len(m.ServiceName) - if l > 0 { - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_LbSubsetConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FallbackPolicy != 0 { - n += 1 + sovCds(uint64(m.FallbackPolicy)) - } - if m.DefaultSubset != nil { - l = m.DefaultSubset.Size() - n += 1 + l + sovCds(uint64(l)) - } - if len(m.SubsetSelectors) > 0 { - for _, e := range m.SubsetSelectors { - l = e.Size() - n += 1 + l + sovCds(uint64(l)) - } - } - if m.LocalityWeightAware { - n += 2 - } - if m.ScaleLocalityWeight { - n += 2 - } - if m.PanicModeAny { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Keys) > 0 { - for _, s := range m.Keys { - l = len(s) - n += 1 + l + sovCds(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_LeastRequestLbConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChoiceCount != nil { - l = m.ChoiceCount.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_RingHashLbConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinimumRingSize != nil { - l = m.MinimumRingSize.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.HashFunction != 0 { - n += 1 + sovCds(uint64(m.HashFunction)) - } - if m.MaximumRingSize != nil { - l = m.MaximumRingSize.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_OriginalDstLbConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UseHttpHeader { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_CommonLbConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HealthyPanicThreshold != nil { - l = m.HealthyPanicThreshold.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.LocalityConfigSpecifier != nil { - n += m.LocalityConfigSpecifier.Size() - } - if m.UpdateMergeWindow != nil { - l = m.UpdateMergeWindow.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ZoneAwareLbConfig != nil { - l = m.ZoneAwareLbConfig.Size() - n += 1 + l + sovCds(uint64(l)) - } - return n -} -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LocalityWeightedLbConfig != nil { - l = m.LocalityWeightedLbConfig.Size() - n += 1 + l + sovCds(uint64(l)) - } - return n -} -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RoutingEnabled != nil { - l = m.RoutingEnabled.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.MinClusterSize != nil { - l = m.MinClusterSize.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) 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 *UpstreamBindConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SourceAddress != nil { - l = m.SourceAddress.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpstreamConnectionOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TcpKeepalive != nil { - l = m.TcpKeepalive.Size() - n += 1 + l + sovCds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCds(x uint64) (n int) { - return sovCds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Cluster) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Cluster: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Cluster: 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 ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCds - } - 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 Type", wireType) - } - var v Cluster_DiscoveryType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Cluster_DiscoveryType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClusterDiscoveryType = &Cluster_Type{v} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EdsClusterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EdsClusterConfig == nil { - m.EdsClusterConfig = &Cluster_EdsClusterConfig{} - } - if err := m.EdsClusterConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.ConnectTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerConnectionBufferLimitBytes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerConnectionBufferLimitBytes == nil { - m.PerConnectionBufferLimitBytes = &types.UInt32Value{} - } - if err := m.PerConnectionBufferLimitBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LbPolicy", wireType) - } - m.LbPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LbPolicy |= Cluster_LbPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hosts = append(m.Hosts, &core.Address{}) - if err := m.Hosts[len(m.Hosts)-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 HealthChecks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HealthChecks = append(m.HealthChecks, &core.HealthCheck{}) - if err := m.HealthChecks[len(m.HealthChecks)-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 MaxRequestsPerConnection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxRequestsPerConnection == nil { - m.MaxRequestsPerConnection = &types.UInt32Value{} - } - if err := m.MaxRequestsPerConnection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CircuitBreakers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CircuitBreakers == nil { - m.CircuitBreakers = &cluster.CircuitBreakers{} - } - if err := m.CircuitBreakers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TlsContext == nil { - m.TlsContext = &auth.UpstreamTlsContext{} - } - if err := m.TlsContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HttpProtocolOptions == nil { - m.HttpProtocolOptions = &core.Http1ProtocolOptions{} - } - if err := m.HttpProtocolOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http2ProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Http2ProtocolOptions == nil { - m.Http2ProtocolOptions = &core.Http2ProtocolOptions{} - } - if err := m.Http2ProtocolOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DnsRefreshRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DnsRefreshRate == nil { - m.DnsRefreshRate = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.DnsRefreshRate, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DnsLookupFamily", wireType) - } - m.DnsLookupFamily = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DnsLookupFamily |= Cluster_DnsLookupFamily(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DnsResolvers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DnsResolvers = append(m.DnsResolvers, &core.Address{}) - if err := m.DnsResolvers[len(m.DnsResolvers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutlierDetection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutlierDetection == nil { - m.OutlierDetection = &cluster.OutlierDetection{} - } - if err := m.OutlierDetection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CleanupInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CleanupInterval == nil { - m.CleanupInterval = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.CleanupInterval, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpstreamBindConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpstreamBindConfig == nil { - m.UpstreamBindConfig = &core.BindConfig{} - } - if err := m.UpstreamBindConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LbSubsetConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LbSubsetConfig == nil { - m.LbSubsetConfig = &Cluster_LbSubsetConfig{} - } - if err := m.LbSubsetConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RingHashLbConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Cluster_RingHashLbConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.LbConfig = &Cluster_RingHashLbConfig_{v} - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransportSocket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransportSocket == nil { - m.TransportSocket = &core.TransportSocket{} - } - if err := m.TransportSocket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &core.Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtocolSelection", wireType) - } - m.ProtocolSelection = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProtocolSelection |= Cluster_ClusterProtocolSelection(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonLbConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommonLbConfig == nil { - m.CommonLbConfig = &Cluster_CommonLbConfig{} - } - if err := m.CommonLbConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltStatName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltStatName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonHttpProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommonHttpProtocolOptions == nil { - m.CommonHttpProtocolOptions = &core.HttpProtocolOptions{} - } - if err := m.CommonHttpProtocolOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpstreamConnectionOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpstreamConnectionOptions == nil { - m.UpstreamConnectionOptions = &UpstreamConnectionOptions{} - } - if err := m.UpstreamConnectionOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CloseConnectionsOnHostHealthFailure", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CloseConnectionsOnHostHealthFailure = bool(v != 0) - case 32: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DrainConnectionsOnHostRemoval", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DrainConnectionsOnHostRemoval = bool(v != 0) - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadAssignment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LoadAssignment == nil { - m.LoadAssignment = &ClusterLoadAssignment{} - } - if err := m.LoadAssignment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalDstLbConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Cluster_OriginalDstLbConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.LbConfig = &Cluster_OriginalDstLbConfig_{v} - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtensionProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExtensionProtocolOptions == nil { - m.ExtensionProtocolOptions = make(map[string]*types.Struct) - } - var mapkey string - var mapvalue *types.Struct - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - 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 ErrIntOverflowCds - } - 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 ErrInvalidLengthCds - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthCds - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCds - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthCds - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Struct{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ExtensionProtocolOptions[mapkey] = mapvalue - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedExtensionProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TypedExtensionProtocolOptions == nil { - m.TypedExtensionProtocolOptions = make(map[string]*types.Any) - } - var mapkey string - var mapvalue *types.Any - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - 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 ErrIntOverflowCds - } - 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 ErrInvalidLengthCds - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthCds - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCds - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthCds - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Any{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.TypedExtensionProtocolOptions[mapkey] = mapvalue - iNdEx = postIndex - case 37: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeastRequestLbConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Cluster_LeastRequestLbConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.LbConfig = &Cluster_LeastRequestLbConfig_{v} - iNdEx = postIndex - case 38: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Cluster_CustomClusterType{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ClusterDiscoveryType = &Cluster_ClusterType{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_CustomClusterType) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomClusterType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomClusterType: 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 ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCds - } - 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 TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TypedConfig == nil { - m.TypedConfig = &types.Any{} - } - if err := m.TypedConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_EdsClusterConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EdsClusterConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EdsClusterConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EdsConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EdsConfig == nil { - m.EdsConfig = &core.ConfigSource{} - } - if err := m.EdsConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_LbSubsetConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LbSubsetConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LbSubsetConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FallbackPolicy", wireType) - } - m.FallbackPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FallbackPolicy |= Cluster_LbSubsetConfig_LbSubsetFallbackPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSubset", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DefaultSubset == nil { - m.DefaultSubset = &types.Struct{} - } - if err := m.DefaultSubset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubsetSelectors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubsetSelectors = append(m.SubsetSelectors, &Cluster_LbSubsetConfig_LbSubsetSelector{}) - if err := m.SubsetSelectors[len(m.SubsetSelectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalityWeightAware", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocalityWeightAware = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ScaleLocalityWeight", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ScaleLocalityWeight = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PanicModeAny", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PanicModeAny = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_LbSubsetConfig_LbSubsetSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LbSubsetSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LbSubsetSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_LeastRequestLbConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeastRequestLbConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeastRequestLbConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChoiceCount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChoiceCount == nil { - m.ChoiceCount = &types.UInt32Value{} - } - if err := m.ChoiceCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_RingHashLbConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RingHashLbConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RingHashLbConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumRingSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinimumRingSize == nil { - m.MinimumRingSize = &types.UInt64Value{} - } - if err := m.MinimumRingSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HashFunction", wireType) - } - m.HashFunction = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HashFunction |= Cluster_RingHashLbConfig_HashFunction(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumRingSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaximumRingSize == nil { - m.MaximumRingSize = &types.UInt64Value{} - } - if err := m.MaximumRingSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_OriginalDstLbConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OriginalDstLbConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OriginalDstLbConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UseHttpHeader", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UseHttpHeader = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_CommonLbConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommonLbConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommonLbConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthyPanicThreshold", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HealthyPanicThreshold == nil { - m.HealthyPanicThreshold = &_type.Percent{} - } - if err := m.HealthyPanicThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ZoneAwareLbConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Cluster_CommonLbConfig_ZoneAwareLbConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.LocalityConfigSpecifier = &Cluster_CommonLbConfig_ZoneAwareLbConfig_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalityWeightedLbConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Cluster_CommonLbConfig_LocalityWeightedLbConfig{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.LocalityConfigSpecifier = &Cluster_CommonLbConfig_LocalityWeightedLbConfig_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateMergeWindow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpdateMergeWindow == nil { - m.UpdateMergeWindow = &types.Duration{} - } - if err := m.UpdateMergeWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_CommonLbConfig_ZoneAwareLbConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ZoneAwareLbConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZoneAwareLbConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoutingEnabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RoutingEnabled == nil { - m.RoutingEnabled = &_type.Percent{} - } - if err := m.RoutingEnabled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinClusterSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinClusterSize == nil { - m.MinClusterSize = &types.UInt64Value{} - } - if err := m.MinClusterSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalityWeightedLbConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalityWeightedLbConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *UpstreamBindConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpstreamBindConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpstreamBindConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceAddress == nil { - m.SourceAddress = &core.Address{} - } - if err := m.SourceAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 *UpstreamConnectionOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpstreamConnectionOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpstreamConnectionOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TcpKeepalive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TcpKeepalive == nil { - m.TcpKeepalive = &core.TcpKeepalive{} - } - if err := m.TcpKeepalive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCds - } - 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 skipCds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCds - } - 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, ErrIntOverflowCds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCds - } - 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, ErrInvalidLengthCds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthCds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthCds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go index 5919e7a30b..90484fa6dc 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/cds.proto -package v2 +package envoy_api_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,482 +30,25 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on Cluster with the rules defined in the +// define the regex for a UUID once up-front +var _cds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on CdsDummy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. -func (m *Cluster) Validate() error { +func (m *CdsDummy) Validate() error { if m == nil { return nil } - if len(m.GetName()) < 1 { - return ClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - // no validation rules for AltStatName - - { - tmp := m.GetEdsClusterConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "EdsClusterConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if true { - dur := m.GetConnectTimeout() - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return ClusterValidationError{ - field: "ConnectTimeout", - reason: "value must be greater than 0s", - } - } - - } - - { - tmp := m.GetPerConnectionBufferLimitBytes() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if _, ok := Cluster_LbPolicy_name[int32(m.GetLbPolicy())]; !ok { - return ClusterValidationError{ - field: "LbPolicy", - reason: "value must be one of the defined enum values", - } - } - - for idx, item := range m.GetHosts() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("Hosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetLoadAssignment() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LoadAssignment", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - for idx, item := range m.GetHealthChecks() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetMaxRequestsPerConnection() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetCircuitBreakers() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "CircuitBreakers", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetTlsContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetCommonHttpProtocolOptions() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "CommonHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetHttpProtocolOptions() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "HttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetHttp2ProtocolOptions() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for ExtensionProtocolOptions - - // no validation rules for TypedExtensionProtocolOptions - - if d := m.GetDnsRefreshRate(); d != nil { - dur := *d - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return ClusterValidationError{ - field: "DnsRefreshRate", - reason: "value must be greater than 0s", - } - } - - } - - if _, ok := Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { - return ClusterValidationError{ - field: "DnsLookupFamily", - reason: "value must be one of the defined enum values", - } - } - - for idx, item := range m.GetDnsResolvers() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("DnsResolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetOutlierDetection() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "OutlierDetection", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if d := m.GetCleanupInterval(); d != nil { - dur := *d - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return ClusterValidationError{ - field: "CleanupInterval", - reason: "value must be greater than 0s", - } - } - - } - - { - tmp := m.GetUpstreamBindConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "UpstreamBindConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetLbSubsetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LbSubsetConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetCommonLbConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "CommonLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetTransportSocket() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for ProtocolSelection - - { - tmp := m.GetUpstreamConnectionOptions() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "UpstreamConnectionOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for CloseConnectionsOnHostHealthFailure - - // no validation rules for DrainConnectionsOnHostRemoval - - switch m.ClusterDiscoveryType.(type) { - - case *Cluster_Type: - - if _, ok := Cluster_DiscoveryType_name[int32(m.GetType())]; !ok { - return ClusterValidationError{ - field: "Type", - reason: "value must be one of the defined enum values", - } - } - - case *Cluster_ClusterType: - - { - tmp := m.GetClusterType() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "ClusterType", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - switch m.LbConfig.(type) { - - case *Cluster_RingHashLbConfig_: - - { - tmp := m.GetRingHashLbConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "RingHashLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *Cluster_OriginalDstLbConfig_: - - { - tmp := m.GetOriginalDstLbConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "OriginalDstLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *Cluster_LeastRequestLbConfig_: - - { - tmp := m.GetLeastRequestLbConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LeastRequestLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - return nil } -// ClusterValidationError is the validation error returned by Cluster.Validate -// if the designated constraints aren't met. -type ClusterValidationError struct { +// CdsDummyValidationError is the validation error returned by +// CdsDummy.Validate if the designated constraints aren't met. +type CdsDummyValidationError struct { field string reason string cause error @@ -513,22 +56,22 @@ type ClusterValidationError struct { } // Field function returns field value. -func (e ClusterValidationError) Field() string { return e.field } +func (e CdsDummyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ClusterValidationError) Reason() string { return e.reason } +func (e CdsDummyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ClusterValidationError) Cause() error { return e.cause } +func (e CdsDummyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ClusterValidationError) Key() bool { return e.key } +func (e CdsDummyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ClusterValidationError) ErrorName() string { return "ClusterValidationError" } +func (e CdsDummyValidationError) ErrorName() string { return "CdsDummyValidationError" } // Error satisfies the builtin error interface -func (e ClusterValidationError) Error() string { +func (e CdsDummyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -540,14 +83,14 @@ func (e ClusterValidationError) Error() string { } return fmt.Sprintf( - "invalid %sCluster.%s: %s%s", + "invalid %sCdsDummy.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ClusterValidationError{} +var _ error = CdsDummyValidationError{} var _ interface { Field() string @@ -555,1074 +98,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ClusterValidationError{} - -// Validate checks the field values on UpstreamBindConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UpstreamBindConfig) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetSourceAddress() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamBindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// UpstreamBindConfigValidationError is the validation error returned by -// UpstreamBindConfig.Validate if the designated constraints aren't met. -type UpstreamBindConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamBindConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamBindConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamBindConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamBindConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamBindConfigValidationError) ErrorName() string { - return "UpstreamBindConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamBindConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamBindConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamBindConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamBindConfigValidationError{} - -// Validate checks the field values on UpstreamConnectionOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *UpstreamConnectionOptions) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetTcpKeepalive() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamConnectionOptionsValidationError{ - field: "TcpKeepalive", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// UpstreamConnectionOptionsValidationError is the validation error returned by -// UpstreamConnectionOptions.Validate if the designated constraints aren't met. -type UpstreamConnectionOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamConnectionOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamConnectionOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamConnectionOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamConnectionOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamConnectionOptionsValidationError) ErrorName() string { - return "UpstreamConnectionOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamConnectionOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamConnectionOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamConnectionOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamConnectionOptionsValidationError{} - -// Validate checks the field values on Cluster_CustomClusterType with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_CustomClusterType) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return Cluster_CustomClusterTypeValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CustomClusterTypeValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// Cluster_CustomClusterTypeValidationError is the validation error returned by -// Cluster_CustomClusterType.Validate if the designated constraints aren't met. -type Cluster_CustomClusterTypeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CustomClusterTypeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CustomClusterTypeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_CustomClusterTypeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CustomClusterTypeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CustomClusterTypeValidationError) ErrorName() string { - return "Cluster_CustomClusterTypeValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CustomClusterTypeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CustomClusterType.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CustomClusterTypeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CustomClusterTypeValidationError{} - -// Validate checks the field values on Cluster_EdsClusterConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_EdsClusterConfig) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetEdsConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_EdsClusterConfigValidationError{ - field: "EdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for ServiceName - - return nil -} - -// Cluster_EdsClusterConfigValidationError is the validation error returned by -// Cluster_EdsClusterConfig.Validate if the designated constraints aren't met. -type Cluster_EdsClusterConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_EdsClusterConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_EdsClusterConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_EdsClusterConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_EdsClusterConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_EdsClusterConfigValidationError) ErrorName() string { - return "Cluster_EdsClusterConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_EdsClusterConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_EdsClusterConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_EdsClusterConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_EdsClusterConfigValidationError{} - -// Validate checks the field values on Cluster_LbSubsetConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_LbSubsetConfig) Validate() error { - if m == nil { - return nil - } - - if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - return Cluster_LbSubsetConfigValidationError{ - field: "FallbackPolicy", - reason: "value must be one of the defined enum values", - } - } - - { - tmp := m.GetDefaultSubset() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_LbSubsetConfigValidationError{ - field: "DefaultSubset", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - for idx, item := range m.GetSubsetSelectors() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_LbSubsetConfigValidationError{ - field: fmt.Sprintf("SubsetSelectors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - // no validation rules for LocalityWeightAware - - // no validation rules for ScaleLocalityWeight - - // no validation rules for PanicModeAny - - return nil -} - -// Cluster_LbSubsetConfigValidationError is the validation error returned by -// Cluster_LbSubsetConfig.Validate if the designated constraints aren't met. -type Cluster_LbSubsetConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_LbSubsetConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_LbSubsetConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_LbSubsetConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_LbSubsetConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_LbSubsetConfigValidationError) ErrorName() string { - return "Cluster_LbSubsetConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_LbSubsetConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_LbSubsetConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_LbSubsetConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_LbSubsetConfigValidationError{} - -// Validate checks the field values on Cluster_LeastRequestLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_LeastRequestLbConfig) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetChoiceCount(); wrapper != nil { - - if wrapper.GetValue() < 2 { - return Cluster_LeastRequestLbConfigValidationError{ - field: "ChoiceCount", - reason: "value must be greater than or equal to 2", - } - } - - } - - return nil -} - -// Cluster_LeastRequestLbConfigValidationError is the validation error returned -// by Cluster_LeastRequestLbConfig.Validate if the designated constraints -// aren't met. -type Cluster_LeastRequestLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_LeastRequestLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_LeastRequestLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_LeastRequestLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_LeastRequestLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_LeastRequestLbConfigValidationError) ErrorName() string { - return "Cluster_LeastRequestLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_LeastRequestLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_LeastRequestLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_LeastRequestLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_LeastRequestLbConfigValidationError{} - -// Validate checks the field values on Cluster_RingHashLbConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_RingHashLbConfig) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetMinimumRingSize(); wrapper != nil { - - if wrapper.GetValue() > 8388608 { - return Cluster_RingHashLbConfigValidationError{ - field: "MinimumRingSize", - reason: "value must be less than or equal to 8388608", - } - } - - } - - if _, ok := Cluster_RingHashLbConfig_HashFunction_name[int32(m.GetHashFunction())]; !ok { - return Cluster_RingHashLbConfigValidationError{ - field: "HashFunction", - reason: "value must be one of the defined enum values", - } - } - - if wrapper := m.GetMaximumRingSize(); wrapper != nil { - - if wrapper.GetValue() > 8388608 { - return Cluster_RingHashLbConfigValidationError{ - field: "MaximumRingSize", - reason: "value must be less than or equal to 8388608", - } - } - - } - - return nil -} - -// Cluster_RingHashLbConfigValidationError is the validation error returned by -// Cluster_RingHashLbConfig.Validate if the designated constraints aren't met. -type Cluster_RingHashLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_RingHashLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_RingHashLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_RingHashLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_RingHashLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_RingHashLbConfigValidationError) ErrorName() string { - return "Cluster_RingHashLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_RingHashLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_RingHashLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_RingHashLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_RingHashLbConfigValidationError{} - -// Validate checks the field values on Cluster_OriginalDstLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_OriginalDstLbConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for UseHttpHeader - - return nil -} - -// Cluster_OriginalDstLbConfigValidationError is the validation error returned -// by Cluster_OriginalDstLbConfig.Validate if the designated constraints -// aren't met. -type Cluster_OriginalDstLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_OriginalDstLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_OriginalDstLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_OriginalDstLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_OriginalDstLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_OriginalDstLbConfigValidationError) ErrorName() string { - return "Cluster_OriginalDstLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_OriginalDstLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_OriginalDstLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_OriginalDstLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_OriginalDstLbConfigValidationError{} - -// Validate checks the field values on Cluster_CommonLbConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Cluster_CommonLbConfig) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetHealthyPanicThreshold() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "HealthyPanicThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetUpdateMergeWindow() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "UpdateMergeWindow", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - switch m.LocalityConfigSpecifier.(type) { - - case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: - - { - tmp := m.GetZoneAwareLbConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "ZoneAwareLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: - - { - tmp := m.GetLocalityWeightedLbConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "LocalityWeightedLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// Cluster_CommonLbConfigValidationError is the validation error returned by -// Cluster_CommonLbConfig.Validate if the designated constraints aren't met. -type Cluster_CommonLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CommonLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_CommonLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CommonLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfigValidationError{} - -// Validate checks the field values on Cluster_LbSubsetConfig_LbSubsetSelector -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// Cluster_LbSubsetConfig_LbSubsetSelectorValidationError is the validation -// error returned by Cluster_LbSubsetConfig_LbSubsetSelector.Validate if the -// designated constraints aren't met. -type Cluster_LbSubsetConfig_LbSubsetSelectorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) ErrorName() string { - return "Cluster_LbSubsetConfig_LbSubsetSelectorValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_LbSubsetConfig_LbSubsetSelector.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{} - -// Validate checks the field values on Cluster_CommonLbConfig_ZoneAwareLbConfig -// with the rules defined in the proto definition for this message. If any -// rules are violated, an error is returned. -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetRoutingEnabled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "RoutingEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMinClusterSize() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "MinClusterSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError is the validation -// error returned by Cluster_CommonLbConfig_ZoneAwareLbConfig.Validate if the -// designated constraints aren't met. -type Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig_ZoneAwareLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{} - -// Validate checks the field values on -// Cluster_CommonLbConfig_LocalityWeightedLbConfig with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError is the -// validation error returned by -// Cluster_CommonLbConfig_LocalityWeightedLbConfig.Validate if the designated -// constraints aren't met. -type Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig_LocalityWeightedLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError{} +} = CdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go new file mode 100644 index 0000000000..aad3f0f902 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go @@ -0,0 +1,1850 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/cluster.proto + +package envoy_api_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" + cluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + duration "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type Cluster_DiscoveryType int32 + +const ( + Cluster_STATIC Cluster_DiscoveryType = 0 + Cluster_STRICT_DNS Cluster_DiscoveryType = 1 + Cluster_LOGICAL_DNS Cluster_DiscoveryType = 2 + Cluster_EDS Cluster_DiscoveryType = 3 + Cluster_ORIGINAL_DST Cluster_DiscoveryType = 4 +) + +var Cluster_DiscoveryType_name = map[int32]string{ + 0: "STATIC", + 1: "STRICT_DNS", + 2: "LOGICAL_DNS", + 3: "EDS", + 4: "ORIGINAL_DST", +} + +var Cluster_DiscoveryType_value = map[string]int32{ + "STATIC": 0, + "STRICT_DNS": 1, + "LOGICAL_DNS": 2, + "EDS": 3, + "ORIGINAL_DST": 4, +} + +func (x Cluster_DiscoveryType) String() string { + return proto.EnumName(Cluster_DiscoveryType_name, int32(x)) +} + +func (Cluster_DiscoveryType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 0} +} + +type Cluster_LbPolicy int32 + +const ( + Cluster_ROUND_ROBIN Cluster_LbPolicy = 0 + Cluster_LEAST_REQUEST Cluster_LbPolicy = 1 + Cluster_RING_HASH Cluster_LbPolicy = 2 + Cluster_RANDOM Cluster_LbPolicy = 3 + Cluster_ORIGINAL_DST_LB Cluster_LbPolicy = 4 // Deprecated: Do not use. + Cluster_MAGLEV Cluster_LbPolicy = 5 + Cluster_CLUSTER_PROVIDED Cluster_LbPolicy = 6 + Cluster_LOAD_BALANCING_POLICY_CONFIG Cluster_LbPolicy = 7 +) + +var Cluster_LbPolicy_name = map[int32]string{ + 0: "ROUND_ROBIN", + 1: "LEAST_REQUEST", + 2: "RING_HASH", + 3: "RANDOM", + 4: "ORIGINAL_DST_LB", + 5: "MAGLEV", + 6: "CLUSTER_PROVIDED", + 7: "LOAD_BALANCING_POLICY_CONFIG", +} + +var Cluster_LbPolicy_value = map[string]int32{ + "ROUND_ROBIN": 0, + "LEAST_REQUEST": 1, + "RING_HASH": 2, + "RANDOM": 3, + "ORIGINAL_DST_LB": 4, + "MAGLEV": 5, + "CLUSTER_PROVIDED": 6, + "LOAD_BALANCING_POLICY_CONFIG": 7, +} + +func (x Cluster_LbPolicy) String() string { + return proto.EnumName(Cluster_LbPolicy_name, int32(x)) +} + +func (Cluster_LbPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 1} +} + +type Cluster_DnsLookupFamily int32 + +const ( + Cluster_AUTO Cluster_DnsLookupFamily = 0 + Cluster_V4_ONLY Cluster_DnsLookupFamily = 1 + Cluster_V6_ONLY Cluster_DnsLookupFamily = 2 +) + +var Cluster_DnsLookupFamily_name = map[int32]string{ + 0: "AUTO", + 1: "V4_ONLY", + 2: "V6_ONLY", +} + +var Cluster_DnsLookupFamily_value = map[string]int32{ + "AUTO": 0, + "V4_ONLY": 1, + "V6_ONLY": 2, +} + +func (x Cluster_DnsLookupFamily) String() string { + return proto.EnumName(Cluster_DnsLookupFamily_name, int32(x)) +} + +func (Cluster_DnsLookupFamily) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 2} +} + +type Cluster_ClusterProtocolSelection int32 + +const ( + Cluster_USE_CONFIGURED_PROTOCOL Cluster_ClusterProtocolSelection = 0 + Cluster_USE_DOWNSTREAM_PROTOCOL Cluster_ClusterProtocolSelection = 1 +) + +var Cluster_ClusterProtocolSelection_name = map[int32]string{ + 0: "USE_CONFIGURED_PROTOCOL", + 1: "USE_DOWNSTREAM_PROTOCOL", +} + +var Cluster_ClusterProtocolSelection_value = map[string]int32{ + "USE_CONFIGURED_PROTOCOL": 0, + "USE_DOWNSTREAM_PROTOCOL": 1, +} + +func (x Cluster_ClusterProtocolSelection) String() string { + return proto.EnumName(Cluster_ClusterProtocolSelection_name, int32(x)) +} + +func (Cluster_ClusterProtocolSelection) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 3} +} + +type Cluster_LbSubsetConfig_LbSubsetFallbackPolicy int32 + +const ( + Cluster_LbSubsetConfig_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 0 + Cluster_LbSubsetConfig_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 1 + Cluster_LbSubsetConfig_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 2 +) + +var Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name = map[int32]string{ + 0: "NO_FALLBACK", + 1: "ANY_ENDPOINT", + 2: "DEFAULT_SUBSET", +} + +var Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value = map[string]int32{ + "NO_FALLBACK": 0, + "ANY_ENDPOINT": 1, + "DEFAULT_SUBSET": 2, +} + +func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) String() string { + return proto.EnumName(Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name, int32(x)) +} + +func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 3, 0} +} + +type Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy int32 + +const ( + Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 0 + Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 1 + Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 2 + Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 3 + Cluster_LbSubsetConfig_LbSubsetSelector_KEYS_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 4 +) + +var Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name = map[int32]string{ + 0: "NOT_DEFINED", + 1: "NO_FALLBACK", + 2: "ANY_ENDPOINT", + 3: "DEFAULT_SUBSET", + 4: "KEYS_SUBSET", +} + +var Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_value = map[string]int32{ + "NOT_DEFINED": 0, + "NO_FALLBACK": 1, + "ANY_ENDPOINT": 2, + "DEFAULT_SUBSET": 3, + "KEYS_SUBSET": 4, +} + +func (x Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) String() string { + return proto.EnumName(Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name, int32(x)) +} + +func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 3, 0, 0} +} + +type Cluster_RingHashLbConfig_HashFunction int32 + +const ( + Cluster_RingHashLbConfig_XX_HASH Cluster_RingHashLbConfig_HashFunction = 0 + Cluster_RingHashLbConfig_MURMUR_HASH_2 Cluster_RingHashLbConfig_HashFunction = 1 +) + +var Cluster_RingHashLbConfig_HashFunction_name = map[int32]string{ + 0: "XX_HASH", + 1: "MURMUR_HASH_2", +} + +var Cluster_RingHashLbConfig_HashFunction_value = map[string]int32{ + "XX_HASH": 0, + "MURMUR_HASH_2": 1, +} + +func (x Cluster_RingHashLbConfig_HashFunction) String() string { + return proto.EnumName(Cluster_RingHashLbConfig_HashFunction_name, int32(x)) +} + +func (Cluster_RingHashLbConfig_HashFunction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 5, 0} +} + +type Cluster struct { + TransportSocketMatches []*Cluster_TransportSocketMatch `protobuf:"bytes,43,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + AltStatName string `protobuf:"bytes,28,opt,name=alt_stat_name,json=altStatName,proto3" json:"alt_stat_name,omitempty"` + // Types that are valid to be assigned to ClusterDiscoveryType: + // *Cluster_Type + // *Cluster_ClusterType + ClusterDiscoveryType isCluster_ClusterDiscoveryType `protobuf_oneof:"cluster_discovery_type"` + EdsClusterConfig *Cluster_EdsClusterConfig `protobuf:"bytes,3,opt,name=eds_cluster_config,json=edsClusterConfig,proto3" json:"eds_cluster_config,omitempty"` + ConnectTimeout *duration.Duration `protobuf:"bytes,4,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` + PerConnectionBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` + LbPolicy Cluster_LbPolicy `protobuf:"varint,6,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.api.v2.Cluster_LbPolicy" json:"lb_policy,omitempty"` + Hosts []*core.Address `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` // Deprecated: Do not use. + LoadAssignment *ClusterLoadAssignment `protobuf:"bytes,33,opt,name=load_assignment,json=loadAssignment,proto3" json:"load_assignment,omitempty"` + HealthChecks []*core.HealthCheck `protobuf:"bytes,8,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` + MaxRequestsPerConnection *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` + CircuitBreakers *cluster.CircuitBreakers `protobuf:"bytes,10,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` + TlsContext *auth.UpstreamTlsContext `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` // Deprecated: Do not use. + UpstreamHttpProtocolOptions *core.UpstreamHttpProtocolOptions `protobuf:"bytes,46,opt,name=upstream_http_protocol_options,json=upstreamHttpProtocolOptions,proto3" json:"upstream_http_protocol_options,omitempty"` + CommonHttpProtocolOptions *core.HttpProtocolOptions `protobuf:"bytes,29,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions,proto3" json:"common_http_protocol_options,omitempty"` + HttpProtocolOptions *core.Http1ProtocolOptions `protobuf:"bytes,13,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` + Http2ProtocolOptions *core.Http2ProtocolOptions `protobuf:"bytes,14,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` + ExtensionProtocolOptions map[string]*_struct.Struct `protobuf:"bytes,35,rep,name=extension_protocol_options,json=extensionProtocolOptions,proto3" json:"extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Deprecated: Do not use. + TypedExtensionProtocolOptions map[string]*any.Any `protobuf:"bytes,36,rep,name=typed_extension_protocol_options,json=typedExtensionProtocolOptions,proto3" json:"typed_extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DnsRefreshRate *duration.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` + DnsFailureRefreshRate *Cluster_RefreshRate `protobuf:"bytes,44,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` + RespectDnsTtl bool `protobuf:"varint,39,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,omitempty"` + DnsLookupFamily Cluster_DnsLookupFamily `protobuf:"varint,17,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.api.v2.Cluster_DnsLookupFamily" json:"dns_lookup_family,omitempty"` + DnsResolvers []*core.Address `protobuf:"bytes,18,rep,name=dns_resolvers,json=dnsResolvers,proto3" json:"dns_resolvers,omitempty"` + UseTcpForDnsLookups bool `protobuf:"varint,45,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` + OutlierDetection *cluster.OutlierDetection `protobuf:"bytes,19,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` + CleanupInterval *duration.Duration `protobuf:"bytes,20,opt,name=cleanup_interval,json=cleanupInterval,proto3" json:"cleanup_interval,omitempty"` + UpstreamBindConfig *core.BindConfig `protobuf:"bytes,21,opt,name=upstream_bind_config,json=upstreamBindConfig,proto3" json:"upstream_bind_config,omitempty"` + LbSubsetConfig *Cluster_LbSubsetConfig `protobuf:"bytes,22,opt,name=lb_subset_config,json=lbSubsetConfig,proto3" json:"lb_subset_config,omitempty"` + // Types that are valid to be assigned to LbConfig: + // *Cluster_RingHashLbConfig_ + // *Cluster_OriginalDstLbConfig_ + // *Cluster_LeastRequestLbConfig_ + LbConfig isCluster_LbConfig `protobuf_oneof:"lb_config"` + CommonLbConfig *Cluster_CommonLbConfig `protobuf:"bytes,27,opt,name=common_lb_config,json=commonLbConfig,proto3" json:"common_lb_config,omitempty"` + TransportSocket *core.TransportSocket `protobuf:"bytes,24,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` + Metadata *core.Metadata `protobuf:"bytes,25,opt,name=metadata,proto3" json:"metadata,omitempty"` + ProtocolSelection Cluster_ClusterProtocolSelection `protobuf:"varint,26,opt,name=protocol_selection,json=protocolSelection,proto3,enum=envoy.api.v2.Cluster_ClusterProtocolSelection" json:"protocol_selection,omitempty"` + UpstreamConnectionOptions *UpstreamConnectionOptions `protobuf:"bytes,30,opt,name=upstream_connection_options,json=upstreamConnectionOptions,proto3" json:"upstream_connection_options,omitempty"` + CloseConnectionsOnHostHealthFailure bool `protobuf:"varint,31,opt,name=close_connections_on_host_health_failure,json=closeConnectionsOnHostHealthFailure,proto3" json:"close_connections_on_host_health_failure,omitempty"` + DrainConnectionsOnHostRemoval bool `protobuf:"varint,32,opt,name=drain_connections_on_host_removal,json=drainConnectionsOnHostRemoval,proto3" json:"drain_connections_on_host_removal,omitempty"` + Filters []*cluster.Filter `protobuf:"bytes,40,rep,name=filters,proto3" json:"filters,omitempty"` + LoadBalancingPolicy *LoadBalancingPolicy `protobuf:"bytes,41,opt,name=load_balancing_policy,json=loadBalancingPolicy,proto3" json:"load_balancing_policy,omitempty"` + LrsServer *core.ConfigSource `protobuf:"bytes,42,opt,name=lrs_server,json=lrsServer,proto3" json:"lrs_server,omitempty"` + TrackTimeoutBudgets bool `protobuf:"varint,47,opt,name=track_timeout_budgets,json=trackTimeoutBudgets,proto3" json:"track_timeout_budgets,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster) Reset() { *m = Cluster{} } +func (m *Cluster) String() string { return proto.CompactTextString(m) } +func (*Cluster) ProtoMessage() {} +func (*Cluster) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0} +} + +func (m *Cluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster.Unmarshal(m, b) +} +func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster.Marshal(b, m, deterministic) +} +func (m *Cluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster.Merge(m, src) +} +func (m *Cluster) XXX_Size() int { + return xxx_messageInfo_Cluster.Size(m) +} +func (m *Cluster) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster proto.InternalMessageInfo + +func (m *Cluster) GetTransportSocketMatches() []*Cluster_TransportSocketMatch { + if m != nil { + return m.TransportSocketMatches + } + return nil +} + +func (m *Cluster) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Cluster) GetAltStatName() string { + if m != nil { + return m.AltStatName + } + return "" +} + +type isCluster_ClusterDiscoveryType interface { + isCluster_ClusterDiscoveryType() +} + +type Cluster_Type struct { + Type Cluster_DiscoveryType `protobuf:"varint,2,opt,name=type,proto3,enum=envoy.api.v2.Cluster_DiscoveryType,oneof"` +} + +type Cluster_ClusterType struct { + ClusterType *Cluster_CustomClusterType `protobuf:"bytes,38,opt,name=cluster_type,json=clusterType,proto3,oneof"` +} + +func (*Cluster_Type) isCluster_ClusterDiscoveryType() {} + +func (*Cluster_ClusterType) isCluster_ClusterDiscoveryType() {} + +func (m *Cluster) GetClusterDiscoveryType() isCluster_ClusterDiscoveryType { + if m != nil { + return m.ClusterDiscoveryType + } + return nil +} + +func (m *Cluster) GetType() Cluster_DiscoveryType { + if x, ok := m.GetClusterDiscoveryType().(*Cluster_Type); ok { + return x.Type + } + return Cluster_STATIC +} + +func (m *Cluster) GetClusterType() *Cluster_CustomClusterType { + if x, ok := m.GetClusterDiscoveryType().(*Cluster_ClusterType); ok { + return x.ClusterType + } + return nil +} + +func (m *Cluster) GetEdsClusterConfig() *Cluster_EdsClusterConfig { + if m != nil { + return m.EdsClusterConfig + } + return nil +} + +func (m *Cluster) GetConnectTimeout() *duration.Duration { + if m != nil { + return m.ConnectTimeout + } + return nil +} + +func (m *Cluster) GetPerConnectionBufferLimitBytes() *wrappers.UInt32Value { + if m != nil { + return m.PerConnectionBufferLimitBytes + } + return nil +} + +func (m *Cluster) GetLbPolicy() Cluster_LbPolicy { + if m != nil { + return m.LbPolicy + } + return Cluster_ROUND_ROBIN +} + +// Deprecated: Do not use. +func (m *Cluster) GetHosts() []*core.Address { + if m != nil { + return m.Hosts + } + return nil +} + +func (m *Cluster) GetLoadAssignment() *ClusterLoadAssignment { + if m != nil { + return m.LoadAssignment + } + return nil +} + +func (m *Cluster) GetHealthChecks() []*core.HealthCheck { + if m != nil { + return m.HealthChecks + } + return nil +} + +func (m *Cluster) GetMaxRequestsPerConnection() *wrappers.UInt32Value { + if m != nil { + return m.MaxRequestsPerConnection + } + return nil +} + +func (m *Cluster) GetCircuitBreakers() *cluster.CircuitBreakers { + if m != nil { + return m.CircuitBreakers + } + return nil +} + +// Deprecated: Do not use. +func (m *Cluster) GetTlsContext() *auth.UpstreamTlsContext { + if m != nil { + return m.TlsContext + } + return nil +} + +func (m *Cluster) GetUpstreamHttpProtocolOptions() *core.UpstreamHttpProtocolOptions { + if m != nil { + return m.UpstreamHttpProtocolOptions + } + return nil +} + +func (m *Cluster) GetCommonHttpProtocolOptions() *core.HttpProtocolOptions { + if m != nil { + return m.CommonHttpProtocolOptions + } + return nil +} + +func (m *Cluster) GetHttpProtocolOptions() *core.Http1ProtocolOptions { + if m != nil { + return m.HttpProtocolOptions + } + return nil +} + +func (m *Cluster) GetHttp2ProtocolOptions() *core.Http2ProtocolOptions { + if m != nil { + return m.Http2ProtocolOptions + } + return nil +} + +// Deprecated: Do not use. +func (m *Cluster) GetExtensionProtocolOptions() map[string]*_struct.Struct { + if m != nil { + return m.ExtensionProtocolOptions + } + return nil +} + +func (m *Cluster) GetTypedExtensionProtocolOptions() map[string]*any.Any { + if m != nil { + return m.TypedExtensionProtocolOptions + } + return nil +} + +func (m *Cluster) GetDnsRefreshRate() *duration.Duration { + if m != nil { + return m.DnsRefreshRate + } + return nil +} + +func (m *Cluster) GetDnsFailureRefreshRate() *Cluster_RefreshRate { + if m != nil { + return m.DnsFailureRefreshRate + } + return nil +} + +func (m *Cluster) GetRespectDnsTtl() bool { + if m != nil { + return m.RespectDnsTtl + } + return false +} + +func (m *Cluster) GetDnsLookupFamily() Cluster_DnsLookupFamily { + if m != nil { + return m.DnsLookupFamily + } + return Cluster_AUTO +} + +func (m *Cluster) GetDnsResolvers() []*core.Address { + if m != nil { + return m.DnsResolvers + } + return nil +} + +func (m *Cluster) GetUseTcpForDnsLookups() bool { + if m != nil { + return m.UseTcpForDnsLookups + } + return false +} + +func (m *Cluster) GetOutlierDetection() *cluster.OutlierDetection { + if m != nil { + return m.OutlierDetection + } + return nil +} + +func (m *Cluster) GetCleanupInterval() *duration.Duration { + if m != nil { + return m.CleanupInterval + } + return nil +} + +func (m *Cluster) GetUpstreamBindConfig() *core.BindConfig { + if m != nil { + return m.UpstreamBindConfig + } + return nil +} + +func (m *Cluster) GetLbSubsetConfig() *Cluster_LbSubsetConfig { + if m != nil { + return m.LbSubsetConfig + } + return nil +} + +type isCluster_LbConfig interface { + isCluster_LbConfig() +} + +type Cluster_RingHashLbConfig_ struct { + RingHashLbConfig *Cluster_RingHashLbConfig `protobuf:"bytes,23,opt,name=ring_hash_lb_config,json=ringHashLbConfig,proto3,oneof"` +} + +type Cluster_OriginalDstLbConfig_ struct { + OriginalDstLbConfig *Cluster_OriginalDstLbConfig `protobuf:"bytes,34,opt,name=original_dst_lb_config,json=originalDstLbConfig,proto3,oneof"` +} + +type Cluster_LeastRequestLbConfig_ struct { + LeastRequestLbConfig *Cluster_LeastRequestLbConfig `protobuf:"bytes,37,opt,name=least_request_lb_config,json=leastRequestLbConfig,proto3,oneof"` +} + +func (*Cluster_RingHashLbConfig_) isCluster_LbConfig() {} + +func (*Cluster_OriginalDstLbConfig_) isCluster_LbConfig() {} + +func (*Cluster_LeastRequestLbConfig_) isCluster_LbConfig() {} + +func (m *Cluster) GetLbConfig() isCluster_LbConfig { + if m != nil { + return m.LbConfig + } + return nil +} + +func (m *Cluster) GetRingHashLbConfig() *Cluster_RingHashLbConfig { + if x, ok := m.GetLbConfig().(*Cluster_RingHashLbConfig_); ok { + return x.RingHashLbConfig + } + return nil +} + +func (m *Cluster) GetOriginalDstLbConfig() *Cluster_OriginalDstLbConfig { + if x, ok := m.GetLbConfig().(*Cluster_OriginalDstLbConfig_); ok { + return x.OriginalDstLbConfig + } + return nil +} + +func (m *Cluster) GetLeastRequestLbConfig() *Cluster_LeastRequestLbConfig { + if x, ok := m.GetLbConfig().(*Cluster_LeastRequestLbConfig_); ok { + return x.LeastRequestLbConfig + } + return nil +} + +func (m *Cluster) GetCommonLbConfig() *Cluster_CommonLbConfig { + if m != nil { + return m.CommonLbConfig + } + return nil +} + +func (m *Cluster) GetTransportSocket() *core.TransportSocket { + if m != nil { + return m.TransportSocket + } + return nil +} + +func (m *Cluster) GetMetadata() *core.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Cluster) GetProtocolSelection() Cluster_ClusterProtocolSelection { + if m != nil { + return m.ProtocolSelection + } + return Cluster_USE_CONFIGURED_PROTOCOL +} + +func (m *Cluster) GetUpstreamConnectionOptions() *UpstreamConnectionOptions { + if m != nil { + return m.UpstreamConnectionOptions + } + return nil +} + +func (m *Cluster) GetCloseConnectionsOnHostHealthFailure() bool { + if m != nil { + return m.CloseConnectionsOnHostHealthFailure + } + return false +} + +func (m *Cluster) GetDrainConnectionsOnHostRemoval() bool { + if m != nil { + return m.DrainConnectionsOnHostRemoval + } + return false +} + +func (m *Cluster) GetFilters() []*cluster.Filter { + if m != nil { + return m.Filters + } + return nil +} + +func (m *Cluster) GetLoadBalancingPolicy() *LoadBalancingPolicy { + if m != nil { + return m.LoadBalancingPolicy + } + return nil +} + +func (m *Cluster) GetLrsServer() *core.ConfigSource { + if m != nil { + return m.LrsServer + } + return nil +} + +func (m *Cluster) GetTrackTimeoutBudgets() bool { + if m != nil { + return m.TrackTimeoutBudgets + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Cluster) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Cluster_Type)(nil), + (*Cluster_ClusterType)(nil), + (*Cluster_RingHashLbConfig_)(nil), + (*Cluster_OriginalDstLbConfig_)(nil), + (*Cluster_LeastRequestLbConfig_)(nil), + } +} + +type Cluster_TransportSocketMatch struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Match *_struct.Struct `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"` + TransportSocket *core.TransportSocket `protobuf:"bytes,3,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_TransportSocketMatch) Reset() { *m = Cluster_TransportSocketMatch{} } +func (m *Cluster_TransportSocketMatch) String() string { return proto.CompactTextString(m) } +func (*Cluster_TransportSocketMatch) ProtoMessage() {} +func (*Cluster_TransportSocketMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 0} +} + +func (m *Cluster_TransportSocketMatch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_TransportSocketMatch.Unmarshal(m, b) +} +func (m *Cluster_TransportSocketMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_TransportSocketMatch.Marshal(b, m, deterministic) +} +func (m *Cluster_TransportSocketMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_TransportSocketMatch.Merge(m, src) +} +func (m *Cluster_TransportSocketMatch) XXX_Size() int { + return xxx_messageInfo_Cluster_TransportSocketMatch.Size(m) +} +func (m *Cluster_TransportSocketMatch) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_TransportSocketMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_TransportSocketMatch proto.InternalMessageInfo + +func (m *Cluster_TransportSocketMatch) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Cluster_TransportSocketMatch) GetMatch() *_struct.Struct { + if m != nil { + return m.Match + } + return nil +} + +func (m *Cluster_TransportSocketMatch) GetTransportSocket() *core.TransportSocket { + if m != nil { + return m.TransportSocket + } + return nil +} + +type Cluster_CustomClusterType struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_CustomClusterType) Reset() { *m = Cluster_CustomClusterType{} } +func (m *Cluster_CustomClusterType) String() string { return proto.CompactTextString(m) } +func (*Cluster_CustomClusterType) ProtoMessage() {} +func (*Cluster_CustomClusterType) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 1} +} + +func (m *Cluster_CustomClusterType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_CustomClusterType.Unmarshal(m, b) +} +func (m *Cluster_CustomClusterType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_CustomClusterType.Marshal(b, m, deterministic) +} +func (m *Cluster_CustomClusterType) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_CustomClusterType.Merge(m, src) +} +func (m *Cluster_CustomClusterType) XXX_Size() int { + return xxx_messageInfo_Cluster_CustomClusterType.Size(m) +} +func (m *Cluster_CustomClusterType) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_CustomClusterType.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_CustomClusterType proto.InternalMessageInfo + +func (m *Cluster_CustomClusterType) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Cluster_CustomClusterType) GetTypedConfig() *any.Any { + if m != nil { + return m.TypedConfig + } + return nil +} + +type Cluster_EdsClusterConfig struct { + EdsConfig *core.ConfigSource `protobuf:"bytes,1,opt,name=eds_config,json=edsConfig,proto3" json:"eds_config,omitempty"` + ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_EdsClusterConfig) Reset() { *m = Cluster_EdsClusterConfig{} } +func (m *Cluster_EdsClusterConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_EdsClusterConfig) ProtoMessage() {} +func (*Cluster_EdsClusterConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 2} +} + +func (m *Cluster_EdsClusterConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_EdsClusterConfig.Unmarshal(m, b) +} +func (m *Cluster_EdsClusterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_EdsClusterConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_EdsClusterConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_EdsClusterConfig.Merge(m, src) +} +func (m *Cluster_EdsClusterConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_EdsClusterConfig.Size(m) +} +func (m *Cluster_EdsClusterConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_EdsClusterConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_EdsClusterConfig proto.InternalMessageInfo + +func (m *Cluster_EdsClusterConfig) GetEdsConfig() *core.ConfigSource { + if m != nil { + return m.EdsConfig + } + return nil +} + +func (m *Cluster_EdsClusterConfig) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +type Cluster_LbSubsetConfig struct { + FallbackPolicy Cluster_LbSubsetConfig_LbSubsetFallbackPolicy `protobuf:"varint,1,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy" json:"fallback_policy,omitempty"` + DefaultSubset *_struct.Struct `protobuf:"bytes,2,opt,name=default_subset,json=defaultSubset,proto3" json:"default_subset,omitempty"` + SubsetSelectors []*Cluster_LbSubsetConfig_LbSubsetSelector `protobuf:"bytes,3,rep,name=subset_selectors,json=subsetSelectors,proto3" json:"subset_selectors,omitempty"` + LocalityWeightAware bool `protobuf:"varint,4,opt,name=locality_weight_aware,json=localityWeightAware,proto3" json:"locality_weight_aware,omitempty"` + ScaleLocalityWeight bool `protobuf:"varint,5,opt,name=scale_locality_weight,json=scaleLocalityWeight,proto3" json:"scale_locality_weight,omitempty"` + PanicModeAny bool `protobuf:"varint,6,opt,name=panic_mode_any,json=panicModeAny,proto3" json:"panic_mode_any,omitempty"` + ListAsAny bool `protobuf:"varint,7,opt,name=list_as_any,json=listAsAny,proto3" json:"list_as_any,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_LbSubsetConfig) Reset() { *m = Cluster_LbSubsetConfig{} } +func (m *Cluster_LbSubsetConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_LbSubsetConfig) ProtoMessage() {} +func (*Cluster_LbSubsetConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 3} +} + +func (m *Cluster_LbSubsetConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_LbSubsetConfig.Unmarshal(m, b) +} +func (m *Cluster_LbSubsetConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_LbSubsetConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_LbSubsetConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_LbSubsetConfig.Merge(m, src) +} +func (m *Cluster_LbSubsetConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_LbSubsetConfig.Size(m) +} +func (m *Cluster_LbSubsetConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_LbSubsetConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_LbSubsetConfig proto.InternalMessageInfo + +func (m *Cluster_LbSubsetConfig) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { + if m != nil { + return m.FallbackPolicy + } + return Cluster_LbSubsetConfig_NO_FALLBACK +} + +func (m *Cluster_LbSubsetConfig) GetDefaultSubset() *_struct.Struct { + if m != nil { + return m.DefaultSubset + } + return nil +} + +func (m *Cluster_LbSubsetConfig) GetSubsetSelectors() []*Cluster_LbSubsetConfig_LbSubsetSelector { + if m != nil { + return m.SubsetSelectors + } + return nil +} + +func (m *Cluster_LbSubsetConfig) GetLocalityWeightAware() bool { + if m != nil { + return m.LocalityWeightAware + } + return false +} + +func (m *Cluster_LbSubsetConfig) GetScaleLocalityWeight() bool { + if m != nil { + return m.ScaleLocalityWeight + } + return false +} + +func (m *Cluster_LbSubsetConfig) GetPanicModeAny() bool { + if m != nil { + return m.PanicModeAny + } + return false +} + +func (m *Cluster_LbSubsetConfig) GetListAsAny() bool { + if m != nil { + return m.ListAsAny + } + return false +} + +type Cluster_LbSubsetConfig_LbSubsetSelector struct { + Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + FallbackPolicy Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy `protobuf:"varint,2,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy" json:"fallback_policy,omitempty"` + FallbackKeysSubset []string `protobuf:"bytes,3,rep,name=fallback_keys_subset,json=fallbackKeysSubset,proto3" json:"fallback_keys_subset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Reset() { + *m = Cluster_LbSubsetConfig_LbSubsetSelector{} +} +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) String() string { return proto.CompactTextString(m) } +func (*Cluster_LbSubsetConfig_LbSubsetSelector) ProtoMessage() {} +func (*Cluster_LbSubsetConfig_LbSubsetSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 3, 0} +} + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Unmarshal(m, b) +} +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Marshal(b, m, deterministic) +} +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Merge(m, src) +} +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_Size() int { + return xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.Size(m) +} +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_LbSubsetConfig_LbSubsetSelector proto.InternalMessageInfo + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) GetKeys() []string { + if m != nil { + return m.Keys + } + return nil +} + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy { + if m != nil { + return m.FallbackPolicy + } + return Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED +} + +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) GetFallbackKeysSubset() []string { + if m != nil { + return m.FallbackKeysSubset + } + return nil +} + +type Cluster_LeastRequestLbConfig struct { + ChoiceCount *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_LeastRequestLbConfig) Reset() { *m = Cluster_LeastRequestLbConfig{} } +func (m *Cluster_LeastRequestLbConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_LeastRequestLbConfig) ProtoMessage() {} +func (*Cluster_LeastRequestLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 4} +} + +func (m *Cluster_LeastRequestLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_LeastRequestLbConfig.Unmarshal(m, b) +} +func (m *Cluster_LeastRequestLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_LeastRequestLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_LeastRequestLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_LeastRequestLbConfig.Merge(m, src) +} +func (m *Cluster_LeastRequestLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_LeastRequestLbConfig.Size(m) +} +func (m *Cluster_LeastRequestLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_LeastRequestLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_LeastRequestLbConfig proto.InternalMessageInfo + +func (m *Cluster_LeastRequestLbConfig) GetChoiceCount() *wrappers.UInt32Value { + if m != nil { + return m.ChoiceCount + } + return nil +} + +type Cluster_RingHashLbConfig struct { + MinimumRingSize *wrappers.UInt64Value `protobuf:"bytes,1,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` + HashFunction Cluster_RingHashLbConfig_HashFunction `protobuf:"varint,3,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.api.v2.Cluster_RingHashLbConfig_HashFunction" json:"hash_function,omitempty"` + MaximumRingSize *wrappers.UInt64Value `protobuf:"bytes,4,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_RingHashLbConfig) Reset() { *m = Cluster_RingHashLbConfig{} } +func (m *Cluster_RingHashLbConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_RingHashLbConfig) ProtoMessage() {} +func (*Cluster_RingHashLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 5} +} + +func (m *Cluster_RingHashLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_RingHashLbConfig.Unmarshal(m, b) +} +func (m *Cluster_RingHashLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_RingHashLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_RingHashLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_RingHashLbConfig.Merge(m, src) +} +func (m *Cluster_RingHashLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_RingHashLbConfig.Size(m) +} +func (m *Cluster_RingHashLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_RingHashLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_RingHashLbConfig proto.InternalMessageInfo + +func (m *Cluster_RingHashLbConfig) GetMinimumRingSize() *wrappers.UInt64Value { + if m != nil { + return m.MinimumRingSize + } + return nil +} + +func (m *Cluster_RingHashLbConfig) GetHashFunction() Cluster_RingHashLbConfig_HashFunction { + if m != nil { + return m.HashFunction + } + return Cluster_RingHashLbConfig_XX_HASH +} + +func (m *Cluster_RingHashLbConfig) GetMaximumRingSize() *wrappers.UInt64Value { + if m != nil { + return m.MaximumRingSize + } + return nil +} + +type Cluster_OriginalDstLbConfig struct { + UseHttpHeader bool `protobuf:"varint,1,opt,name=use_http_header,json=useHttpHeader,proto3" json:"use_http_header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_OriginalDstLbConfig) Reset() { *m = Cluster_OriginalDstLbConfig{} } +func (m *Cluster_OriginalDstLbConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_OriginalDstLbConfig) ProtoMessage() {} +func (*Cluster_OriginalDstLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 6} +} + +func (m *Cluster_OriginalDstLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_OriginalDstLbConfig.Unmarshal(m, b) +} +func (m *Cluster_OriginalDstLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_OriginalDstLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_OriginalDstLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_OriginalDstLbConfig.Merge(m, src) +} +func (m *Cluster_OriginalDstLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_OriginalDstLbConfig.Size(m) +} +func (m *Cluster_OriginalDstLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_OriginalDstLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_OriginalDstLbConfig proto.InternalMessageInfo + +func (m *Cluster_OriginalDstLbConfig) GetUseHttpHeader() bool { + if m != nil { + return m.UseHttpHeader + } + return false +} + +type Cluster_CommonLbConfig struct { + HealthyPanicThreshold *_type.Percent `protobuf:"bytes,1,opt,name=healthy_panic_threshold,json=healthyPanicThreshold,proto3" json:"healthy_panic_threshold,omitempty"` + // Types that are valid to be assigned to LocalityConfigSpecifier: + // *Cluster_CommonLbConfig_ZoneAwareLbConfig_ + // *Cluster_CommonLbConfig_LocalityWeightedLbConfig_ + LocalityConfigSpecifier isCluster_CommonLbConfig_LocalityConfigSpecifier `protobuf_oneof:"locality_config_specifier"` + UpdateMergeWindow *duration.Duration `protobuf:"bytes,4,opt,name=update_merge_window,json=updateMergeWindow,proto3" json:"update_merge_window,omitempty"` + IgnoreNewHostsUntilFirstHc bool `protobuf:"varint,5,opt,name=ignore_new_hosts_until_first_hc,json=ignoreNewHostsUntilFirstHc,proto3" json:"ignore_new_hosts_until_first_hc,omitempty"` + CloseConnectionsOnHostSetChange bool `protobuf:"varint,6,opt,name=close_connections_on_host_set_change,json=closeConnectionsOnHostSetChange,proto3" json:"close_connections_on_host_set_change,omitempty"` + ConsistentHashingLbConfig *Cluster_CommonLbConfig_ConsistentHashingLbConfig `protobuf:"bytes,7,opt,name=consistent_hashing_lb_config,json=consistentHashingLbConfig,proto3" json:"consistent_hashing_lb_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_CommonLbConfig) Reset() { *m = Cluster_CommonLbConfig{} } +func (m *Cluster_CommonLbConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_CommonLbConfig) ProtoMessage() {} +func (*Cluster_CommonLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 7} +} + +func (m *Cluster_CommonLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_CommonLbConfig.Unmarshal(m, b) +} +func (m *Cluster_CommonLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_CommonLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_CommonLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_CommonLbConfig.Merge(m, src) +} +func (m *Cluster_CommonLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_CommonLbConfig.Size(m) +} +func (m *Cluster_CommonLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_CommonLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_CommonLbConfig proto.InternalMessageInfo + +func (m *Cluster_CommonLbConfig) GetHealthyPanicThreshold() *_type.Percent { + if m != nil { + return m.HealthyPanicThreshold + } + return nil +} + +type isCluster_CommonLbConfig_LocalityConfigSpecifier interface { + isCluster_CommonLbConfig_LocalityConfigSpecifier() +} + +type Cluster_CommonLbConfig_ZoneAwareLbConfig_ struct { + ZoneAwareLbConfig *Cluster_CommonLbConfig_ZoneAwareLbConfig `protobuf:"bytes,2,opt,name=zone_aware_lb_config,json=zoneAwareLbConfig,proto3,oneof"` +} + +type Cluster_CommonLbConfig_LocalityWeightedLbConfig_ struct { + LocalityWeightedLbConfig *Cluster_CommonLbConfig_LocalityWeightedLbConfig `protobuf:"bytes,3,opt,name=locality_weighted_lb_config,json=localityWeightedLbConfig,proto3,oneof"` +} + +func (*Cluster_CommonLbConfig_ZoneAwareLbConfig_) isCluster_CommonLbConfig_LocalityConfigSpecifier() {} + +func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_) isCluster_CommonLbConfig_LocalityConfigSpecifier() { +} + +func (m *Cluster_CommonLbConfig) GetLocalityConfigSpecifier() isCluster_CommonLbConfig_LocalityConfigSpecifier { + if m != nil { + return m.LocalityConfigSpecifier + } + return nil +} + +func (m *Cluster_CommonLbConfig) GetZoneAwareLbConfig() *Cluster_CommonLbConfig_ZoneAwareLbConfig { + if x, ok := m.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_ZoneAwareLbConfig_); ok { + return x.ZoneAwareLbConfig + } + return nil +} + +func (m *Cluster_CommonLbConfig) GetLocalityWeightedLbConfig() *Cluster_CommonLbConfig_LocalityWeightedLbConfig { + if x, ok := m.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_LocalityWeightedLbConfig_); ok { + return x.LocalityWeightedLbConfig + } + return nil +} + +func (m *Cluster_CommonLbConfig) GetUpdateMergeWindow() *duration.Duration { + if m != nil { + return m.UpdateMergeWindow + } + return nil +} + +func (m *Cluster_CommonLbConfig) GetIgnoreNewHostsUntilFirstHc() bool { + if m != nil { + return m.IgnoreNewHostsUntilFirstHc + } + return false +} + +func (m *Cluster_CommonLbConfig) GetCloseConnectionsOnHostSetChange() bool { + if m != nil { + return m.CloseConnectionsOnHostSetChange + } + return false +} + +func (m *Cluster_CommonLbConfig) GetConsistentHashingLbConfig() *Cluster_CommonLbConfig_ConsistentHashingLbConfig { + if m != nil { + return m.ConsistentHashingLbConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Cluster_CommonLbConfig) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Cluster_CommonLbConfig_ZoneAwareLbConfig_)(nil), + (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_)(nil), + } +} + +type Cluster_CommonLbConfig_ZoneAwareLbConfig struct { + RoutingEnabled *_type.Percent `protobuf:"bytes,1,opt,name=routing_enabled,json=routingEnabled,proto3" json:"routing_enabled,omitempty"` + MinClusterSize *wrappers.UInt64Value `protobuf:"bytes,2,opt,name=min_cluster_size,json=minClusterSize,proto3" json:"min_cluster_size,omitempty"` + FailTrafficOnPanic bool `protobuf:"varint,3,opt,name=fail_traffic_on_panic,json=failTrafficOnPanic,proto3" json:"fail_traffic_on_panic,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Reset() { + *m = Cluster_CommonLbConfig_ZoneAwareLbConfig{} +} +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) String() string { return proto.CompactTextString(m) } +func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoMessage() {} +func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 7, 0} +} + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.Unmarshal(m, b) +} +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.Merge(m, src) +} +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.Size(m) +} +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_CommonLbConfig_ZoneAwareLbConfig proto.InternalMessageInfo + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *_type.Percent { + if m != nil { + return m.RoutingEnabled + } + return nil +} + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetMinClusterSize() *wrappers.UInt64Value { + if m != nil { + return m.MinClusterSize + } + return nil +} + +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetFailTrafficOnPanic() bool { + if m != nil { + return m.FailTrafficOnPanic + } + return false +} + +type Cluster_CommonLbConfig_LocalityWeightedLbConfig struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Reset() { + *m = Cluster_CommonLbConfig_LocalityWeightedLbConfig{} +} +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) String() string { + return proto.CompactTextString(m) +} +func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoMessage() {} +func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 7, 1} +} + +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.Unmarshal(m, b) +} +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.Merge(m, src) +} +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.Size(m) +} +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_CommonLbConfig_LocalityWeightedLbConfig proto.InternalMessageInfo + +type Cluster_CommonLbConfig_ConsistentHashingLbConfig struct { + UseHostnameForHashing bool `protobuf:"varint,1,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Reset() { + *m = Cluster_CommonLbConfig_ConsistentHashingLbConfig{} +} +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) String() string { + return proto.CompactTextString(m) +} +func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoMessage() {} +func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 7, 2} +} + +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_CommonLbConfig_ConsistentHashingLbConfig.Unmarshal(m, b) +} +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_CommonLbConfig_ConsistentHashingLbConfig.Marshal(b, m, deterministic) +} +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_CommonLbConfig_ConsistentHashingLbConfig.Merge(m, src) +} +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) XXX_Size() int { + return xxx_messageInfo_Cluster_CommonLbConfig_ConsistentHashingLbConfig.Size(m) +} +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_CommonLbConfig_ConsistentHashingLbConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_CommonLbConfig_ConsistentHashingLbConfig proto.InternalMessageInfo + +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) GetUseHostnameForHashing() bool { + if m != nil { + return m.UseHostnameForHashing + } + return false +} + +type Cluster_RefreshRate struct { + BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` + MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster_RefreshRate) Reset() { *m = Cluster_RefreshRate{} } +func (m *Cluster_RefreshRate) String() string { return proto.CompactTextString(m) } +func (*Cluster_RefreshRate) ProtoMessage() {} +func (*Cluster_RefreshRate) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{0, 8} +} + +func (m *Cluster_RefreshRate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Cluster_RefreshRate.Unmarshal(m, b) +} +func (m *Cluster_RefreshRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Cluster_RefreshRate.Marshal(b, m, deterministic) +} +func (m *Cluster_RefreshRate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster_RefreshRate.Merge(m, src) +} +func (m *Cluster_RefreshRate) XXX_Size() int { + return xxx_messageInfo_Cluster_RefreshRate.Size(m) +} +func (m *Cluster_RefreshRate) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster_RefreshRate.DiscardUnknown(m) +} + +var xxx_messageInfo_Cluster_RefreshRate proto.InternalMessageInfo + +func (m *Cluster_RefreshRate) GetBaseInterval() *duration.Duration { + if m != nil { + return m.BaseInterval + } + return nil +} + +func (m *Cluster_RefreshRate) GetMaxInterval() *duration.Duration { + if m != nil { + return m.MaxInterval + } + return nil +} + +type LoadBalancingPolicy struct { + Policies []*LoadBalancingPolicy_Policy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoadBalancingPolicy) Reset() { *m = LoadBalancingPolicy{} } +func (m *LoadBalancingPolicy) String() string { return proto.CompactTextString(m) } +func (*LoadBalancingPolicy) ProtoMessage() {} +func (*LoadBalancingPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{1} +} + +func (m *LoadBalancingPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoadBalancingPolicy.Unmarshal(m, b) +} +func (m *LoadBalancingPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoadBalancingPolicy.Marshal(b, m, deterministic) +} +func (m *LoadBalancingPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadBalancingPolicy.Merge(m, src) +} +func (m *LoadBalancingPolicy) XXX_Size() int { + return xxx_messageInfo_LoadBalancingPolicy.Size(m) +} +func (m *LoadBalancingPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_LoadBalancingPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_LoadBalancingPolicy proto.InternalMessageInfo + +func (m *LoadBalancingPolicy) GetPolicies() []*LoadBalancingPolicy_Policy { + if m != nil { + return m.Policies + } + return nil +} + +type LoadBalancingPolicy_Policy struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` // Deprecated: Do not use. + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoadBalancingPolicy_Policy) Reset() { *m = LoadBalancingPolicy_Policy{} } +func (m *LoadBalancingPolicy_Policy) String() string { return proto.CompactTextString(m) } +func (*LoadBalancingPolicy_Policy) ProtoMessage() {} +func (*LoadBalancingPolicy_Policy) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{1, 0} +} + +func (m *LoadBalancingPolicy_Policy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoadBalancingPolicy_Policy.Unmarshal(m, b) +} +func (m *LoadBalancingPolicy_Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoadBalancingPolicy_Policy.Marshal(b, m, deterministic) +} +func (m *LoadBalancingPolicy_Policy) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadBalancingPolicy_Policy.Merge(m, src) +} +func (m *LoadBalancingPolicy_Policy) XXX_Size() int { + return xxx_messageInfo_LoadBalancingPolicy_Policy.Size(m) +} +func (m *LoadBalancingPolicy_Policy) XXX_DiscardUnknown() { + xxx_messageInfo_LoadBalancingPolicy_Policy.DiscardUnknown(m) +} + +var xxx_messageInfo_LoadBalancingPolicy_Policy proto.InternalMessageInfo + +func (m *LoadBalancingPolicy_Policy) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Deprecated: Do not use. +func (m *LoadBalancingPolicy_Policy) GetConfig() *_struct.Struct { + if m != nil { + return m.Config + } + return nil +} + +func (m *LoadBalancingPolicy_Policy) GetTypedConfig() *any.Any { + if m != nil { + return m.TypedConfig + } + return nil +} + +type UpstreamBindConfig struct { + SourceAddress *core.Address `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpstreamBindConfig) Reset() { *m = UpstreamBindConfig{} } +func (m *UpstreamBindConfig) String() string { return proto.CompactTextString(m) } +func (*UpstreamBindConfig) ProtoMessage() {} +func (*UpstreamBindConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{2} +} + +func (m *UpstreamBindConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpstreamBindConfig.Unmarshal(m, b) +} +func (m *UpstreamBindConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpstreamBindConfig.Marshal(b, m, deterministic) +} +func (m *UpstreamBindConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpstreamBindConfig.Merge(m, src) +} +func (m *UpstreamBindConfig) XXX_Size() int { + return xxx_messageInfo_UpstreamBindConfig.Size(m) +} +func (m *UpstreamBindConfig) XXX_DiscardUnknown() { + xxx_messageInfo_UpstreamBindConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_UpstreamBindConfig proto.InternalMessageInfo + +func (m *UpstreamBindConfig) GetSourceAddress() *core.Address { + if m != nil { + return m.SourceAddress + } + return nil +} + +type UpstreamConnectionOptions struct { + TcpKeepalive *core.TcpKeepalive `protobuf:"bytes,1,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcp_keepalive,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpstreamConnectionOptions) Reset() { *m = UpstreamConnectionOptions{} } +func (m *UpstreamConnectionOptions) String() string { return proto.CompactTextString(m) } +func (*UpstreamConnectionOptions) ProtoMessage() {} +func (*UpstreamConnectionOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_72da53dee26868ef, []int{3} +} + +func (m *UpstreamConnectionOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpstreamConnectionOptions.Unmarshal(m, b) +} +func (m *UpstreamConnectionOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpstreamConnectionOptions.Marshal(b, m, deterministic) +} +func (m *UpstreamConnectionOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpstreamConnectionOptions.Merge(m, src) +} +func (m *UpstreamConnectionOptions) XXX_Size() int { + return xxx_messageInfo_UpstreamConnectionOptions.Size(m) +} +func (m *UpstreamConnectionOptions) XXX_DiscardUnknown() { + xxx_messageInfo_UpstreamConnectionOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_UpstreamConnectionOptions proto.InternalMessageInfo + +func (m *UpstreamConnectionOptions) GetTcpKeepalive() *core.TcpKeepalive { + if m != nil { + return m.TcpKeepalive + } + return nil +} + +func init() { + proto.RegisterEnum("envoy.api.v2.Cluster_DiscoveryType", Cluster_DiscoveryType_name, Cluster_DiscoveryType_value) + proto.RegisterEnum("envoy.api.v2.Cluster_LbPolicy", Cluster_LbPolicy_name, Cluster_LbPolicy_value) + proto.RegisterEnum("envoy.api.v2.Cluster_DnsLookupFamily", Cluster_DnsLookupFamily_name, Cluster_DnsLookupFamily_value) + proto.RegisterEnum("envoy.api.v2.Cluster_ClusterProtocolSelection", Cluster_ClusterProtocolSelection_name, Cluster_ClusterProtocolSelection_value) + proto.RegisterEnum("envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy", Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name, Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value) + proto.RegisterEnum("envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy", Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name, Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_value) + proto.RegisterEnum("envoy.api.v2.Cluster_RingHashLbConfig_HashFunction", Cluster_RingHashLbConfig_HashFunction_name, Cluster_RingHashLbConfig_HashFunction_value) + proto.RegisterType((*Cluster)(nil), "envoy.api.v2.Cluster") + proto.RegisterMapType((map[string]*_struct.Struct)(nil), "envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry") + proto.RegisterMapType((map[string]*any.Any)(nil), "envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry") + proto.RegisterType((*Cluster_TransportSocketMatch)(nil), "envoy.api.v2.Cluster.TransportSocketMatch") + proto.RegisterType((*Cluster_CustomClusterType)(nil), "envoy.api.v2.Cluster.CustomClusterType") + proto.RegisterType((*Cluster_EdsClusterConfig)(nil), "envoy.api.v2.Cluster.EdsClusterConfig") + proto.RegisterType((*Cluster_LbSubsetConfig)(nil), "envoy.api.v2.Cluster.LbSubsetConfig") + proto.RegisterType((*Cluster_LbSubsetConfig_LbSubsetSelector)(nil), "envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector") + proto.RegisterType((*Cluster_LeastRequestLbConfig)(nil), "envoy.api.v2.Cluster.LeastRequestLbConfig") + proto.RegisterType((*Cluster_RingHashLbConfig)(nil), "envoy.api.v2.Cluster.RingHashLbConfig") + proto.RegisterType((*Cluster_OriginalDstLbConfig)(nil), "envoy.api.v2.Cluster.OriginalDstLbConfig") + proto.RegisterType((*Cluster_CommonLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig") + proto.RegisterType((*Cluster_CommonLbConfig_ZoneAwareLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig") + proto.RegisterType((*Cluster_CommonLbConfig_LocalityWeightedLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig") + proto.RegisterType((*Cluster_CommonLbConfig_ConsistentHashingLbConfig)(nil), "envoy.api.v2.Cluster.CommonLbConfig.ConsistentHashingLbConfig") + proto.RegisterType((*Cluster_RefreshRate)(nil), "envoy.api.v2.Cluster.RefreshRate") + proto.RegisterType((*LoadBalancingPolicy)(nil), "envoy.api.v2.LoadBalancingPolicy") + proto.RegisterType((*LoadBalancingPolicy_Policy)(nil), "envoy.api.v2.LoadBalancingPolicy.Policy") + proto.RegisterType((*UpstreamBindConfig)(nil), "envoy.api.v2.UpstreamBindConfig") + proto.RegisterType((*UpstreamConnectionOptions)(nil), "envoy.api.v2.UpstreamConnectionOptions") +} + +func init() { proto.RegisterFile("envoy/api/v2/cluster.proto", fileDescriptor_72da53dee26868ef) } + +var fileDescriptor_72da53dee26868ef = []byte{ + // 3226 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x59, 0xbb, 0x6f, 0x23, 0x49, + 0x7a, 0x57, 0x53, 0x9a, 0x11, 0x55, 0xa4, 0xa8, 0x56, 0x49, 0x33, 0x6a, 0x51, 0x8f, 0xd1, 0x68, + 0x67, 0xf6, 0x74, 0xe3, 0x3b, 0xca, 0xa7, 0xd9, 0xdb, 0x3d, 0x3f, 0x76, 0x0d, 0xbe, 0x34, 0xd2, + 0x0e, 0x45, 0xea, 0x9a, 0xe4, 0xce, 0xed, 0x2d, 0x0e, 0xb5, 0xc5, 0xee, 0xa2, 0xd8, 0x50, 0xb3, + 0xbb, 0xdd, 0x55, 0xad, 0x11, 0xd7, 0x80, 0x3d, 0x67, 0x18, 0x36, 0x60, 0x07, 0x4e, 0xfd, 0x27, + 0xd8, 0x0b, 0x27, 0x06, 0x1c, 0x18, 0x8e, 0x1c, 0x3a, 0x70, 0x62, 0x47, 0x97, 0x38, 0x77, 0xe4, + 0xe0, 0x12, 0x03, 0x13, 0x18, 0x87, 0x7a, 0x34, 0xc5, 0x47, 0x53, 0xd2, 0x5e, 0x24, 0x55, 0x7d, + 0xbf, 0xef, 0xf7, 0x55, 0x57, 0x7d, 0xf5, 0x3d, 0x8a, 0x20, 0x4f, 0xbc, 0x2b, 0x7f, 0x70, 0x88, + 0x03, 0xe7, 0xf0, 0xea, 0xe8, 0xd0, 0x72, 0x23, 0xca, 0x48, 0x58, 0x08, 0x42, 0x9f, 0xf9, 0x30, + 0x2b, 0x64, 0x05, 0x1c, 0x38, 0x85, 0xab, 0xa3, 0xfc, 0xf6, 0x18, 0x12, 0x47, 0xac, 0x77, 0x68, + 0x91, 0x90, 0x49, 0x6c, 0xfe, 0x45, 0x12, 0xcf, 0xa1, 0xe5, 0x84, 0x56, 0xe4, 0x30, 0xd4, 0x09, + 0x09, 0xbe, 0x8c, 0x79, 0xf3, 0x4f, 0x13, 0xb1, 0x5d, 0xc7, 0x1d, 0x9a, 0xce, 0xff, 0x20, 0x11, + 0xe2, 0x47, 0xcc, 0x75, 0x48, 0x88, 0x6c, 0xc2, 0x88, 0xc5, 0x1c, 0xdf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0b, 0xb1, 0x75, 0x19, + 0xf7, 0x29, 0xa8, 0x13, 0xd9, 0x17, 0x84, 0x51, 0xe3, 0x50, 0x06, 0x74, 0x21, 0x54, 0x8d, 0x48, + 0x49, 0x8a, 0xf2, 0xff, 0xa4, 0x81, 0xf5, 0xa4, 0xc6, 0x31, 0xb1, 0x41, 0xd4, 0xe3, 0x06, 0xf1, + 0x87, 0xe0, 0x81, 0x68, 0x49, 0x45, 0xf7, 0x97, 0x39, 0xda, 0x98, 0x0a, 0xd3, 0x4d, 0xd1, 0x7a, + 0x9b, 0x12, 0x95, 0x78, 0xff, 0xe6, 0x7f, 0xeb, 0xfb, 0x97, 0x77, 0xc0, 0xea, 0x54, 0x2f, 0x78, + 0x7b, 0x43, 0xfb, 0x09, 0xc8, 0xca, 0x22, 0x47, 0x05, 0x13, 0xb9, 0xec, 0xf5, 0xa9, 0x65, 0x17, + 0xbd, 0x81, 0x99, 0x11, 0x48, 0xb9, 0xc7, 0xf9, 0x08, 0xe8, 0x93, 0x2d, 0x22, 0x3f, 0x26, 0xd1, + 0x66, 0x4a, 0x2a, 0xed, 0x9e, 0xc7, 0xc4, 0xfb, 0x4a, 0xa9, 0xff, 0x14, 0x64, 0xf9, 0x11, 0x3b, + 0x16, 0x91, 0xcd, 0x75, 0x4a, 0x36, 0xd7, 0x6a, 0x8e, 0x37, 0xd7, 0xf9, 0x5f, 0x2e, 0x82, 0xdc, + 0x78, 0x0e, 0x81, 0x1e, 0x58, 0xe9, 0x62, 0xd7, 0xed, 0xf0, 0xf3, 0x55, 0xde, 0xa6, 0x89, 0xc0, + 0xf1, 0x07, 0xf7, 0x49, 0x41, 0xc3, 0xe1, 0xb1, 0xe2, 0x98, 0xea, 0xf9, 0x72, 0xdd, 0x31, 0x09, + 0xfc, 0x0c, 0xe4, 0x6c, 0xd2, 0xc5, 0x91, 0xcb, 0x54, 0xe2, 0xbb, 0xeb, 0xac, 0x97, 0x15, 0x5c, + 0xda, 0x81, 0x5f, 0x03, 0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 0x6c, 0x4f, 0x3f, 0x1e, 0x16, 0x41, 0x4e, 0xfe, 0xc0, + 0x8e, 0xd4, 0xaf, 0xf5, 0x2a, 0x66, 0xdc, 0xf6, 0x54, 0xbb, 0x2c, 0x35, 0xd4, 0x70, 0x1f, 0x83, + 0xcd, 0x99, 0xef, 0x34, 0xb0, 0x02, 0x96, 0x99, 0x15, 0xa0, 0x4b, 0x42, 0x02, 0xec, 0x3a, 0x57, + 0xe4, 0x96, 0x8e, 0xb4, 0x65, 0x05, 0xaf, 0x63, 0x98, 0x99, 0x65, 0x23, 0xa3, 0x52, 0x53, 0x3c, + 0xa8, 0x6c, 0xc2, 0x0d, 0xa9, 0x25, 0x3f, 0x7d, 0xf8, 0x00, 0x72, 0xf5, 0xf2, 0x5f, 0xdf, 0xfd, + 0xfb, 0x7f, 0x3e, 0x4c, 0xe9, 0x1a, 0xc8, 0x3b, 0xbe, 0x64, 0x0e, 0x42, 0xff, 0x7a, 0x30, 0x66, + 0xa4, 0x94, 0x1d, 0x75, 0xb9, 0x73, 0xad, 0xf3, 0x50, 0xec, 0xd5, 0xcb, 0xdf, 0x04, 0x00, 0x00, + 0xff, 0xff, 0x19, 0x3a, 0xcd, 0x56, 0x7f, 0x21, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go new file mode 100644 index 0000000000..87ced325dd --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go @@ -0,0 +1,2066 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/cluster.proto + +package envoy_api_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _cluster_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on Cluster with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Cluster) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetTransportSocketMatches() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(m.GetName()) < 1 { + return ClusterValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for AltStatName + + if v, ok := interface{}(m.GetEdsClusterConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "EdsClusterConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetConnectTimeout(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return ClusterValidationError{ + field: "ConnectTimeout", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return ClusterValidationError{ + field: "ConnectTimeout", + reason: "value must be greater than 0s", + } + } + + } + + if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if _, ok := Cluster_LbPolicy_name[int32(m.GetLbPolicy())]; !ok { + return ClusterValidationError{ + field: "LbPolicy", + reason: "value must be one of the defined enum values", + } + } + + for idx, item := range m.GetHosts() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("Hosts[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetLoadAssignment()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "LoadAssignment", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetHealthChecks() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "UpstreamHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for key, val := range m.GetExtensionProtocolOptions() { + _ = val + + // no validation rules for ExtensionProtocolOptions[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("ExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for key, val := range m.GetTypedExtensionProtocolOptions() { + _ = val + + // no validation rules for TypedExtensionProtocolOptions[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if d := m.GetDnsRefreshRate(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return ClusterValidationError{ + field: "DnsRefreshRate", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur <= gt { + return ClusterValidationError{ + field: "DnsRefreshRate", + reason: "value must be greater than 1ms", + } + } + + } + + if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "DnsFailureRefreshRate", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RespectDnsTtl + + if _, ok := Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { + return ClusterValidationError{ + field: "DnsLookupFamily", + reason: "value must be one of the defined enum values", + } + } + + for idx, item := range m.GetDnsResolvers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("DnsResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for UseTcpForDnsLookups + + if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "OutlierDetection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetCleanupInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return ClusterValidationError{ + field: "CleanupInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return ClusterValidationError{ + field: "CleanupInterval", + reason: "value must be greater than 0s", + } + } + + } + + if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "UpstreamBindConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetLbSubsetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "LbSubsetConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetCommonLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "CommonLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ProtocolSelection + + if v, ok := interface{}(m.GetUpstreamConnectionOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "UpstreamConnectionOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for CloseConnectionsOnHostHealthFailure + + // no validation rules for DrainConnectionsOnHostRemoval + + for idx, item := range m.GetFilters() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetLoadBalancingPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "LoadBalancingPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetLrsServer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "LrsServer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TrackTimeoutBudgets + + switch m.ClusterDiscoveryType.(type) { + + case *Cluster_Type: + + if _, ok := Cluster_DiscoveryType_name[int32(m.GetType())]; !ok { + return ClusterValidationError{ + field: "Type", + reason: "value must be one of the defined enum values", + } + } + + case *Cluster_ClusterType: + + if v, ok := interface{}(m.GetClusterType()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "ClusterType", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.LbConfig.(type) { + + case *Cluster_RingHashLbConfig_: + + if v, ok := interface{}(m.GetRingHashLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "RingHashLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Cluster_OriginalDstLbConfig_: + + if v, ok := interface{}(m.GetOriginalDstLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "OriginalDstLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Cluster_LeastRequestLbConfig_: + + if v, ok := interface{}(m.GetLeastRequestLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterValidationError{ + field: "LeastRequestLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ClusterValidationError is the validation error returned by Cluster.Validate +// if the designated constraints aren't met. +type ClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterValidationError) ErrorName() string { return "ClusterValidationError" } + +// Error satisfies the builtin error interface +func (e 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 %sCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterValidationError{} + +// Validate checks the field values on LoadBalancingPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *LoadBalancingPolicy) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetPolicies() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LoadBalancingPolicyValidationError{ + field: fmt.Sprintf("Policies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// LoadBalancingPolicyValidationError is the validation error returned by +// LoadBalancingPolicy.Validate if the designated constraints aren't met. +type LoadBalancingPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LoadBalancingPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LoadBalancingPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LoadBalancingPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LoadBalancingPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LoadBalancingPolicyValidationError) ErrorName() string { + return "LoadBalancingPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e LoadBalancingPolicyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLoadBalancingPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LoadBalancingPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LoadBalancingPolicyValidationError{} + +// Validate checks the field values on UpstreamBindConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *UpstreamBindConfig) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamBindConfigValidationError{ + field: "SourceAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// UpstreamBindConfigValidationError is the validation error returned by +// UpstreamBindConfig.Validate if the designated constraints aren't met. +type UpstreamBindConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpstreamBindConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpstreamBindConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpstreamBindConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpstreamBindConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpstreamBindConfigValidationError) ErrorName() string { + return "UpstreamBindConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e UpstreamBindConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUpstreamBindConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpstreamBindConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpstreamBindConfigValidationError{} + +// Validate checks the field values on UpstreamConnectionOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *UpstreamConnectionOptions) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetTcpKeepalive()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamConnectionOptionsValidationError{ + field: "TcpKeepalive", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// UpstreamConnectionOptionsValidationError is the validation error returned by +// UpstreamConnectionOptions.Validate if the designated constraints aren't met. +type UpstreamConnectionOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpstreamConnectionOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpstreamConnectionOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpstreamConnectionOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpstreamConnectionOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpstreamConnectionOptionsValidationError) ErrorName() string { + return "UpstreamConnectionOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e UpstreamConnectionOptionsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUpstreamConnectionOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpstreamConnectionOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpstreamConnectionOptionsValidationError{} + +// Validate checks the field values on Cluster_TransportSocketMatch with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_TransportSocketMatch) Validate() error { + if m == nil { + return nil + } + + if utf8.RuneCountInString(m.GetName()) < 1 { + return Cluster_TransportSocketMatchValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + } + + if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_TransportSocketMatchValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_TransportSocketMatchValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Cluster_TransportSocketMatchValidationError is the validation error returned +// by Cluster_TransportSocketMatch.Validate if the designated constraints +// aren't met. +type Cluster_TransportSocketMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_TransportSocketMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_TransportSocketMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_TransportSocketMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_TransportSocketMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_TransportSocketMatchValidationError) ErrorName() string { + return "Cluster_TransportSocketMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_TransportSocketMatchValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_TransportSocketMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_TransportSocketMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_TransportSocketMatchValidationError{} + +// Validate checks the field values on Cluster_CustomClusterType with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_CustomClusterType) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return Cluster_CustomClusterTypeValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CustomClusterTypeValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Cluster_CustomClusterTypeValidationError is the validation error returned by +// Cluster_CustomClusterType.Validate if the designated constraints aren't met. +type Cluster_CustomClusterTypeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_CustomClusterTypeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_CustomClusterTypeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_CustomClusterTypeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_CustomClusterTypeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_CustomClusterTypeValidationError) ErrorName() string { + return "Cluster_CustomClusterTypeValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_CustomClusterTypeValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_CustomClusterType.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_CustomClusterTypeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_CustomClusterTypeValidationError{} + +// Validate checks the field values on Cluster_EdsClusterConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_EdsClusterConfig) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetEdsConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_EdsClusterConfigValidationError{ + field: "EdsConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ServiceName + + return nil +} + +// Cluster_EdsClusterConfigValidationError is the validation error returned by +// Cluster_EdsClusterConfig.Validate if the designated constraints aren't met. +type Cluster_EdsClusterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_EdsClusterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_EdsClusterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_EdsClusterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_EdsClusterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_EdsClusterConfigValidationError) ErrorName() string { + return "Cluster_EdsClusterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_EdsClusterConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_EdsClusterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_EdsClusterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_EdsClusterConfigValidationError{} + +// Validate checks the field values on Cluster_LbSubsetConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_LbSubsetConfig) Validate() error { + if m == nil { + return nil + } + + if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { + return Cluster_LbSubsetConfigValidationError{ + field: "FallbackPolicy", + reason: "value must be one of the defined enum values", + } + } + + if v, ok := interface{}(m.GetDefaultSubset()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_LbSubsetConfigValidationError{ + field: "DefaultSubset", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetSubsetSelectors() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_LbSubsetConfigValidationError{ + field: fmt.Sprintf("SubsetSelectors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for LocalityWeightAware + + // no validation rules for ScaleLocalityWeight + + // no validation rules for PanicModeAny + + // no validation rules for ListAsAny + + return nil +} + +// Cluster_LbSubsetConfigValidationError is the validation error returned by +// Cluster_LbSubsetConfig.Validate if the designated constraints aren't met. +type Cluster_LbSubsetConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_LbSubsetConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_LbSubsetConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_LbSubsetConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_LbSubsetConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_LbSubsetConfigValidationError) ErrorName() string { + return "Cluster_LbSubsetConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_LbSubsetConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_LbSubsetConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_LbSubsetConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_LbSubsetConfigValidationError{} + +// Validate checks the field values on Cluster_LeastRequestLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_LeastRequestLbConfig) Validate() error { + if m == nil { + return nil + } + + if wrapper := m.GetChoiceCount(); wrapper != nil { + + if wrapper.GetValue() < 2 { + return Cluster_LeastRequestLbConfigValidationError{ + field: "ChoiceCount", + reason: "value must be greater than or equal to 2", + } + } + + } + + return nil +} + +// Cluster_LeastRequestLbConfigValidationError is the validation error returned +// by Cluster_LeastRequestLbConfig.Validate if the designated constraints +// aren't met. +type Cluster_LeastRequestLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_LeastRequestLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_LeastRequestLbConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_LeastRequestLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_LeastRequestLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_LeastRequestLbConfigValidationError) ErrorName() string { + return "Cluster_LeastRequestLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_LeastRequestLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_LeastRequestLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_LeastRequestLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_LeastRequestLbConfigValidationError{} + +// Validate checks the field values on Cluster_RingHashLbConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_RingHashLbConfig) Validate() error { + if m == nil { + return nil + } + + if wrapper := m.GetMinimumRingSize(); wrapper != nil { + + if wrapper.GetValue() > 8388608 { + return Cluster_RingHashLbConfigValidationError{ + field: "MinimumRingSize", + reason: "value must be less than or equal to 8388608", + } + } + + } + + if _, ok := Cluster_RingHashLbConfig_HashFunction_name[int32(m.GetHashFunction())]; !ok { + return Cluster_RingHashLbConfigValidationError{ + field: "HashFunction", + reason: "value must be one of the defined enum values", + } + } + + if wrapper := m.GetMaximumRingSize(); wrapper != nil { + + if wrapper.GetValue() > 8388608 { + return Cluster_RingHashLbConfigValidationError{ + field: "MaximumRingSize", + reason: "value must be less than or equal to 8388608", + } + } + + } + + return nil +} + +// Cluster_RingHashLbConfigValidationError is the validation error returned by +// Cluster_RingHashLbConfig.Validate if the designated constraints aren't met. +type Cluster_RingHashLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_RingHashLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_RingHashLbConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_RingHashLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_RingHashLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_RingHashLbConfigValidationError) ErrorName() string { + return "Cluster_RingHashLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_RingHashLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_RingHashLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_RingHashLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_RingHashLbConfigValidationError{} + +// Validate checks the field values on Cluster_OriginalDstLbConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_OriginalDstLbConfig) Validate() error { + if m == nil { + return nil + } + + // no validation rules for UseHttpHeader + + return nil +} + +// Cluster_OriginalDstLbConfigValidationError is the validation error returned +// by Cluster_OriginalDstLbConfig.Validate if the designated constraints +// aren't met. +type Cluster_OriginalDstLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_OriginalDstLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_OriginalDstLbConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_OriginalDstLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_OriginalDstLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_OriginalDstLbConfigValidationError) ErrorName() string { + return "Cluster_OriginalDstLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_OriginalDstLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_OriginalDstLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_OriginalDstLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_OriginalDstLbConfigValidationError{} + +// Validate checks the field values on Cluster_CommonLbConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_CommonLbConfig) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetHealthyPanicThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfigValidationError{ + field: "HealthyPanicThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetUpdateMergeWindow()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfigValidationError{ + field: "UpdateMergeWindow", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IgnoreNewHostsUntilFirstHc + + // no validation rules for CloseConnectionsOnHostSetChange + + if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfigValidationError{ + field: "ConsistentHashingLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.LocalityConfigSpecifier.(type) { + + case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: + + if v, ok := interface{}(m.GetZoneAwareLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfigValidationError{ + field: "ZoneAwareLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: + + if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfigValidationError{ + field: "LocalityWeightedLbConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// Cluster_CommonLbConfigValidationError is the validation error returned by +// Cluster_CommonLbConfig.Validate if the designated constraints aren't met. +type Cluster_CommonLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_CommonLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_CommonLbConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_CommonLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_CommonLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_CommonLbConfigValidationError) ErrorName() string { + return "Cluster_CommonLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_CommonLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_CommonLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_CommonLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_CommonLbConfigValidationError{} + +// Validate checks the field values on Cluster_RefreshRate with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Cluster_RefreshRate) Validate() error { + if m == nil { + return nil + } + + if m.GetBaseInterval() == nil { + return Cluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value is required", + } + } + + if d := m.GetBaseInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return Cluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur <= gt { + return Cluster_RefreshRateValidationError{ + field: "BaseInterval", + reason: "value must be greater than 1ms", + } + } + + } + + if d := m.GetMaxInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return Cluster_RefreshRateValidationError{ + field: "MaxInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur <= gt { + return Cluster_RefreshRateValidationError{ + field: "MaxInterval", + reason: "value must be greater than 1ms", + } + } + + } + + return nil +} + +// Cluster_RefreshRateValidationError is the validation error returned by +// Cluster_RefreshRate.Validate if the designated constraints aren't met. +type Cluster_RefreshRateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_RefreshRateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_RefreshRateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_RefreshRateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_RefreshRateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_RefreshRateValidationError) ErrorName() string { + return "Cluster_RefreshRateValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_RefreshRateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_RefreshRate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_RefreshRateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_RefreshRateValidationError{} + +// Validate checks the field values on Cluster_LbSubsetConfig_LbSubsetSelector +// with the rules defined in the proto definition for this message. If any +// rules are violated, an error is returned. +func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Validate() error { + if m == nil { + return nil + } + + if _, ok := Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { + return Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{ + field: "FallbackPolicy", + reason: "value must be one of the defined enum values", + } + } + + return nil +} + +// Cluster_LbSubsetConfig_LbSubsetSelectorValidationError is the validation +// error returned by Cluster_LbSubsetConfig_LbSubsetSelector.Validate if the +// designated constraints aren't met. +type Cluster_LbSubsetConfig_LbSubsetSelectorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) ErrorName() string { + return "Cluster_LbSubsetConfig_LbSubsetSelectorValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_LbSubsetConfig_LbSubsetSelector.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{} + +// Validate checks the field values on Cluster_CommonLbConfig_ZoneAwareLbConfig +// with the rules defined in the proto definition for this message. If any +// rules are violated, an error is returned. +func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "RoutingEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ + field: "MinClusterSize", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailTrafficOnPanic + + return nil +} + +// Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError is the validation +// error returned by Cluster_CommonLbConfig_ZoneAwareLbConfig.Validate if the +// designated constraints aren't met. +type Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) ErrorName() string { + return "Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_CommonLbConfig_ZoneAwareLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{} + +// Validate checks the field values on +// Cluster_CommonLbConfig_LocalityWeightedLbConfig with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError is the +// validation error returned by +// Cluster_CommonLbConfig_LocalityWeightedLbConfig.Validate if the designated +// constraints aren't met. +type Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) ErrorName() string { + return "Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_CommonLbConfig_LocalityWeightedLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError{} + +// Validate checks the field values on +// Cluster_CommonLbConfig_ConsistentHashingLbConfig with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Validate() error { + if m == nil { + return nil + } + + // no validation rules for UseHostnameForHashing + + return nil +} + +// Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError is the +// validation error returned by +// Cluster_CommonLbConfig_ConsistentHashingLbConfig.Validate if the designated +// constraints aren't met. +type Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) ErrorName() string { + return "Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCluster_CommonLbConfig_ConsistentHashingLbConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{} + +// Validate checks the field values on LoadBalancingPolicy_Policy with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *LoadBalancingPolicy_Policy) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LoadBalancingPolicy_PolicyValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LoadBalancingPolicy_PolicyValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// LoadBalancingPolicy_PolicyValidationError is the validation error returned +// by LoadBalancingPolicy_Policy.Validate if the designated constraints aren't met. +type LoadBalancingPolicy_PolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LoadBalancingPolicy_PolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LoadBalancingPolicy_PolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LoadBalancingPolicy_PolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LoadBalancingPolicy_PolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LoadBalancingPolicy_PolicyValidationError) ErrorName() string { + return "LoadBalancingPolicy_PolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e LoadBalancingPolicy_PolicyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLoadBalancingPolicy_Policy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LoadBalancingPolicy_PolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LoadBalancingPolicy_PolicyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go index 30a138eba8..519d7ce79d 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go @@ -1,19 +1,17 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/cluster/circuit_breaker.proto -package cluster +package envoy_api_v2_cluster import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,16 +23,9 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// :ref:`Circuit breaking` settings can be -// specified individually for each defined priority. type CircuitBreakers struct { - // If multiple :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, - // the first one in the list is used. If no Thresholds is defined for a given - // :ref:`RoutingPriority`, the default values - // are used. Thresholds []*CircuitBreakers_Thresholds `protobuf:"bytes,1,rep,name=thresholds,proto3" json:"thresholds,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -47,26 +38,18 @@ func (*CircuitBreakers) ProtoMessage() {} func (*CircuitBreakers) Descriptor() ([]byte, []int) { return fileDescriptor_89bc8d4e21efdd79, []int{0} } + func (m *CircuitBreakers) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CircuitBreakers.Unmarshal(m, b) } func (m *CircuitBreakers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CircuitBreakers.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CircuitBreakers.Marshal(b, m, deterministic) } func (m *CircuitBreakers) XXX_Merge(src proto.Message) { xxx_messageInfo_CircuitBreakers.Merge(m, src) } func (m *CircuitBreakers) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CircuitBreakers.Size(m) } func (m *CircuitBreakers) XXX_DiscardUnknown() { xxx_messageInfo_CircuitBreakers.DiscardUnknown(m) @@ -81,39 +64,18 @@ func (m *CircuitBreakers) GetThresholds() []*CircuitBreakers_Thresholds { return nil } -// A Thresholds defines CircuitBreaker settings for a -// :ref:`RoutingPriority`. type CircuitBreakers_Thresholds struct { - // The :ref:`RoutingPriority` - // the specified CircuitBreaker settings apply to. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - Priority core.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"` - // The maximum number of connections that Envoy will make to the upstream - // cluster. If not specified, the default is 1024. - MaxConnections *types.UInt32Value `protobuf:"bytes,2,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` - // The maximum number of pending requests that Envoy will allow to the - // upstream cluster. If not specified, the default is 1024. - MaxPendingRequests *types.UInt32Value `protobuf:"bytes,3,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` - // The maximum number of parallel requests that Envoy will make to the - // upstream cluster. If not specified, the default is 1024. - MaxRequests *types.UInt32Value `protobuf:"bytes,4,opt,name=max_requests,json=maxRequests,proto3" json:"max_requests,omitempty"` - // The maximum number of parallel retries that Envoy will allow to the - // upstream cluster. If not specified, the default is 3. - MaxRetries *types.UInt32Value `protobuf:"bytes,5,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` - // If track_remaining is true, then stats will be published that expose - // the number of resources remaining until the circuit breakers open. If - // not specified, the default is false. - TrackRemaining bool `protobuf:"varint,6,opt,name=track_remaining,json=trackRemaining,proto3" json:"track_remaining,omitempty"` - // The maximum number of connection pools per cluster that Envoy will concurrently support at - // once. If not specified, the default is unlimited. Set this for clusters which create a - // large number of connection pools. See - // :ref:`Circuit Breaking ` for - // more details. - MaxConnectionPools *types.UInt32Value `protobuf:"bytes,7,opt,name=max_connection_pools,json=maxConnectionPools,proto3" json:"max_connection_pools,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Priority core.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"` + MaxConnections *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` + MaxPendingRequests *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` + MaxRequests *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_requests,json=maxRequests,proto3" json:"max_requests,omitempty"` + MaxRetries *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` + RetryBudget *CircuitBreakers_Thresholds_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"` + TrackRemaining bool `protobuf:"varint,6,opt,name=track_remaining,json=trackRemaining,proto3" json:"track_remaining,omitempty"` + MaxConnectionPools *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_connection_pools,json=maxConnectionPools,proto3" json:"max_connection_pools,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CircuitBreakers_Thresholds) Reset() { *m = CircuitBreakers_Thresholds{} } @@ -122,26 +84,18 @@ func (*CircuitBreakers_Thresholds) ProtoMessage() {} func (*CircuitBreakers_Thresholds) Descriptor() ([]byte, []int) { return fileDescriptor_89bc8d4e21efdd79, []int{0, 0} } + func (m *CircuitBreakers_Thresholds) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CircuitBreakers_Thresholds.Unmarshal(m, b) } func (m *CircuitBreakers_Thresholds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CircuitBreakers_Thresholds.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CircuitBreakers_Thresholds.Marshal(b, m, deterministic) } func (m *CircuitBreakers_Thresholds) XXX_Merge(src proto.Message) { xxx_messageInfo_CircuitBreakers_Thresholds.Merge(m, src) } func (m *CircuitBreakers_Thresholds) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CircuitBreakers_Thresholds.Size(m) } func (m *CircuitBreakers_Thresholds) XXX_DiscardUnknown() { xxx_messageInfo_CircuitBreakers_Thresholds.DiscardUnknown(m) @@ -156,34 +110,41 @@ func (m *CircuitBreakers_Thresholds) GetPriority() core.RoutingPriority { return core.RoutingPriority_DEFAULT } -func (m *CircuitBreakers_Thresholds) GetMaxConnections() *types.UInt32Value { +func (m *CircuitBreakers_Thresholds) GetMaxConnections() *wrappers.UInt32Value { if m != nil { return m.MaxConnections } return nil } -func (m *CircuitBreakers_Thresholds) GetMaxPendingRequests() *types.UInt32Value { +func (m *CircuitBreakers_Thresholds) GetMaxPendingRequests() *wrappers.UInt32Value { if m != nil { return m.MaxPendingRequests } return nil } -func (m *CircuitBreakers_Thresholds) GetMaxRequests() *types.UInt32Value { +func (m *CircuitBreakers_Thresholds) GetMaxRequests() *wrappers.UInt32Value { if m != nil { return m.MaxRequests } return nil } -func (m *CircuitBreakers_Thresholds) GetMaxRetries() *types.UInt32Value { +func (m *CircuitBreakers_Thresholds) GetMaxRetries() *wrappers.UInt32Value { if m != nil { return m.MaxRetries } return nil } +func (m *CircuitBreakers_Thresholds) GetRetryBudget() *CircuitBreakers_Thresholds_RetryBudget { + if m != nil { + return m.RetryBudget + } + return nil +} + func (m *CircuitBreakers_Thresholds) GetTrackRemaining() bool { if m != nil { return m.TrackRemaining @@ -191,16 +152,66 @@ func (m *CircuitBreakers_Thresholds) GetTrackRemaining() bool { return false } -func (m *CircuitBreakers_Thresholds) GetMaxConnectionPools() *types.UInt32Value { +func (m *CircuitBreakers_Thresholds) GetMaxConnectionPools() *wrappers.UInt32Value { if m != nil { return m.MaxConnectionPools } return nil } +type CircuitBreakers_Thresholds_RetryBudget struct { + BudgetPercent *_type.Percent `protobuf:"bytes,1,opt,name=budget_percent,json=budgetPercent,proto3" json:"budget_percent,omitempty"` + MinRetryConcurrency *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=min_retry_concurrency,json=minRetryConcurrency,proto3" json:"min_retry_concurrency,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CircuitBreakers_Thresholds_RetryBudget) Reset() { + *m = CircuitBreakers_Thresholds_RetryBudget{} +} +func (m *CircuitBreakers_Thresholds_RetryBudget) String() string { return proto.CompactTextString(m) } +func (*CircuitBreakers_Thresholds_RetryBudget) ProtoMessage() {} +func (*CircuitBreakers_Thresholds_RetryBudget) Descriptor() ([]byte, []int) { + return fileDescriptor_89bc8d4e21efdd79, []int{0, 0, 0} +} + +func (m *CircuitBreakers_Thresholds_RetryBudget) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CircuitBreakers_Thresholds_RetryBudget.Unmarshal(m, b) +} +func (m *CircuitBreakers_Thresholds_RetryBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CircuitBreakers_Thresholds_RetryBudget.Marshal(b, m, deterministic) +} +func (m *CircuitBreakers_Thresholds_RetryBudget) XXX_Merge(src proto.Message) { + xxx_messageInfo_CircuitBreakers_Thresholds_RetryBudget.Merge(m, src) +} +func (m *CircuitBreakers_Thresholds_RetryBudget) XXX_Size() int { + return xxx_messageInfo_CircuitBreakers_Thresholds_RetryBudget.Size(m) +} +func (m *CircuitBreakers_Thresholds_RetryBudget) XXX_DiscardUnknown() { + xxx_messageInfo_CircuitBreakers_Thresholds_RetryBudget.DiscardUnknown(m) +} + +var xxx_messageInfo_CircuitBreakers_Thresholds_RetryBudget proto.InternalMessageInfo + +func (m *CircuitBreakers_Thresholds_RetryBudget) GetBudgetPercent() *_type.Percent { + if m != nil { + return m.BudgetPercent + } + return nil +} + +func (m *CircuitBreakers_Thresholds_RetryBudget) GetMinRetryConcurrency() *wrappers.UInt32Value { + if m != nil { + return m.MinRetryConcurrency + } + return nil +} + func init() { proto.RegisterType((*CircuitBreakers)(nil), "envoy.api.v2.cluster.CircuitBreakers") proto.RegisterType((*CircuitBreakers_Thresholds)(nil), "envoy.api.v2.cluster.CircuitBreakers.Thresholds") + proto.RegisterType((*CircuitBreakers_Thresholds_RetryBudget)(nil), "envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget") } func init() { @@ -208,779 +219,43 @@ func init() { } var fileDescriptor_89bc8d4e21efdd79 = []byte{ - // 447 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0x80, 0xe5, 0x75, 0x6c, 0x93, 0x8b, 0x5a, 0x29, 0x54, 0x28, 0xaa, 0xa6, 0xa8, 0xea, 0x85, - 0x8a, 0x83, 0x83, 0xb2, 0x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- 0xfc, 0xd9, 0xfd, 0xe5, 0x89, 0x9b, 0xbf, 0xc5, 0xe4, 0xf3, 0x69, 0x97, 0xff, 0x71, 0xf4, 0xfc, - 0xb2, 0xc5, 0xde, 0x69, 0xc9, 0xae, 0x23, 0xb6, 0x70, 0xe1, 0xab, 0x0f, 0xcb, 0x93, 0xb6, 0xb1, - 0x8b, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x80, 0x8d, 0x1f, 0x52, 0x03, 0x00, 0x00, + // 605 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x41, 0x6f, 0xd3, 0x3e, + 0x18, 0xc6, 0x95, 0xee, 0xdf, 0xfe, 0x2b, 0x67, 0x74, 0x93, 0x37, 0x58, 0xa8, 0x06, 0xaa, 0x76, + 0xa1, 0xe2, 0xe0, 0xa0, 0xf4, 0x86, 0x40, 0x88, 0x56, 0x93, 0xe0, 0x32, 0x45, 0x01, 0x76, 0x8d, + 0xdc, 0xd4, 0xcb, 0xac, 0x35, 0xb6, 0xb1, 0x9d, 0xd2, 0xdc, 0x10, 0x5f, 0x80, 0x0b, 0x07, 0x24, + 0xbe, 0x01, 0x1f, 0x81, 0x4f, 0x80, 0xc4, 0x89, 0x0f, 0xc1, 0x85, 0x23, 0x47, 0x0e, 0x08, 0xc5, + 0x4e, 0x9a, 0x6d, 0x0c, 0xa9, 0xdc, 0xea, 0x3c, 0xef, 0xef, 0xe9, 0xfb, 0xbc, 0xaf, 0x0d, 0xee, + 0x12, 0xb6, 0xe0, 0x85, 0x8f, 0x05, 0xf5, 0x17, 0x81, 0x9f, 0xcc, 0x73, 0xa5, 0x89, 0xf4, 0x13, + 0x2a, 0x93, 0x9c, 0xea, 0x78, 0x2a, 0x09, 0x3e, 0x23, 0x12, 0x09, 0xc9, 0x35, 0x87, 0xbb, 0xa6, + 0x16, 0x61, 0x41, 0xd1, 0x22,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28, 0x8b, 0xed, 0xa4, 0x12, 0xce, 0x92, 0x5c, 0x4a, 0xc2, 0x92, 0x62, 0xad, 0x2b, 0xb4, + 0x93, 0x51, 0x66, 0x1a, 0x99, 0x34, 0xe0, 0xf8, 0x9d, 0xf3, 0xe3, 0xfd, 0xaf, 0xb7, 0xed, 0x9b, + 0x70, 0xcf, 0xfe, 0x7b, 0xc2, 0xd9, 0x09, 0x4d, 0x57, 0x93, 0x5e, 0x8c, 0x3e, 0xbd, 0xfe, 0xfc, + 0xb5, 0xd3, 0xda, 0x76, 0xc0, 0x01, 0xe5, 0xb6, 0x43, 0x21, 0xf9, 0xb2, 0xb8, 0x72, 0x31, 0xe3, + 0x9d, 0x8b, 0x9b, 0x09, 0xcb, 0x36, 0x42, 0xe7, 0x63, 0xeb, 0xc6, 0xa1, 0xa9, 0x7e, 0x2c, 0x28, + 0x3a, 0x0e, 0xd0, 0xc4, 0x56, 0x1f, 0x3d, 0xfb, 0xfe, 0x37, 0x61, 0xda, 0x31, 0x09, 0x46, 0xbf, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x42, 0x40, 0xb8, 0x2b, 0xdf, 0x04, 0x00, 0x00, } - -func (this *CircuitBreakers) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CircuitBreakers) - if !ok { - that2, ok := that.(CircuitBreakers) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Thresholds) != len(that1.Thresholds) { - return false - } - for i := range this.Thresholds { - if !this.Thresholds[i].Equal(that1.Thresholds[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CircuitBreakers_Thresholds) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CircuitBreakers_Thresholds) - if !ok { - that2, ok := that.(CircuitBreakers_Thresholds) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Priority != that1.Priority { - return false - } - if !this.MaxConnections.Equal(that1.MaxConnections) { - return false - } - if !this.MaxPendingRequests.Equal(that1.MaxPendingRequests) { - return false - } - if !this.MaxRequests.Equal(that1.MaxRequests) { - return false - } - if !this.MaxRetries.Equal(that1.MaxRetries) { - return false - } - if this.TrackRemaining != that1.TrackRemaining { - return false - } - if !this.MaxConnectionPools.Equal(that1.MaxConnectionPools) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *CircuitBreakers) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CircuitBreakers) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Thresholds) > 0 { - for _, msg := range m.Thresholds { - dAtA[i] = 0xa - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CircuitBreakers_Thresholds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CircuitBreakers_Thresholds) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Priority != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(m.Priority)) - } - if m.MaxConnections != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(m.MaxConnections.Size())) - n1, err := m.MaxConnections.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.MaxPendingRequests != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(m.MaxPendingRequests.Size())) - n2, err := m.MaxPendingRequests.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.MaxRequests != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(m.MaxRequests.Size())) - n3, err := m.MaxRequests.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.MaxRetries != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(m.MaxRetries.Size())) - n4, err := m.MaxRetries.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.TrackRemaining { - dAtA[i] = 0x30 - i++ - if m.TrackRemaining { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.MaxConnectionPools != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintCircuitBreaker(dAtA, i, uint64(m.MaxConnectionPools.Size())) - n5, err := m.MaxConnectionPools.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintCircuitBreaker(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *CircuitBreakers) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Thresholds) > 0 { - for _, e := range m.Thresholds { - l = e.Size() - n += 1 + l + sovCircuitBreaker(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CircuitBreakers_Thresholds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Priority != 0 { - n += 1 + sovCircuitBreaker(uint64(m.Priority)) - } - if m.MaxConnections != nil { - l = m.MaxConnections.Size() - n += 1 + l + sovCircuitBreaker(uint64(l)) - } - if m.MaxPendingRequests != nil { - l = m.MaxPendingRequests.Size() - n += 1 + l + sovCircuitBreaker(uint64(l)) - } - if m.MaxRequests != nil { - l = m.MaxRequests.Size() - n += 1 + l + sovCircuitBreaker(uint64(l)) - } - if m.MaxRetries != nil { - l = m.MaxRetries.Size() - n += 1 + l + sovCircuitBreaker(uint64(l)) - } - if m.TrackRemaining { - n += 2 - } - if m.MaxConnectionPools != nil { - l = m.MaxConnectionPools.Size() - n += 1 + l + sovCircuitBreaker(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCircuitBreaker(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCircuitBreaker(x uint64) (n int) { - return sovCircuitBreaker(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CircuitBreakers) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CircuitBreakers: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CircuitBreakers: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Thresholds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCircuitBreaker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCircuitBreaker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Thresholds = append(m.Thresholds, &CircuitBreakers_Thresholds{}) - if err := m.Thresholds[len(m.Thresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCircuitBreaker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCircuitBreaker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCircuitBreaker - } - 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 *CircuitBreakers_Thresholds) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Thresholds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Thresholds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= core.RoutingPriority(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxConnections", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCircuitBreaker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCircuitBreaker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxConnections == nil { - m.MaxConnections = &types.UInt32Value{} - } - if err := m.MaxConnections.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxPendingRequests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCircuitBreaker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCircuitBreaker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxPendingRequests == nil { - m.MaxPendingRequests = &types.UInt32Value{} - } - if err := m.MaxPendingRequests.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRequests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCircuitBreaker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCircuitBreaker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxRequests == nil { - m.MaxRequests = &types.UInt32Value{} - } - if err := m.MaxRequests.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRetries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCircuitBreaker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCircuitBreaker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxRetries == nil { - m.MaxRetries = &types.UInt32Value{} - } - if err := m.MaxRetries.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TrackRemaining", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TrackRemaining = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxConnectionPools", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCircuitBreaker - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCircuitBreaker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxConnectionPools == nil { - m.MaxConnectionPools = &types.UInt32Value{} - } - if err := m.MaxConnectionPools.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCircuitBreaker(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCircuitBreaker - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCircuitBreaker - } - 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 skipCircuitBreaker(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCircuitBreaker - } - 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, ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCircuitBreaker - } - 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, ErrInvalidLengthCircuitBreaker - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthCircuitBreaker - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCircuitBreaker - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCircuitBreaker(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthCircuitBreaker - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCircuitBreaker = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCircuitBreaker = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go index fed18c3fac..a03814bbd8 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/cluster/circuit_breaker.proto -package cluster +package envoy_api_v2_cluster import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" ) @@ -32,11 +32,14 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} _ = core.RoutingPriority(0) ) +// define the regex for a UUID once up-front +var _circuit_breaker_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on CircuitBreakers with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -48,17 +51,12 @@ func (m *CircuitBreakers) Validate() error { for idx, item := range m.GetThresholds() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CircuitBreakersValidationError{ - field: fmt.Sprintf("Thresholds[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakersValidationError{ + field: fmt.Sprintf("Thresholds[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -130,81 +128,71 @@ func (m *CircuitBreakers_Thresholds) Validate() error { return nil } - // no validation rules for Priority + if _, ok := core.RoutingPriority_name[int32(m.GetPriority())]; !ok { + return CircuitBreakers_ThresholdsValidationError{ + field: "Priority", + reason: "value must be one of the defined enum values", + } + } - { - tmp := m.GetMaxConnections() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnections", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMaxConnections()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnections", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetMaxPendingRequests() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxPendingRequests", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_ThresholdsValidationError{ + field: "MaxPendingRequests", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetMaxRequests() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxRequests", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMaxRequests()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_ThresholdsValidationError{ + field: "MaxRequests", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetMaxRetries() + if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_ThresholdsValidationError{ + field: "MaxRetries", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxRetries", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRetryBudget()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_ThresholdsValidationError{ + field: "RetryBudget", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for TrackRemaining - { - tmp := m.GetMaxConnectionPools() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnectionPools", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMaxConnectionPools()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_ThresholdsValidationError{ + field: "MaxConnectionPools", + reason: "embedded message failed validation", + cause: err, } } } @@ -267,3 +255,91 @@ var _ interface { Cause() error ErrorName() string } = CircuitBreakers_ThresholdsValidationError{} + +// Validate checks the field values on CircuitBreakers_Thresholds_RetryBudget +// with the rules defined in the proto definition for this message. If any +// rules are violated, an error is returned. +func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetBudgetPercent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "BudgetPercent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetMinRetryConcurrency()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CircuitBreakers_Thresholds_RetryBudgetValidationError{ + field: "MinRetryConcurrency", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// CircuitBreakers_Thresholds_RetryBudgetValidationError is the validation +// error returned by CircuitBreakers_Thresholds_RetryBudget.Validate if the +// designated constraints aren't met. +type CircuitBreakers_Thresholds_RetryBudgetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) ErrorName() string { + return "CircuitBreakers_Thresholds_RetryBudgetValidationError" +} + +// Error satisfies the builtin error interface +func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCircuitBreakers_Thresholds_RetryBudget.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CircuitBreakers_Thresholds_RetryBudgetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CircuitBreakers_Thresholds_RetryBudgetValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go new file mode 100644 index 0000000000..b58d6bd0be --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/cluster/filter.proto + +package envoy_api_v2_cluster + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type Filter struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Filter) Reset() { *m = Filter{} } +func (m *Filter) String() string { return proto.CompactTextString(m) } +func (*Filter) ProtoMessage() {} +func (*Filter) Descriptor() ([]byte, []int) { + return fileDescriptor_8ce34c55b74b9243, []int{0} +} + +func (m *Filter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Filter.Unmarshal(m, b) +} +func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Filter.Marshal(b, m, deterministic) +} +func (m *Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Filter.Merge(m, src) +} +func (m *Filter) XXX_Size() int { + return xxx_messageInfo_Filter.Size(m) +} +func (m *Filter) XXX_DiscardUnknown() { + xxx_messageInfo_Filter.DiscardUnknown(m) +} + +var xxx_messageInfo_Filter proto.InternalMessageInfo + +func (m *Filter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Filter) GetTypedConfig() *any.Any { + if m != nil { + return m.TypedConfig + } + return nil +} + +func init() { + proto.RegisterType((*Filter)(nil), "envoy.api.v2.cluster.Filter") +} + +func init() { proto.RegisterFile("envoy/api/v2/cluster/filter.proto", fileDescriptor_8ce34c55b74b9243) } + +var fileDescriptor_8ce34c55b74b9243 = []byte{ + // 299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x3d, 0x4e, 0xc3, 0x30, + 0x14, 0x80, 0xe5, 0xa8, 0x14, 0x91, 0x32, 0xa0, 0xa8, 0xa2, 0x3f, 0x08, 0x14, 0x3a, 0x75, 0x7a, + 0x96, 0xd2, 0x81, 0xb9, 0xa9, 0x60, 0x44, 0x55, 0x91, 0x18, 0x41, 0xaf, 0x8d, 0x13, 0x59, 0x4a, + 0x6d, 0xcb, 0x71, 0x22, 0xb2, 0x71, 0x00, 0x24, 0x56, 0xce, 0xc0, 0x11, 0x38, 0x01, 0x2b, 0xd7, + 0x60, 0x64, 0x64, 0x40, 0x08, 0x3b, 0x99, 0x80, 0xcd, 0xf2, 0xf7, 0x3d, 0xf9, 0x7b, 0xf6, 0x4f, + 0x99, 0xa8, 0x64, 0x4d, 0x51, 0x71, 0x5a, 0x45, 0x74, 0x93, 0x97, 0x85, 0x61, 0x9a, 0xa6, 0x3c, + 0x37, 0x4c, 0x83, 0xd2, 0xd2, 0xc8, 0xa0, 0x6f, 0x15, 0x40, 0xc5, 0xa1, 0x8a, 0xa0, 0x51, 0xc6, + 0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x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go new file mode 100644 index 0000000000..dc0d401791 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/cluster/filter.proto + +package envoy_api_v2_cluster + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _filter_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on Filter with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Filter) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return FilterValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// FilterValidationError is the validation error returned by Filter.Validate if +// the designated constraints aren't met. +type FilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterValidationError) ErrorName() string { return "FilterValidationError" } + +// Error satisfies the builtin error interface +func (e FilterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go index aa55550bfe..e2eac8b770 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go @@ -1,18 +1,16 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/cluster/outlier_detection.proto -package cluster +package envoy_api_v2_cluster import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,63 +22,32 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// See the :ref:`architecture overview ` for -// more information on outlier detection. type OutlierDetection struct { - // The number of consecutive 5xx responses before a consecutive 5xx ejection - // occurs. Defaults to 5. - Consecutive_5Xx *types.UInt32Value `protobuf:"bytes,1,opt,name=consecutive_5xx,json=consecutive5xx,proto3" json:"consecutive_5xx,omitempty"` - // The time interval between ejection analysis sweeps. This can result in - // both new ejections as well as hosts being returned to service. Defaults - // to 10000ms or 10s. - Interval *types.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - // 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. - // Defaults to 30000ms or 30s. - BaseEjectionTime *types.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` - // 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 *types.UInt32Value `protobuf:"bytes,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` - // 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. Defaults to 100. - EnforcingConsecutive_5Xx *types.UInt32Value `protobuf:"bytes,5,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics. This setting can be used to - // disable ejection or to ramp it up slowly. Defaults to 100. - EnforcingSuccessRate *types.UInt32Value `protobuf:"bytes,6,opt,name=enforcing_success_rate,json=enforcingSuccessRate,proto3" json:"enforcing_success_rate,omitempty"` - // The number of hosts in a cluster that must have enough request volume to - // detect success rate outliers. If the number of hosts is less than this - // setting, outlier detection via success rate statistics is not performed - // for any host in the cluster. Defaults to 5. - SuccessRateMinimumHosts *types.UInt32Value `protobuf:"bytes,7,opt,name=success_rate_minimum_hosts,json=successRateMinimumHosts,proto3" json:"success_rate_minimum_hosts,omitempty"` - // The minimum number of total requests that must be collected in one - // interval (as defined by the interval duration above) to include this host - // in success rate based outlier detection. If the volume is lower than this - // setting, outlier detection via success rate statistics is not performed - // for that host. Defaults to 100. - SuccessRateRequestVolume *types.UInt32Value `protobuf:"bytes,8,opt,name=success_rate_request_volume,json=successRateRequestVolume,proto3" json:"success_rate_request_volume,omitempty"` - // This factor is used to determine the ejection threshold for success rate - // outlier ejection. The ejection threshold is the difference between the - // mean success rate, and the product of this factor and the standard - // deviation of the mean success rate: mean - (stdev * - // success_rate_stdev_factor). This factor is divided by a thousand to get a - // double. That is, if the desired factor is 1.9, the runtime value should - // be 1900. Defaults to 1900. - SuccessRateStdevFactor *types.UInt32Value `protobuf:"bytes,9,opt,name=success_rate_stdev_factor,json=successRateStdevFactor,proto3" json:"success_rate_stdev_factor,omitempty"` - // The number of consecutive gateway failures (502, 503, 504 status or - // connection errors that are mapped to one of those status codes) before a - // consecutive gateway failure ejection occurs. Defaults to 5. - ConsecutiveGatewayFailure *types.UInt32Value `protobuf:"bytes,10,opt,name=consecutive_gateway_failure,json=consecutiveGatewayFailure,proto3" json:"consecutive_gateway_failure,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive gateway failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 0. - EnforcingConsecutiveGatewayFailure *types.UInt32Value `protobuf:"bytes,11,opt,name=enforcing_consecutive_gateway_failure,json=enforcingConsecutiveGatewayFailure,proto3" json:"enforcing_consecutive_gateway_failure,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Consecutive_5Xx *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=consecutive_5xx,json=consecutive5xx,proto3" json:"consecutive_5xx,omitempty"` + Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` + BaseEjectionTime *duration.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` + MaxEjectionPercent *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` + EnforcingConsecutive_5Xx *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` + EnforcingSuccessRate *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=enforcing_success_rate,json=enforcingSuccessRate,proto3" json:"enforcing_success_rate,omitempty"` + SuccessRateMinimumHosts *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=success_rate_minimum_hosts,json=successRateMinimumHosts,proto3" json:"success_rate_minimum_hosts,omitempty"` + SuccessRateRequestVolume *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=success_rate_request_volume,json=successRateRequestVolume,proto3" json:"success_rate_request_volume,omitempty"` + SuccessRateStdevFactor *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=success_rate_stdev_factor,json=successRateStdevFactor,proto3" json:"success_rate_stdev_factor,omitempty"` + ConsecutiveGatewayFailure *wrappers.UInt32Value `protobuf:"bytes,10,opt,name=consecutive_gateway_failure,json=consecutiveGatewayFailure,proto3" json:"consecutive_gateway_failure,omitempty"` + EnforcingConsecutiveGatewayFailure *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=enforcing_consecutive_gateway_failure,json=enforcingConsecutiveGatewayFailure,proto3" json:"enforcing_consecutive_gateway_failure,omitempty"` + SplitExternalLocalOriginErrors bool `protobuf:"varint,12,opt,name=split_external_local_origin_errors,json=splitExternalLocalOriginErrors,proto3" json:"split_external_local_origin_errors,omitempty"` + ConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=consecutive_local_origin_failure,json=consecutiveLocalOriginFailure,proto3" json:"consecutive_local_origin_failure,omitempty"` + EnforcingConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,14,opt,name=enforcing_consecutive_local_origin_failure,json=enforcingConsecutiveLocalOriginFailure,proto3" json:"enforcing_consecutive_local_origin_failure,omitempty"` + EnforcingLocalOriginSuccessRate *wrappers.UInt32Value `protobuf:"bytes,15,opt,name=enforcing_local_origin_success_rate,json=enforcingLocalOriginSuccessRate,proto3" json:"enforcing_local_origin_success_rate,omitempty"` + FailurePercentageThreshold *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=failure_percentage_threshold,json=failurePercentageThreshold,proto3" json:"failure_percentage_threshold,omitempty"` + EnforcingFailurePercentage *wrappers.UInt32Value `protobuf:"bytes,17,opt,name=enforcing_failure_percentage,json=enforcingFailurePercentage,proto3" json:"enforcing_failure_percentage,omitempty"` + EnforcingFailurePercentageLocalOrigin *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=enforcing_failure_percentage_local_origin,json=enforcingFailurePercentageLocalOrigin,proto3" json:"enforcing_failure_percentage_local_origin,omitempty"` + FailurePercentageMinimumHosts *wrappers.UInt32Value `protobuf:"bytes,19,opt,name=failure_percentage_minimum_hosts,json=failurePercentageMinimumHosts,proto3" json:"failure_percentage_minimum_hosts,omitempty"` + FailurePercentageRequestVolume *wrappers.UInt32Value `protobuf:"bytes,20,opt,name=failure_percentage_request_volume,json=failurePercentageRequestVolume,proto3" json:"failure_percentage_request_volume,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *OutlierDetection) Reset() { *m = OutlierDetection{} } @@ -89,26 +56,18 @@ func (*OutlierDetection) ProtoMessage() {} func (*OutlierDetection) Descriptor() ([]byte, []int) { return fileDescriptor_56cd87362a3f00c9, []int{0} } + func (m *OutlierDetection) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_OutlierDetection.Unmarshal(m, b) } func (m *OutlierDetection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutlierDetection.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_OutlierDetection.Marshal(b, m, deterministic) } func (m *OutlierDetection) XXX_Merge(src proto.Message) { xxx_messageInfo_OutlierDetection.Merge(m, src) } func (m *OutlierDetection) XXX_Size() int { - return m.Size() + return xxx_messageInfo_OutlierDetection.Size(m) } func (m *OutlierDetection) XXX_DiscardUnknown() { xxx_messageInfo_OutlierDetection.DiscardUnknown(m) @@ -116,83 +75,146 @@ func (m *OutlierDetection) XXX_DiscardUnknown() { var xxx_messageInfo_OutlierDetection proto.InternalMessageInfo -func (m *OutlierDetection) GetConsecutive_5Xx() *types.UInt32Value { +func (m *OutlierDetection) GetConsecutive_5Xx() *wrappers.UInt32Value { if m != nil { return m.Consecutive_5Xx } return nil } -func (m *OutlierDetection) GetInterval() *types.Duration { +func (m *OutlierDetection) GetInterval() *duration.Duration { if m != nil { return m.Interval } return nil } -func (m *OutlierDetection) GetBaseEjectionTime() *types.Duration { +func (m *OutlierDetection) GetBaseEjectionTime() *duration.Duration { if m != nil { return m.BaseEjectionTime } return nil } -func (m *OutlierDetection) GetMaxEjectionPercent() *types.UInt32Value { +func (m *OutlierDetection) GetMaxEjectionPercent() *wrappers.UInt32Value { if m != nil { return m.MaxEjectionPercent } return nil } -func (m *OutlierDetection) GetEnforcingConsecutive_5Xx() *types.UInt32Value { +func (m *OutlierDetection) GetEnforcingConsecutive_5Xx() *wrappers.UInt32Value { if m != nil { return m.EnforcingConsecutive_5Xx } return nil } -func (m *OutlierDetection) GetEnforcingSuccessRate() *types.UInt32Value { +func (m *OutlierDetection) GetEnforcingSuccessRate() *wrappers.UInt32Value { if m != nil { return m.EnforcingSuccessRate } return nil } -func (m *OutlierDetection) GetSuccessRateMinimumHosts() *types.UInt32Value { +func (m *OutlierDetection) GetSuccessRateMinimumHosts() *wrappers.UInt32Value { if m != nil { return m.SuccessRateMinimumHosts } return nil } -func (m *OutlierDetection) GetSuccessRateRequestVolume() *types.UInt32Value { +func (m *OutlierDetection) GetSuccessRateRequestVolume() *wrappers.UInt32Value { if m != nil { return m.SuccessRateRequestVolume } return nil } -func (m *OutlierDetection) GetSuccessRateStdevFactor() *types.UInt32Value { +func (m *OutlierDetection) GetSuccessRateStdevFactor() *wrappers.UInt32Value { if m != nil { return m.SuccessRateStdevFactor } return nil } -func (m *OutlierDetection) GetConsecutiveGatewayFailure() *types.UInt32Value { +func (m *OutlierDetection) GetConsecutiveGatewayFailure() *wrappers.UInt32Value { if m != nil { return m.ConsecutiveGatewayFailure } return nil } -func (m *OutlierDetection) GetEnforcingConsecutiveGatewayFailure() *types.UInt32Value { +func (m *OutlierDetection) GetEnforcingConsecutiveGatewayFailure() *wrappers.UInt32Value { if m != nil { return m.EnforcingConsecutiveGatewayFailure } return nil } +func (m *OutlierDetection) GetSplitExternalLocalOriginErrors() bool { + if m != nil { + return m.SplitExternalLocalOriginErrors + } + return false +} + +func (m *OutlierDetection) GetConsecutiveLocalOriginFailure() *wrappers.UInt32Value { + if m != nil { + return m.ConsecutiveLocalOriginFailure + } + return nil +} + +func (m *OutlierDetection) GetEnforcingConsecutiveLocalOriginFailure() *wrappers.UInt32Value { + if m != nil { + return m.EnforcingConsecutiveLocalOriginFailure + } + return nil +} + +func (m *OutlierDetection) GetEnforcingLocalOriginSuccessRate() *wrappers.UInt32Value { + if m != nil { + return m.EnforcingLocalOriginSuccessRate + } + return nil +} + +func (m *OutlierDetection) GetFailurePercentageThreshold() *wrappers.UInt32Value { + if m != nil { + return m.FailurePercentageThreshold + } + return nil +} + +func (m *OutlierDetection) GetEnforcingFailurePercentage() *wrappers.UInt32Value { + if m != nil { + return m.EnforcingFailurePercentage + } + return nil +} + +func (m *OutlierDetection) GetEnforcingFailurePercentageLocalOrigin() *wrappers.UInt32Value { + if m != nil { + return m.EnforcingFailurePercentageLocalOrigin + } + return nil +} + +func (m *OutlierDetection) GetFailurePercentageMinimumHosts() *wrappers.UInt32Value { + if m != nil { + return m.FailurePercentageMinimumHosts + } + return nil +} + +func (m *OutlierDetection) GetFailurePercentageRequestVolume() *wrappers.UInt32Value { + if m != nil { + return m.FailurePercentageRequestVolume + } + return nil +} + func init() { proto.RegisterType((*OutlierDetection)(nil), "envoy.api.v2.cluster.OutlierDetection") } @@ -202,867 +224,55 @@ func init() { } var fileDescriptor_56cd87362a3f00c9 = []byte{ - // 557 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6a, 0x13, 0x41, - 0x14, 0xc7, 0xdd, 0xf4, 0x7b, 0x0a, 0x5a, 0x86, 0xd8, 0x6e, 0x5a, 0x09, 0x52, 0x10, 0xa4, 0xc8, - 0x2e, 0xa4, 0xf4, 0x01, 0x9a, 0x36, 0x55, 0x2f, 0xd4, 0x90, 0x68, 0x44, 0x54, 0x86, 0xc9, 0xe6, - 0x64, 0x1d, 0xd9, 0xdd, 0x59, 0xe7, 0x63, 0xbb, 0xf1, 0x89, 0xa4, 0x8f, 0xe0, 0x95, 0x97, 0x5e, - 0xfa, 0x08, 0x92, 0x3b, 0x9f, 0xc1, 0x1b, 0xd9, 0x9d, 0x7c, 0x6c, 0xd2, 0x80, 0xc9, 0xdd, 0xb0, - 0x73, 0x7e, 0xbf, 0xff, 0xd9, 0x99, 0xe1, 0xa0, 0x27, 0x10, 0x25, 0x7c, 0xe0, 0xd2, 0x98, 0xb9, - 0x49, 0xcd, 0xf5, 0x02, 0x2d, 0x15, 0x08, 0x97, 0x6b, 0x15, 0x30, 0x10, 0xa4, 0x07, 0x0a, 0x3c, - 0xc5, 0x78, 0xe4, 0xc4, 0x82, 0x2b, 0x8e, 0xcb, 0x79, 0xb5, 0x43, 0x63, 0xe6, 0x24, 0x35, 0x67, - 0x54, 0x7d, 0x58, 0xf5, 0x39, 0xf7, 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0x58, 0xb5, 0xd0, 0x31, 0xe3, 0x4e, 0x3e, 0x97, 0x62, 0xc1, 0xd3, 0x81, 0xb3, 0x68, - 0x44, 0xd5, 0xef, 0xcf, 0x0f, 0x8c, 0x66, 0xd6, 0x4a, 0xd3, 0xba, 0x29, 0xed, 0x37, 0xf2, 0xfa, - 0xf3, 0x98, 0x39, 0x9d, 0x9a, 0x73, 0x61, 0xea, 0x5f, 0xb6, 0xbb, 0x9b, 0x79, 0xb3, 0xa7, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xde, 0xe2, 0x08, 0x28, 0x21, 0x05, 0x00, 0x00, + // 796 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0x4f, 0x6f, 0xe3, 0x44, + 0x18, 0xc6, 0x71, 0xd8, 0x76, 0xc3, 0x2c, 0x6c, 0xc3, 0x10, 0x1a, 0xa7, 0xbb, 0x5b, 0x4a, 0xd0, + 0xa2, 0xa5, 0x42, 0xb6, 0x94, 0xaa, 0x67, 0x44, 0xda, 0x94, 0x3f, 0x02, 0x1a, 0xd2, 0xd2, 0x0a, + 0x15, 0x69, 0x34, 0x75, 0xde, 0xb8, 0x83, 0x6c, 0x8f, 0x99, 0x19, 0xbb, 0xee, 0x09, 0xf8, 0x04, + 0xdc, 0x10, 0x9f, 0xa1, 0x1f, 0x81, 0x03, 0x67, 0xae, 0x7c, 0x0d, 0x8e, 0x1c, 0x7b, 0x40, 0xc8, + 0x76, 0x9c, 0xd8, 0x89, 0xcb, 0xda, 0xb7, 0x48, 0xef, 0xf3, 0xfc, 0x9e, 0xf7, 0x7d, 0x3d, 0x19, + 0x0d, 0xfa, 0x10, 0xbc, 0x90, 0xdf, 0x98, 0xd4, 0x67, 0x66, 0xd8, 0x37, 0x2d, 0x27, 0x90, 0x0a, + 0x84, 0xc9, 0x03, 0xe5, 0x30, 0x10, 0x64, 0x02, 0x0a, 0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x9f, 0x9a, 0xdb, 0x6e, + 0x7c, 0x64, 0x4b, 0x62, 0x8b, 0xb7, 0xdd, 0x5b, 0x55, 0x8e, 0xec, 0xca, 0x36, 0x0b, 0x77, 0x9e, + 0x8d, 0xde, 0x2d, 0x89, 0x59, 0xba, 0xf9, 0xda, 0x15, 0x72, 0xb6, 0x57, 0x72, 0x0a, 0xf7, 0xdf, + 0xe0, 0x57, 0xed, 0x9f, 0xdf, 0xfe, 0xfd, 0x65, 0xad, 0x8b, 0x3b, 0xe9, 0xbb, 0xc3, 0xe2, 0xde, + 0x94, 0xd9, 0xd9, 0xbb, 0xc3, 0x08, 0xf7, 0x7e, 0xff, 0xe9, 0xcf, 0xbf, 0xd6, 0x1b, 0x2d, 0x0d, + 0xf5, 0x18, 0x37, 0x12, 0x8d, 0x2f, 0x78, 0x74, 0x63, 0x94, 0x3d, 0x53, 0x06, 0x6f, 0x2f, 0xbf, + 0x05, 0x46, 0x71, 0x4f, 0x23, 0xed, 0xb6, 0xb1, 0x39, 0x4c, 0xf4, 0x1f, 0xfb, 0xcc, 0x38, 0xeb, + 0x1b, 0x07, 0xa9, 0xfe, 0xab, 0x93, 0xbf, 0xef, 0x2b, 0x5c, 0xae, 0x27, 0xe3, 0xec, 0xfd, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x0d, 0xc1, 0x8b, 0x5f, 0x3e, 0x09, 0x00, 0x00, } - -func (this *OutlierDetection) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OutlierDetection) - if !ok { - that2, ok := that.(OutlierDetection) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Consecutive_5Xx.Equal(that1.Consecutive_5Xx) { - return false - } - if !this.Interval.Equal(that1.Interval) { - return false - } - if !this.BaseEjectionTime.Equal(that1.BaseEjectionTime) { - return false - } - if !this.MaxEjectionPercent.Equal(that1.MaxEjectionPercent) { - return false - } - if !this.EnforcingConsecutive_5Xx.Equal(that1.EnforcingConsecutive_5Xx) { - return false - } - if !this.EnforcingSuccessRate.Equal(that1.EnforcingSuccessRate) { - return false - } - if !this.SuccessRateMinimumHosts.Equal(that1.SuccessRateMinimumHosts) { - return false - } - if !this.SuccessRateRequestVolume.Equal(that1.SuccessRateRequestVolume) { - return false - } - if !this.SuccessRateStdevFactor.Equal(that1.SuccessRateStdevFactor) { - return false - } - if !this.ConsecutiveGatewayFailure.Equal(that1.ConsecutiveGatewayFailure) { - return false - } - if !this.EnforcingConsecutiveGatewayFailure.Equal(that1.EnforcingConsecutiveGatewayFailure) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *OutlierDetection) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OutlierDetection) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Consecutive_5Xx != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.Consecutive_5Xx.Size())) - n1, err := m.Consecutive_5Xx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Interval != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.Interval.Size())) - n2, err := m.Interval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.BaseEjectionTime != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.BaseEjectionTime.Size())) - n3, err := m.BaseEjectionTime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.MaxEjectionPercent != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.MaxEjectionPercent.Size())) - n4, err := m.MaxEjectionPercent.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.EnforcingConsecutive_5Xx != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.EnforcingConsecutive_5Xx.Size())) - n5, err := m.EnforcingConsecutive_5Xx.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.EnforcingSuccessRate != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.EnforcingSuccessRate.Size())) - n6, err := m.EnforcingSuccessRate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.SuccessRateMinimumHosts != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.SuccessRateMinimumHosts.Size())) - n7, err := m.SuccessRateMinimumHosts.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.SuccessRateRequestVolume != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.SuccessRateRequestVolume.Size())) - n8, err := m.SuccessRateRequestVolume.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.SuccessRateStdevFactor != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.SuccessRateStdevFactor.Size())) - n9, err := m.SuccessRateStdevFactor.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.ConsecutiveGatewayFailure != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.ConsecutiveGatewayFailure.Size())) - n10, err := m.ConsecutiveGatewayFailure.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.EnforcingConsecutiveGatewayFailure != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintOutlierDetection(dAtA, i, uint64(m.EnforcingConsecutiveGatewayFailure.Size())) - n11, err := m.EnforcingConsecutiveGatewayFailure.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintOutlierDetection(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *OutlierDetection) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Consecutive_5Xx != nil { - l = m.Consecutive_5Xx.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.Interval != nil { - l = m.Interval.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.BaseEjectionTime != nil { - l = m.BaseEjectionTime.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.MaxEjectionPercent != nil { - l = m.MaxEjectionPercent.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.EnforcingConsecutive_5Xx != nil { - l = m.EnforcingConsecutive_5Xx.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.EnforcingSuccessRate != nil { - l = m.EnforcingSuccessRate.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.SuccessRateMinimumHosts != nil { - l = m.SuccessRateMinimumHosts.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.SuccessRateRequestVolume != nil { - l = m.SuccessRateRequestVolume.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.SuccessRateStdevFactor != nil { - l = m.SuccessRateStdevFactor.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.ConsecutiveGatewayFailure != nil { - l = m.ConsecutiveGatewayFailure.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.EnforcingConsecutiveGatewayFailure != nil { - l = m.EnforcingConsecutiveGatewayFailure.Size() - n += 1 + l + sovOutlierDetection(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovOutlierDetection(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozOutlierDetection(x uint64) (n int) { - return sovOutlierDetection(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *OutlierDetection) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OutlierDetection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutlierDetection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Consecutive_5Xx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Consecutive_5Xx == nil { - m.Consecutive_5Xx = &types.UInt32Value{} - } - if err := m.Consecutive_5Xx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Interval == nil { - m.Interval = &types.Duration{} - } - if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseEjectionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseEjectionTime == nil { - m.BaseEjectionTime = &types.Duration{} - } - if err := m.BaseEjectionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEjectionPercent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxEjectionPercent == nil { - m.MaxEjectionPercent = &types.UInt32Value{} - } - if err := m.MaxEjectionPercent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnforcingConsecutive_5Xx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnforcingConsecutive_5Xx == nil { - m.EnforcingConsecutive_5Xx = &types.UInt32Value{} - } - if err := m.EnforcingConsecutive_5Xx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnforcingSuccessRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnforcingSuccessRate == nil { - m.EnforcingSuccessRate = &types.UInt32Value{} - } - if err := m.EnforcingSuccessRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessRateMinimumHosts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SuccessRateMinimumHosts == nil { - m.SuccessRateMinimumHosts = &types.UInt32Value{} - } - if err := m.SuccessRateMinimumHosts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessRateRequestVolume", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SuccessRateRequestVolume == nil { - m.SuccessRateRequestVolume = &types.UInt32Value{} - } - if err := m.SuccessRateRequestVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessRateStdevFactor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SuccessRateStdevFactor == nil { - m.SuccessRateStdevFactor = &types.UInt32Value{} - } - if err := m.SuccessRateStdevFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveGatewayFailure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsecutiveGatewayFailure == nil { - m.ConsecutiveGatewayFailure = &types.UInt32Value{} - } - if err := m.ConsecutiveGatewayFailure.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnforcingConsecutiveGatewayFailure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOutlierDetection - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOutlierDetection - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnforcingConsecutiveGatewayFailure == nil { - m.EnforcingConsecutiveGatewayFailure = &types.UInt32Value{} - } - if err := m.EnforcingConsecutiveGatewayFailure.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOutlierDetection(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOutlierDetection - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOutlierDetection - } - 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 skipOutlierDetection(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOutlierDetection - } - 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, ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOutlierDetection - } - 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, ErrInvalidLengthOutlierDetection - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthOutlierDetection - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOutlierDetection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOutlierDetection(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthOutlierDetection - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthOutlierDetection = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOutlierDetection = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go index 6bb1e37fb0..df662ac6bc 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/cluster/outlier_detection.proto -package cluster +package envoy_api_v2_cluster import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _outlier_detection_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on OutlierDetection with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -41,23 +44,18 @@ func (m *OutlierDetection) Validate() error { return nil } - { - tmp := m.GetConsecutive_5Xx() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "Consecutive_5Xx", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConsecutive_5Xx()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "Consecutive_5Xx", + reason: "embedded message failed validation", + cause: err, } } } if d := m.GetInterval(); d != nil { - dur, err := types.DurationFromProto(d) + dur, err := ptypes.Duration(d) if err != nil { return OutlierDetectionValidationError{ field: "Interval", @@ -78,7 +76,7 @@ func (m *OutlierDetection) Validate() error { } if d := m.GetBaseEjectionTime(); d != nil { - dur, err := types.DurationFromProto(d) + dur, err := ptypes.Duration(d) if err != nil { return OutlierDetectionValidationError{ field: "BaseEjectionTime", @@ -131,62 +129,42 @@ func (m *OutlierDetection) Validate() error { } - { - tmp := m.GetSuccessRateMinimumHosts() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "SuccessRateMinimumHosts", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSuccessRateMinimumHosts()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "SuccessRateMinimumHosts", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetSuccessRateRequestVolume() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "SuccessRateRequestVolume", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSuccessRateRequestVolume()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "SuccessRateRequestVolume", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetSuccessRateStdevFactor() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "SuccessRateStdevFactor", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSuccessRateStdevFactor()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "SuccessRateStdevFactor", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetConsecutiveGatewayFailure() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "ConsecutiveGatewayFailure", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConsecutiveGatewayFailure()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "ConsecutiveGatewayFailure", + reason: "embedded message failed validation", + cause: err, } } } @@ -202,6 +180,93 @@ func (m *OutlierDetection) Validate() error { } + // no validation rules for SplitExternalLocalOriginErrors + + if v, ok := interface{}(m.GetConsecutiveLocalOriginFailure()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "ConsecutiveLocalOriginFailure", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetEnforcingConsecutiveLocalOriginFailure(); wrapper != nil { + + if wrapper.GetValue() > 100 { + return OutlierDetectionValidationError{ + field: "EnforcingConsecutiveLocalOriginFailure", + reason: "value must be less than or equal to 100", + } + } + + } + + if wrapper := m.GetEnforcingLocalOriginSuccessRate(); wrapper != nil { + + if wrapper.GetValue() > 100 { + return OutlierDetectionValidationError{ + field: "EnforcingLocalOriginSuccessRate", + reason: "value must be less than or equal to 100", + } + } + + } + + if wrapper := m.GetFailurePercentageThreshold(); wrapper != nil { + + if wrapper.GetValue() > 100 { + return OutlierDetectionValidationError{ + field: "FailurePercentageThreshold", + reason: "value must be less than or equal to 100", + } + } + + } + + if wrapper := m.GetEnforcingFailurePercentage(); wrapper != nil { + + if wrapper.GetValue() > 100 { + return OutlierDetectionValidationError{ + field: "EnforcingFailurePercentage", + reason: "value must be less than or equal to 100", + } + } + + } + + if wrapper := m.GetEnforcingFailurePercentageLocalOrigin(); wrapper != nil { + + if wrapper.GetValue() > 100 { + return OutlierDetectionValidationError{ + field: "EnforcingFailurePercentageLocalOrigin", + reason: "value must be less than or equal to 100", + } + } + + } + + if v, ok := interface{}(m.GetFailurePercentageMinimumHosts()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "FailurePercentageMinimumHosts", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetFailurePercentageRequestVolume()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionValidationError{ + field: "FailurePercentageRequestVolume", + reason: "embedded message failed validation", + cause: err, + } + } + } + return nil } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.go index 3a9cd3aaa7..6ef9fb13c6 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.go @@ -1,18 +1,15 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/address.proto -package core +package envoy_api_v2_core import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,14 +21,13 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type SocketAddress_Protocol int32 const ( - TCP SocketAddress_Protocol = 0 - // [#not-implemented-hide:] - UDP SocketAddress_Protocol = 1 + SocketAddress_TCP SocketAddress_Protocol = 0 + SocketAddress_UDP SocketAddress_Protocol = 1 ) var SocketAddress_Protocol_name = map[int32]string{ @@ -53,11 +49,8 @@ func (SocketAddress_Protocol) EnumDescriptor() ([]byte, []int) { } type Pipe struct { - // 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"` + Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -69,26 +62,18 @@ func (*Pipe) ProtoMessage() {} func (*Pipe) Descriptor() ([]byte, []int) { return fileDescriptor_6906417f87bcce55, []int{0} } + func (m *Pipe) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Pipe.Unmarshal(m, b) } func (m *Pipe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Pipe.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Pipe.Marshal(b, m, deterministic) } func (m *Pipe) XXX_Merge(src proto.Message) { xxx_messageInfo_Pipe.Merge(m, src) } func (m *Pipe) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Pipe.Size(m) } func (m *Pipe) XXX_DiscardUnknown() { xxx_messageInfo_Pipe.DiscardUnknown(m) @@ -103,37 +88,25 @@ func (m *Pipe) GetPath() string { return "" } +func (m *Pipe) GetMode() uint32 { + if m != nil { + return m.Mode + } + return 0 +} + type SocketAddress struct { Protocol SocketAddress_Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=envoy.api.v2.core.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"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Types that are valid to be assigned to PortSpecifier: // *SocketAddress_PortValue // *SocketAddress_NamedPort - PortSpecifier isSocketAddress_PortSpecifier `protobuf_oneof:"port_specifier"` - // The name of the resolver. This must have been registered with Envoy. If this is - // empty, a context dependent default applies. If address is a hostname this - // should be set for resolution other than DNS. If the address is a concrete - // IP address, no resolution will occur. - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + PortSpecifier isSocketAddress_PortSpecifier `protobuf_oneof:"port_specifier"` + ResolverName string `protobuf:"bytes,5,opt,name=resolver_name,json=resolverName,proto3" json:"resolver_name,omitempty"` + Ipv4Compat bool `protobuf:"varint,6,opt,name=ipv4_compat,json=ipv4Compat,proto3" json:"ipv4_compat,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SocketAddress) Reset() { *m = SocketAddress{} } @@ -142,26 +115,18 @@ func (*SocketAddress) ProtoMessage() {} func (*SocketAddress) Descriptor() ([]byte, []int) { return fileDescriptor_6906417f87bcce55, []int{1} } + func (m *SocketAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_SocketAddress.Unmarshal(m, b) } func (m *SocketAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SocketAddress.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_SocketAddress.Marshal(b, m, deterministic) } func (m *SocketAddress) XXX_Merge(src proto.Message) { xxx_messageInfo_SocketAddress.Merge(m, src) } func (m *SocketAddress) XXX_Size() int { - return m.Size() + return xxx_messageInfo_SocketAddress.Size(m) } func (m *SocketAddress) XXX_DiscardUnknown() { xxx_messageInfo_SocketAddress.DiscardUnknown(m) @@ -169,35 +134,11 @@ func (m *SocketAddress) XXX_DiscardUnknown() { var xxx_messageInfo_SocketAddress proto.InternalMessageInfo -type isSocketAddress_PortSpecifier interface { - isSocketAddress_PortSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type SocketAddress_PortValue struct { - PortValue uint32 `protobuf:"varint,3,opt,name=port_value,json=portValue,proto3,oneof"` -} -type SocketAddress_NamedPort struct { - NamedPort string `protobuf:"bytes,4,opt,name=named_port,json=namedPort,proto3,oneof"` -} - -func (*SocketAddress_PortValue) isSocketAddress_PortSpecifier() {} -func (*SocketAddress_NamedPort) isSocketAddress_PortSpecifier() {} - -func (m *SocketAddress) GetPortSpecifier() isSocketAddress_PortSpecifier { - if m != nil { - return m.PortSpecifier - } - return nil -} - func (m *SocketAddress) GetProtocol() SocketAddress_Protocol { if m != nil { return m.Protocol } - return TCP + return SocketAddress_TCP } func (m *SocketAddress) GetAddress() string { @@ -207,6 +148,29 @@ func (m *SocketAddress) GetAddress() string { return "" } +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 { + NamedPort string `protobuf:"bytes,4,opt,name=named_port,json=namedPort,proto3,oneof"` +} + +func (*SocketAddress_PortValue) isSocketAddress_PortSpecifier() {} + +func (*SocketAddress_NamedPort) isSocketAddress_PortSpecifier() {} + +func (m *SocketAddress) GetPortSpecifier() isSocketAddress_PortSpecifier { + if m != nil { + return m.PortSpecifier + } + return nil +} + func (m *SocketAddress) GetPortValue() uint32 { if x, ok := m.GetPortSpecifier().(*SocketAddress_PortValue); ok { return x.PortValue @@ -235,86 +199,21 @@ func (m *SocketAddress) GetIpv4Compat() bool { return false } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SocketAddress) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _SocketAddress_OneofMarshaler, _SocketAddress_OneofUnmarshaler, _SocketAddress_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SocketAddress) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*SocketAddress_PortValue)(nil), (*SocketAddress_NamedPort)(nil), } } -func _SocketAddress_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SocketAddress) - // port_specifier - switch x := m.PortSpecifier.(type) { - case *SocketAddress_PortValue: - _ = b.EncodeVarint(3<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.PortValue)) - case *SocketAddress_NamedPort: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.NamedPort) - case nil: - default: - return fmt.Errorf("SocketAddress.PortSpecifier has unexpected type %T", x) - } - return nil -} - -func _SocketAddress_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SocketAddress) - switch tag { - case 3: // port_specifier.port_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.PortSpecifier = &SocketAddress_PortValue{uint32(x)} - return true, err - case 4: // port_specifier.named_port - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.PortSpecifier = &SocketAddress_NamedPort{x} - return true, err - default: - return false, nil - } -} - -func _SocketAddress_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SocketAddress) - // port_specifier - switch x := m.PortSpecifier.(type) { - case *SocketAddress_PortValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.PortValue)) - case *SocketAddress_NamedPort: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.NamedPort))) - n += len(x.NamedPort) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type TcpKeepalive struct { - // 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 *types.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 (ie 2 hours.) - KeepaliveTime *types.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 *types.UInt32Value `protobuf:"bytes,3,opt,name=keepalive_interval,json=keepaliveInterval,proto3" json:"keepalive_interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + KeepaliveProbes *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=keepalive_probes,json=keepaliveProbes,proto3" json:"keepalive_probes,omitempty"` + KeepaliveTime *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=keepalive_time,json=keepaliveTime,proto3" json:"keepalive_time,omitempty"` + KeepaliveInterval *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=keepalive_interval,json=keepaliveInterval,proto3" json:"keepalive_interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TcpKeepalive) Reset() { *m = TcpKeepalive{} } @@ -323,26 +222,18 @@ func (*TcpKeepalive) ProtoMessage() {} func (*TcpKeepalive) Descriptor() ([]byte, []int) { return fileDescriptor_6906417f87bcce55, []int{2} } + func (m *TcpKeepalive) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpKeepalive.Unmarshal(m, b) } func (m *TcpKeepalive) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpKeepalive.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpKeepalive.Marshal(b, m, deterministic) } func (m *TcpKeepalive) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpKeepalive.Merge(m, src) } func (m *TcpKeepalive) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpKeepalive.Size(m) } func (m *TcpKeepalive) XXX_DiscardUnknown() { xxx_messageInfo_TcpKeepalive.DiscardUnknown(m) @@ -350,21 +241,21 @@ func (m *TcpKeepalive) XXX_DiscardUnknown() { var xxx_messageInfo_TcpKeepalive proto.InternalMessageInfo -func (m *TcpKeepalive) GetKeepaliveProbes() *types.UInt32Value { +func (m *TcpKeepalive) GetKeepaliveProbes() *wrappers.UInt32Value { if m != nil { return m.KeepaliveProbes } return nil } -func (m *TcpKeepalive) GetKeepaliveTime() *types.UInt32Value { +func (m *TcpKeepalive) GetKeepaliveTime() *wrappers.UInt32Value { if m != nil { return m.KeepaliveTime } return nil } -func (m *TcpKeepalive) GetKeepaliveInterval() *types.UInt32Value { +func (m *TcpKeepalive) GetKeepaliveInterval() *wrappers.UInt32Value { if m != nil { return m.KeepaliveInterval } @@ -372,22 +263,12 @@ func (m *TcpKeepalive) GetKeepaliveInterval() *types.UInt32Value { } type BindConfig struct { - // The address to bind to when creating a socket. - SourceAddress SocketAddress `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address"` - // 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 *types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SourceAddress *SocketAddress `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + Freebind *wrappers.BoolValue `protobuf:"bytes,2,opt,name=freebind,proto3" json:"freebind,omitempty"` + SocketOptions []*SocketOption `protobuf:"bytes,3,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BindConfig) Reset() { *m = BindConfig{} } @@ -396,26 +277,18 @@ func (*BindConfig) ProtoMessage() {} func (*BindConfig) Descriptor() ([]byte, []int) { return fileDescriptor_6906417f87bcce55, []int{3} } + func (m *BindConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_BindConfig.Unmarshal(m, b) } func (m *BindConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BindConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_BindConfig.Marshal(b, m, deterministic) } func (m *BindConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_BindConfig.Merge(m, src) } func (m *BindConfig) XXX_Size() int { - return m.Size() + return xxx_messageInfo_BindConfig.Size(m) } func (m *BindConfig) XXX_DiscardUnknown() { xxx_messageInfo_BindConfig.DiscardUnknown(m) @@ -423,14 +296,14 @@ func (m *BindConfig) XXX_DiscardUnknown() { var xxx_messageInfo_BindConfig proto.InternalMessageInfo -func (m *BindConfig) GetSourceAddress() SocketAddress { +func (m *BindConfig) GetSourceAddress() *SocketAddress { if m != nil { return m.SourceAddress } - return SocketAddress{} + return nil } -func (m *BindConfig) GetFreebind() *types.BoolValue { +func (m *BindConfig) GetFreebind() *wrappers.BoolValue { if m != nil { return m.Freebind } @@ -444,9 +317,6 @@ func (m *BindConfig) GetSocketOptions() []*SocketOption { 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 { // Types that are valid to be assigned to Address: // *Address_SocketAddress @@ -463,26 +333,18 @@ func (*Address) ProtoMessage() {} func (*Address) Descriptor() ([]byte, []int) { return fileDescriptor_6906417f87bcce55, []int{4} } + func (m *Address) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Address.Unmarshal(m, b) } func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Address.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Address.Marshal(b, m, deterministic) } func (m *Address) XXX_Merge(src proto.Message) { xxx_messageInfo_Address.Merge(m, src) } func (m *Address) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Address.Size(m) } func (m *Address) XXX_DiscardUnknown() { xxx_messageInfo_Address.DiscardUnknown(m) @@ -492,20 +354,19 @@ var xxx_messageInfo_Address proto.InternalMessageInfo type isAddress_Address interface { isAddress_Address() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } 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"` } func (*Address_SocketAddress) isAddress_Address() {} -func (*Address_Pipe) isAddress_Address() {} + +func (*Address_Pipe) isAddress_Address() {} func (m *Address) GetAddress() isAddress_Address { if m != nil { @@ -528,90 +389,20 @@ func (m *Address) GetPipe() *Pipe { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Address) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Address_OneofMarshaler, _Address_OneofUnmarshaler, _Address_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Address) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*Address_SocketAddress)(nil), (*Address_Pipe)(nil), } } -func _Address_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Address) - // address - switch x := m.Address.(type) { - case *Address_SocketAddress: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SocketAddress); err != nil { - return err - } - case *Address_Pipe: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Pipe); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Address.Address has unexpected type %T", x) - } - return nil -} - -func _Address_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Address) - switch tag { - case 1: // address.socket_address - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SocketAddress) - err := b.DecodeMessage(msg) - m.Address = &Address_SocketAddress{msg} - return true, err - case 2: // address.pipe - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Pipe) - err := b.DecodeMessage(msg) - m.Address = &Address_Pipe{msg} - return true, err - default: - return false, nil - } -} - -func _Address_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Address) - // address - switch x := m.Address.(type) { - case *Address_SocketAddress: - s := proto.Size(x.SocketAddress) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Address_Pipe: - s := proto.Size(x.Pipe) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. type CidrRange struct { - // 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. - PrefixLen *types.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` + PrefixLen *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CidrRange) Reset() { *m = CidrRange{} } @@ -620,26 +411,18 @@ func (*CidrRange) ProtoMessage() {} func (*CidrRange) Descriptor() ([]byte, []int) { return fileDescriptor_6906417f87bcce55, []int{5} } + func (m *CidrRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CidrRange.Unmarshal(m, b) } func (m *CidrRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CidrRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CidrRange.Marshal(b, m, deterministic) } func (m *CidrRange) XXX_Merge(src proto.Message) { xxx_messageInfo_CidrRange.Merge(m, src) } func (m *CidrRange) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CidrRange.Size(m) } func (m *CidrRange) XXX_DiscardUnknown() { xxx_messageInfo_CidrRange.DiscardUnknown(m) @@ -654,7 +437,7 @@ func (m *CidrRange) GetAddressPrefix() string { return "" } -func (m *CidrRange) GetPrefixLen() *types.UInt32Value { +func (m *CidrRange) GetPrefixLen() *wrappers.UInt32Value { if m != nil { return m.PrefixLen } @@ -674,1808 +457,51 @@ func init() { func init() { proto.RegisterFile("envoy/api/v2/core/address.proto", fileDescriptor_6906417f87bcce55) } var fileDescriptor_6906417f87bcce55 = []byte{ - // 710 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x6f, 0xd3, 0x3e, - 0x18, 0xad, 0x9b, 0x6e, 0x6b, 0xbf, 0xae, 0xfd, 0x75, 0xd6, 0x4f, 0x5a, 0x54, 0x8d,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x87, 0x24, 0xda, 0x4a, 0xec, 0xe3, 0xc7, 0x50, 0x54, 0x0a, 0x03, - 0xe6, 0x2b, 0x52, 0xb5, 0x7b, 0xc3, 0x98, 0xcb, 0x62, 0xfc, 0xc4, 0x31, 0xec, 0x94, 0x60, 0x81, - 0xd4, 0x5f, 0x78, 0x85, 0xf2, 0x35, 0xe4, 0xcc, 0x64, 0xf0, 0x3a, 0x2c, 0xa5, 0x97, 0xa3, 0xe7, - 0x7f, 0xb5, 0x91, 0x75, 0xf0, 0x4d, 0x00, 0xce, 0x44, 0xe4, 0xc6, 0x9e, 0x7f, 0x44, 0x74, 0xad, - 0x85, 0x3a, 0x15, 0xab, 0x2c, 0x71, 0x8b, 0x1b, 0x05, 0xfd, 0xe2, 0x42, 0xdb, 0xc9, 0x39, 0x25, - 0x09, 0x78, 0x2a, 0xfb, 0xb8, 0x09, 0x10, 0x78, 0x13, 0x32, 0x74, 0x65, 0x49, 0x2f, 0x48, 0x55, - 0x09, 0x50, 0x35, 0x9b, 0x89, 0x08, 0xaf, 0x43, 0x45, 0x90, 0x90, 0xf9, 0x31, 0x11, 0xae, 0xac, - 0xea, 0x0b, 0x12, 0xe3, 0x2c, 0x67, 0xc5, 0x87, 0xde, 0x44, 0xaa, 0x94, 0x29, 0x8f, 0xef, 0xb8, - 0x03, 0x36, 0xe1, 0x5e, 0xa4, 0x2f, 0xb6, 0x50, 0xa7, 0xe8, 0x80, 0x2c, 0xf5, 0x54, 0xa5, 0xdd, - 0x86, 0x62, 0x96, 0x0d, 0x2f, 0x81, 0xb6, 0xdf, 0xb3, 0x6b, 0x39, 0xb9, 0x38, 0xb8, 0x67, 0xd7, - 0x50, 0xbd, 0xf0, 0xe6, 0x7d, 0x23, 0x67, 0xad, 0x42, 0x55, 0x19, 0x0f, 0x39, 0x19, 0xd0, 0x11, - 0x25, 0x02, 0x2f, 0x7c, 0x3c, 0x3f, 0xd5, 0x50, 0xfb, 0x1c, 0xc1, 0xf2, 0xfe, 0x80, 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x32, 0xd9, 0x4c, 0xea, 0x16, 0x14, 0x38, 0xe5, 0xd9, 0x33, 0xae, - 0xfe, 0x46, 0x40, 0x7e, 0xe6, 0x9d, 0x9c, 0xa3, 0x60, 0x56, 0x6d, 0xf6, 0xa1, 0xb2, 0x59, 0x7b, - 0x8d, 0xa0, 0xd4, 0xa3, 0x43, 0xe1, 0x78, 0xc1, 0x98, 0xe0, 0xdb, 0x50, 0x4d, 0xfb, 0x2e, 0x17, - 0x64, 0x44, 0x8f, 0xe7, 0xbf, 0x7f, 0x25, 0x05, 0xd8, 0xaa, 0x8f, 0xb7, 0x01, 0x12, 0xa4, 0xeb, - 0x93, 0xe0, 0x6f, 0xa6, 0x29, 0xfd, 0xea, 0x1b, 0x9a, 0xfe, 0x12, 0x39, 0xa5, 0x84, 0xfb, 0x80, - 0x04, 0xd6, 0xd6, 0x87, 0x69, 0x03, 0x9d, 0x4d, 0x1b, 0xe8, 0xf3, 0xb4, 0x81, 0xbe, 0x4d, 0x1b, - 0x08, 0x9a, 0x94, 0x25, 0x79, 0xb8, 0x60, 0xc7, 0x27, 0xf3, 0xd1, 0xac, 0xe5, 0xad, 0xcc, 0x0a, - 0x8b, 0x98, 0x8d, 0xfa, 0x8b, 0xea, 0xbc, 0xcd, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0xb7, - 0xc9, 0xd8, 0x64, 0x05, 0x00, 0x00, + // 733 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xcd, 0xc4, 0x69, 0x7e, 0xa6, 0x4d, 0xbe, 0x74, 0xf4, 0x41, 0xad, 0x52, 0x48, 0x08, 0x42, + 0x0a, 0x95, 0xb0, 0xa5, 0x14, 0xb1, 0xaf, 0xc3, 0x4f, 0xab, 0x22, 0x6a, 0x4c, 0xcb, 0xd6, 0x9a, + 0xd8, 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b5, 0xd4, 0x5d, 0x58, 0xe2, 0x94, 0xeb, 0x0b, 0x5c, 0xf9, + 0x8d, 0x40, 0xf6, 0xa8, 0xb7, 0x0a, 0x9e, 0x6a, 0x73, 0x1a, 0xb3, 0xe7, 0x93, 0x67, 0xec, 0x04, + 0xc0, 0x5a, 0x9f, 0x86, 0xc2, 0xc3, 0xf1, 0x88, 0x20, 0x0b, 0x36, 0xa6, 0xa8, 0xcf, 0x05, 0x19, + 0xd2, 0xc3, 0x5f, 0x3f, 0x02, 0xf5, 0x29, 0xec, 0x2a, 0x14, 0x3d, 0x84, 0x30, 0xef, 0xf3, 0x23, + 0x12, 0xff, 0x4d, 0x86, 0xf4, 0x17, 0xe3, 0x18, 0x78, 0xb5, 0x9c, 0xf9, 0x84, 0xc4, 0xce, 0xfe, + 0xd7, 0x77, 0xdf, 0xdf, 0x2c, 0x5c, 0x45, 0xff, 0xe7, 0xe6, 0x03, 0x95, 0x81, 0xdc, 0x7c, 0xba, + 0xf1, 0xfe, 0xf8, 0xc3, 0xa7, 0x72, 0xb1, 0x09, 0x60, 0x8b, 0xb2, 0x7c, 0x3a, 0x2e, 0xd8, 0xe1, + 0xd1, 0xfc, 0xa0, 0xce, 0xd2, 0xa6, 0x36, 0xc7, 0x24, 0x73, 0xc1, 0xa0, 0xac, 0x1c, 0x6c, 0xfc, + 0x08, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x71, 0xe6, 0x7a, 0xac, 0x05, 0x00, 0x00, } - -func (this *Pipe) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Pipe) - if !ok { - that2, ok := that.(Pipe) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *SocketAddress) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SocketAddress) - if !ok { - that2, ok := that.(SocketAddress) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Protocol != that1.Protocol { - return false - } - if this.Address != that1.Address { - return false - } - if that1.PortSpecifier == nil { - if this.PortSpecifier != nil { - return false - } - } else if this.PortSpecifier == nil { - return false - } else if !this.PortSpecifier.Equal(that1.PortSpecifier) { - return false - } - if this.ResolverName != that1.ResolverName { - return false - } - if this.Ipv4Compat != that1.Ipv4Compat { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *SocketAddress_PortValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SocketAddress_PortValue) - if !ok { - that2, ok := that.(SocketAddress_PortValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PortValue != that1.PortValue { - return false - } - return true -} -func (this *SocketAddress_NamedPort) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SocketAddress_NamedPort) - if !ok { - that2, ok := that.(SocketAddress_NamedPort) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.NamedPort != that1.NamedPort { - return false - } - return true -} -func (this *TcpKeepalive) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TcpKeepalive) - if !ok { - that2, ok := that.(TcpKeepalive) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.KeepaliveProbes.Equal(that1.KeepaliveProbes) { - return false - } - if !this.KeepaliveTime.Equal(that1.KeepaliveTime) { - return false - } - if !this.KeepaliveInterval.Equal(that1.KeepaliveInterval) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BindConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BindConfig) - if !ok { - that2, ok := that.(BindConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SourceAddress.Equal(&that1.SourceAddress) { - return false - } - if !this.Freebind.Equal(that1.Freebind) { - return false - } - if len(this.SocketOptions) != len(that1.SocketOptions) { - return false - } - for i := range this.SocketOptions { - if !this.SocketOptions[i].Equal(that1.SocketOptions[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Address) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Address) - if !ok { - that2, ok := that.(Address) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Address == nil { - if this.Address != nil { - return false - } - } else if this.Address == nil { - return false - } else if !this.Address.Equal(that1.Address) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Address_SocketAddress) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Address_SocketAddress) - if !ok { - that2, ok := that.(Address_SocketAddress) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SocketAddress.Equal(that1.SocketAddress) { - return false - } - return true -} -func (this *Address_Pipe) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Address_Pipe) - if !ok { - that2, ok := that.(Address_Pipe) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Pipe.Equal(that1.Pipe) { - return false - } - return true -} -func (this *CidrRange) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CidrRange) - if !ok { - that2, ok := that.(CidrRange) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.AddressPrefix != that1.AddressPrefix { - return false - } - if !this.PrefixLen.Equal(that1.PrefixLen) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Pipe) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Pipe) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Path) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAddress(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *SocketAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SocketAddress) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Protocol != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.Protocol)) - } - if len(m.Address) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAddress(dAtA, i, uint64(len(m.Address))) - i += copy(dAtA[i:], m.Address) - } - if m.PortSpecifier != nil { - nn1, err := m.PortSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if len(m.ResolverName) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAddress(dAtA, i, uint64(len(m.ResolverName))) - i += copy(dAtA[i:], m.ResolverName) - } - if m.Ipv4Compat { - dAtA[i] = 0x30 - i++ - if m.Ipv4Compat { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *SocketAddress_PortValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x18 - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.PortValue)) - return i, nil -} -func (m *SocketAddress_NamedPort) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x22 - i++ - i = encodeVarintAddress(dAtA, i, uint64(len(m.NamedPort))) - i += copy(dAtA[i:], m.NamedPort) - return i, nil -} -func (m *TcpKeepalive) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpKeepalive) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.KeepaliveProbes != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.KeepaliveProbes.Size())) - n2, err := m.KeepaliveProbes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.KeepaliveTime != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.KeepaliveTime.Size())) - n3, err := m.KeepaliveTime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.KeepaliveInterval != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.KeepaliveInterval.Size())) - n4, err := m.KeepaliveInterval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BindConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BindConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.SourceAddress.Size())) - n5, err := m.SourceAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - if m.Freebind != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.Freebind.Size())) - n6, err := m.Freebind.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if len(m.SocketOptions) > 0 { - for _, msg := range m.SocketOptions { - dAtA[i] = 0x1a - i++ - i = encodeVarintAddress(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Address) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Address) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Address != nil { - nn7, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn7 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Address_SocketAddress) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SocketAddress != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.SocketAddress.Size())) - n8, err := m.SocketAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} -func (m *Address_Pipe) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Pipe != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.Pipe.Size())) - n9, err := m.Pipe.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - return i, nil -} -func (m *CidrRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CidrRange) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.AddressPrefix) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAddress(dAtA, i, uint64(len(m.AddressPrefix))) - i += copy(dAtA[i:], m.AddressPrefix) - } - if m.PrefixLen != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAddress(dAtA, i, uint64(m.PrefixLen.Size())) - n10, err := m.PrefixLen.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintAddress(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Pipe) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - if l > 0 { - n += 1 + l + sovAddress(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SocketAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Protocol != 0 { - n += 1 + sovAddress(uint64(m.Protocol)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovAddress(uint64(l)) - } - if m.PortSpecifier != nil { - n += m.PortSpecifier.Size() - } - l = len(m.ResolverName) - if l > 0 { - n += 1 + l + sovAddress(uint64(l)) - } - if m.Ipv4Compat { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SocketAddress_PortValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovAddress(uint64(m.PortValue)) - return n -} -func (m *SocketAddress_NamedPort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NamedPort) - n += 1 + l + sovAddress(uint64(l)) - return n -} -func (m *TcpKeepalive) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KeepaliveProbes != nil { - l = m.KeepaliveProbes.Size() - n += 1 + l + sovAddress(uint64(l)) - } - if m.KeepaliveTime != nil { - l = m.KeepaliveTime.Size() - n += 1 + l + sovAddress(uint64(l)) - } - if m.KeepaliveInterval != nil { - l = m.KeepaliveInterval.Size() - n += 1 + l + sovAddress(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BindConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.SourceAddress.Size() - n += 1 + l + sovAddress(uint64(l)) - if m.Freebind != nil { - l = m.Freebind.Size() - n += 1 + l + sovAddress(uint64(l)) - } - if len(m.SocketOptions) > 0 { - for _, e := range m.SocketOptions { - l = e.Size() - n += 1 + l + sovAddress(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Address) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - n += m.Address.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Address_SocketAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SocketAddress != nil { - l = m.SocketAddress.Size() - n += 1 + l + sovAddress(uint64(l)) - } - return n -} -func (m *Address_Pipe) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pipe != nil { - l = m.Pipe.Size() - n += 1 + l + sovAddress(uint64(l)) - } - return n -} -func (m *CidrRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AddressPrefix) - if l > 0 { - n += 1 + l + sovAddress(uint64(l)) - } - if m.PrefixLen != nil { - l = m.PrefixLen.Size() - n += 1 + l + sovAddress(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAddress(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAddress(x uint64) (n int) { - return sovAddress(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Pipe) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Pipe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pipe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAddress(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAddress - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAddress - } - 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 *SocketAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SocketAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SocketAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - m.Protocol = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Protocol |= SocketAddress_Protocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PortValue", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PortSpecifier = &SocketAddress_PortValue{v} - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortSpecifier = &SocketAddress_NamedPort{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResolverName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResolverName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ipv4Compat", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ipv4Compat = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAddress(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAddress - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAddress - } - 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 *TcpKeepalive) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TcpKeepalive: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TcpKeepalive: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepaliveProbes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.KeepaliveProbes == nil { - m.KeepaliveProbes = &types.UInt32Value{} - } - if err := m.KeepaliveProbes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepaliveTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.KeepaliveTime == nil { - m.KeepaliveTime = &types.UInt32Value{} - } - if err := m.KeepaliveTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepaliveInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.KeepaliveInterval == nil { - m.KeepaliveInterval = &types.UInt32Value{} - } - if err := m.KeepaliveInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAddress(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAddress - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAddress - } - 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 *BindConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BindConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BindConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SourceAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Freebind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Freebind == nil { - m.Freebind = &types.BoolValue{} - } - if err := m.Freebind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SocketOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SocketOptions = append(m.SocketOptions, &SocketOption{}) - if err := m.SocketOptions[len(m.SocketOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAddress(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAddress - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAddress - } - 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 *Address) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Address: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Address: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SocketAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SocketAddress{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Address = &Address_SocketAddress{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pipe", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Pipe{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Address = &Address_Pipe{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAddress(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAddress - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAddress - } - 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 *CidrRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CidrRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CidrRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddressPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrefixLen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddress - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAddress - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAddress - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrefixLen == nil { - m.PrefixLen = &types.UInt32Value{} - } - if err := m.PrefixLen.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAddress(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAddress - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAddress - } - 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 skipAddress(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAddress - } - 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, ErrIntOverflowAddress - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAddress - } - 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, ErrInvalidLengthAddress - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthAddress - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAddress - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAddress(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthAddress - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAddress = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAddress = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.validate.go index f2d8c27861..3071e9e32e 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/address.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/address.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _address_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on Pipe with the rules defined in the proto // definition for this message. If any rules are violated, an error is returned. func (m *Pipe) Validate() error { @@ -47,6 +50,13 @@ func (m *Pipe) Validate() error { } } + if m.GetMode() > 511 { + return PipeValidationError{ + field: "Mode", + reason: "value must be less than or equal to 511", + } + } + return nil } @@ -217,47 +227,32 @@ func (m *TcpKeepalive) Validate() error { return nil } - { - tmp := m.GetKeepaliveProbes() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveProbes", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetKeepaliveTime() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveTime", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetKeepaliveInterval() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveInterval", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -326,32 +321,29 @@ func (m *BindConfig) Validate() error { return nil } - { - tmp := m.GetSourceAddress() + if m.GetSourceAddress() == nil { + return BindConfigValidationError{ + field: "SourceAddress", + reason: "value is required", + } + } - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetFreebind() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -359,17 +351,12 @@ func (m *BindConfig) Validate() error { for idx, item := range m.GetSocketOptions() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } + 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, } } } @@ -444,34 +431,24 @@ func (m *Address) Validate() error { case *Address_SocketAddress: - { - tmp := m.GetSocketAddress() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "SocketAddress", - reason: "embedded message failed validation", - cause: err, - } + 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: - { - tmp := m.GetPipe() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "Pipe", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.go new file mode 100644 index 0000000000..957798eda9 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.go @@ -0,0 +1,101 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/core/backoff.proto + +package envoy_api_v2_core + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type BackoffStrategy struct { + BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` + MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BackoffStrategy) Reset() { *m = BackoffStrategy{} } +func (m *BackoffStrategy) String() string { return proto.CompactTextString(m) } +func (*BackoffStrategy) ProtoMessage() {} +func (*BackoffStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_743c92d7b5268904, []int{0} +} + +func (m *BackoffStrategy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BackoffStrategy.Unmarshal(m, b) +} +func (m *BackoffStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BackoffStrategy.Marshal(b, m, deterministic) +} +func (m *BackoffStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_BackoffStrategy.Merge(m, src) +} +func (m *BackoffStrategy) XXX_Size() int { + return xxx_messageInfo_BackoffStrategy.Size(m) +} +func (m *BackoffStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_BackoffStrategy.DiscardUnknown(m) +} + +var xxx_messageInfo_BackoffStrategy proto.InternalMessageInfo + +func (m *BackoffStrategy) GetBaseInterval() *duration.Duration { + if m != nil { + return m.BaseInterval + } + return nil +} + +func (m *BackoffStrategy) GetMaxInterval() *duration.Duration { + if m != nil { + return m.MaxInterval + } + return nil +} + +func init() { + proto.RegisterType((*BackoffStrategy)(nil), "envoy.api.v2.core.BackoffStrategy") +} + +func init() { proto.RegisterFile("envoy/api/v2/core/backoff.proto", fileDescriptor_743c92d7b5268904) } + +var fileDescriptor_743c92d7b5268904 = []byte{ + // 310 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0xd2, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0x4a, + 0x4c, 0xce, 0xce, 0x4f, 0x4b, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x04, 0x2b, 0xd0, + 0x4b, 0x2c, 0xc8, 0xd4, 0x2b, 0x33, 0xd2, 0x03, 0x29, 0x90, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, 0xcf, + 0x49, 0xd5, 0x07, 0x2b, 0x48, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, + 0x83, 0x68, 0x91, 0x92, 0x2b, 0x4d, 0x29, 0x48, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x01, 0x0b, + 0x17, 0xeb, 0xe7, 0x66, 0xa6, 0x17, 0x25, 0x96, 0xa4, 0x42, 0xe5, 0x65, 0x31, 0xe4, 0x8b, 0x4b, + 0x12, 0x4b, 0x4a, 0x8b, 0xa1, 0xd2, 0xe2, 0x65, 0x89, 0x39, 0x99, 0x29, 0x89, 0x25, 0xa9, 0xfa, + 0x30, 0x06, 0x44, 0x42, 0x69, 0x25, 0x23, 0x17, 0xbf, 0x13, 0xc4, 0x71, 0xc1, 0x25, 0x20, 0xf3, + 0xd2, 0x2b, 0x85, 0xfc, 0xb8, 0x78, 0x93, 0x12, 0x8b, 0x53, 0xe3, 0x33, 0xf3, 0x4a, 0x52, 0x8b, + 0xca, 0x12, 0x73, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x24, 0xf5, 0x20, 0x6e, 0xd4, 0x83, + 0xb9, 0x51, 0xcf, 0x05, 0xea, 0x46, 0x27, 0xbe, 0x5f, 0x4e, 0xdc, 0xab, 0x18, 0x39, 0x38, 0x18, + 0x8d, 0x58, 0x04, 0x0e, 0xb4, 0xd8, 0x06, 0xf1, 0x80, 0xf4, 0x7b, 0x42, 0xb5, 0x0b, 0xb9, 0x71, + 0xf1, 0xe4, 0x26, 0x56, 0x20, 0x8c, 0x63, 0x22, 0x64, 0x1c, 0xc7, 0x2f, 0x27, 0xd6, 0x55, 0x8c, + 0x4c, 0x5a, 0x0c, 0x41, 0xdc, 0xb9, 0x89, 0x15, 0x30, 0x73, 0x9c, 0x42, 0x3f, 0xcd, 0xf8, 0xd7, + 0xcf, 0x2a, 0x26, 0x24, 0x02, 0x09, 0xbe, 0xe4, 0xfc, 0xbc, 0xb4, 0xcc, 0x74, 0x70, 0xf0, 0xe9, + 0x95, 0x19, 0xef, 0x6a, 0x38, 0x71, 0x91, 0x8d, 0x49, 0x80, 0x91, 0x4b, 0x3e, 0x33, 0x5f, 0x0f, + 0xac, 0xa0, 0xa0, 0x28, 0xbf, 0xa2, 0x52, 0x0f, 0x23, 0xa8, 0x9d, 0x78, 0xa0, 0xfe, 0x0d, 0x00, + 0xd9, 0x1b, 0xc0, 0x98, 0xc4, 0x06, 0x76, 0x80, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x2d, + 0xa4, 0xc4, 0xb7, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.validate.go new file mode 100644 index 0000000000..cd36ff5380 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/backoff.pb.validate.go @@ -0,0 +1,151 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/core/backoff.proto + +package envoy_api_v2_core + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _backoff_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on BackoffStrategy with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *BackoffStrategy) Validate() error { + if m == nil { + return nil + } + + if m.GetBaseInterval() == nil { + return BackoffStrategyValidationError{ + field: "BaseInterval", + reason: "value is required", + } + } + + if d := m.GetBaseInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return BackoffStrategyValidationError{ + field: "BaseInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + return BackoffStrategyValidationError{ + field: "BaseInterval", + reason: "value must be greater than or equal to 1ms", + } + } + + } + + if d := m.GetMaxInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return BackoffStrategyValidationError{ + field: "MaxInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return BackoffStrategyValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.go index 02a4558edb..530d628b94 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.go @@ -1,21 +1,19 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/base.proto -package core +package envoy_api_v2_core import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + _ "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,15 +25,8 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// 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 ( @@ -61,19 +52,19 @@ func (RoutingPriority) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a7738c0f9e1bfff4, []int{0} } -// HTTP request method. type RequestMethod int32 const ( - METHOD_UNSPECIFIED RequestMethod = 0 - GET RequestMethod = 1 - HEAD RequestMethod = 2 - POST RequestMethod = 3 - PUT RequestMethod = 4 - DELETE RequestMethod = 5 - CONNECT RequestMethod = 6 - OPTIONS RequestMethod = 7 - TRACE RequestMethod = 8 + 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 ) var RequestMethod_name = map[int32]string{ @@ -86,6 +77,7 @@ var RequestMethod_name = map[int32]string{ 6: "CONNECT", 7: "OPTIONS", 8: "TRACE", + 9: "PATCH", } var RequestMethod_value = map[string]int32{ @@ -98,6 +90,7 @@ var RequestMethod_value = map[string]int32{ "CONNECT": 6, "OPTIONS": 7, "TRACE": 8, + "PATCH": 9, } func (x RequestMethod) String() string { @@ -108,53 +101,37 @@ func (RequestMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a7738c0f9e1bfff4, []int{1} } -type SocketOption_SocketState int32 +type TrafficDirection int32 const ( - // Socket options are applied after socket creation but before binding the socket to a port - STATE_PREBIND SocketOption_SocketState = 0 - // Socket options are applied after binding the socket to a port but before calling listen() - STATE_BOUND SocketOption_SocketState = 1 - // Socket options are applied after calling listen() - STATE_LISTENING SocketOption_SocketState = 2 + TrafficDirection_UNSPECIFIED TrafficDirection = 0 + TrafficDirection_INBOUND TrafficDirection = 1 + TrafficDirection_OUTBOUND TrafficDirection = 2 ) -var SocketOption_SocketState_name = map[int32]string{ - 0: "STATE_PREBIND", - 1: "STATE_BOUND", - 2: "STATE_LISTENING", +var TrafficDirection_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "INBOUND", + 2: "OUTBOUND", } -var SocketOption_SocketState_value = map[string]int32{ - "STATE_PREBIND": 0, - "STATE_BOUND": 1, - "STATE_LISTENING": 2, +var TrafficDirection_value = map[string]int32{ + "UNSPECIFIED": 0, + "INBOUND": 1, + "OUTBOUND": 2, } -func (x SocketOption_SocketState) String() string { - return proto.EnumName(SocketOption_SocketState_name, int32(x)) +func (x TrafficDirection) String() string { + return proto.EnumName(TrafficDirection_name, int32(x)) } -func (SocketOption_SocketState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{9, 0} +func (TrafficDirection) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{2} } -// Identifies location of where either Envoy runs or where upstream hosts run. type Locality struct { - // 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. + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` + Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` SubZone string `protobuf:"bytes,3,opt,name=sub_zone,json=subZone,proto3" json:"sub_zone,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -167,22 +144,18 @@ func (*Locality) ProtoMessage() {} func (*Locality) Descriptor() ([]byte, []int) { return fileDescriptor_a7738c0f9e1bfff4, []int{0} } + func (m *Locality) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Locality.Unmarshal(m, b) } func (m *Locality) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_Locality.Marshal(b, m, deterministic) } func (m *Locality) XXX_Merge(src proto.Message) { xxx_messageInfo_Locality.Merge(m, src) } func (m *Locality) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Locality.Size(m) } func (m *Locality) XXX_DiscardUnknown() { xxx_messageInfo_Locality.DiscardUnknown(m) @@ -211,65 +184,161 @@ func (m *Locality) GetSubZone() string { return "" } -// 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. +type BuildVersion struct { + Version *_type.SemanticVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Metadata *_struct.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BuildVersion) Reset() { *m = BuildVersion{} } +func (m *BuildVersion) String() string { return proto.CompactTextString(m) } +func (*BuildVersion) ProtoMessage() {} +func (*BuildVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{1} +} + +func (m *BuildVersion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BuildVersion.Unmarshal(m, b) +} +func (m *BuildVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BuildVersion.Marshal(b, m, deterministic) +} +func (m *BuildVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_BuildVersion.Merge(m, src) +} +func (m *BuildVersion) XXX_Size() int { + return xxx_messageInfo_BuildVersion.Size(m) +} +func (m *BuildVersion) XXX_DiscardUnknown() { + xxx_messageInfo_BuildVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_BuildVersion proto.InternalMessageInfo + +func (m *BuildVersion) GetVersion() *_type.SemanticVersion { + if m != nil { + return m.Version + } + return nil +} + +func (m *BuildVersion) GetMetadata() *_struct.Struct { + if m != nil { + return m.Metadata + } + return nil +} + +type Extension struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` + TypeDescriptor string `protobuf:"bytes,3,opt,name=type_descriptor,json=typeDescriptor,proto3" json:"type_descriptor,omitempty"` + Version *BuildVersion `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Extension) Reset() { *m = Extension{} } +func (m *Extension) String() string { return proto.CompactTextString(m) } +func (*Extension) ProtoMessage() {} +func (*Extension) Descriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{2} +} + +func (m *Extension) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Extension.Unmarshal(m, b) +} +func (m *Extension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Extension.Marshal(b, m, deterministic) +} +func (m *Extension) XXX_Merge(src proto.Message) { + xxx_messageInfo_Extension.Merge(m, src) +} +func (m *Extension) XXX_Size() int { + return xxx_messageInfo_Extension.Size(m) +} +func (m *Extension) XXX_DiscardUnknown() { + xxx_messageInfo_Extension.DiscardUnknown(m) +} + +var xxx_messageInfo_Extension proto.InternalMessageInfo + +func (m *Extension) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Extension) GetCategory() string { + if m != nil { + return m.Category + } + return "" +} + +func (m *Extension) GetTypeDescriptor() string { + if m != nil { + return m.TypeDescriptor + } + return "" +} + +func (m *Extension) GetVersion() *BuildVersion { + if m != nil { + return m.Version + } + return nil +} + +func (m *Extension) GetDisabled() bool { + if m != nil { + return m.Disabled + } + return false +} + type Node struct { - // 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 *types.Struct `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Locality specifying where the Envoy instance is running. - Locality *Locality `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"` - // This is motivated by informing a management server during canary which - // version of Envoy is being tested in a heterogeneous fleet. This will be set - // by Envoy in management server RPCs. - BuildVersion string `protobuf:"bytes,5,opt,name=build_version,json=buildVersion,proto3" json:"build_version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` + Metadata *_struct.Struct `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Locality *Locality `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"` + BuildVersion string `protobuf:"bytes,5,opt,name=build_version,json=buildVersion,proto3" json:"build_version,omitempty"` // Deprecated: Do not use. + UserAgentName string `protobuf:"bytes,6,opt,name=user_agent_name,json=userAgentName,proto3" json:"user_agent_name,omitempty"` + // Types that are valid to be assigned to UserAgentVersionType: + // *Node_UserAgentVersion + // *Node_UserAgentBuildVersion + UserAgentVersionType isNode_UserAgentVersionType `protobuf_oneof:"user_agent_version_type"` + Extensions []*Extension `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty"` + ClientFeatures []string `protobuf:"bytes,10,rep,name=client_features,json=clientFeatures,proto3" json:"client_features,omitempty"` + ListeningAddresses []*Address `protobuf:"bytes,11,rep,name=listening_addresses,json=listeningAddresses,proto3" json:"listening_addresses,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Node) Reset() { *m = Node{} } func (m *Node) String() string { return proto.CompactTextString(m) } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{1} + return fileDescriptor_a7738c0f9e1bfff4, []int{3} } + func (m *Node) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Node.Unmarshal(m, b) } func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_Node.Marshal(b, m, deterministic) } func (m *Node) XXX_Merge(src proto.Message) { xxx_messageInfo_Node.Merge(m, src) } func (m *Node) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Node.Size(m) } func (m *Node) XXX_DiscardUnknown() { xxx_messageInfo_Node.DiscardUnknown(m) @@ -291,7 +360,7 @@ func (m *Node) GetCluster() string { return "" } -func (m *Node) GetMetadata() *types.Struct { +func (m *Node) GetMetadata() *_struct.Struct { if m != nil { return m.Metadata } @@ -305,6 +374,7 @@ func (m *Node) GetLocality() *Locality { return nil } +// Deprecated: Do not use. func (m *Node) GetBuildVersion() string { if m != nil { return m.BuildVersion @@ -312,58 +382,104 @@ func (m *Node) GetBuildVersion() string { return "" } -// 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. +func (m *Node) GetUserAgentName() string { + if m != nil { + return m.UserAgentName + } + return "" +} + +type isNode_UserAgentVersionType interface { + isNode_UserAgentVersionType() +} + +type Node_UserAgentVersion struct { + UserAgentVersion string `protobuf:"bytes,7,opt,name=user_agent_version,json=userAgentVersion,proto3,oneof"` +} + +type Node_UserAgentBuildVersion struct { + 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() {} + +func (m *Node) GetUserAgentVersionType() isNode_UserAgentVersionType { + if m != nil { + return m.UserAgentVersionType + } + return nil +} + +func (m *Node) GetUserAgentVersion() string { + if x, ok := m.GetUserAgentVersionType().(*Node_UserAgentVersion); ok { + return x.UserAgentVersion + } + return "" +} + +func (m *Node) GetUserAgentBuildVersion() *BuildVersion { + if x, ok := m.GetUserAgentVersionType().(*Node_UserAgentBuildVersion); ok { + return x.UserAgentBuildVersion + } + return nil +} + +func (m *Node) GetExtensions() []*Extension { + if m != nil { + return m.Extensions + } + return nil +} + +func (m *Node) GetClientFeatures() []string { + if m != nil { + return m.ClientFeatures + } + return nil +} + +func (m *Node) GetListeningAddresses() []*Address { + if m != nil { + return m.ListeningAddresses + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Node) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Node_UserAgentVersion)(nil), + (*Node_UserAgentBuildVersion)(nil), + } +} + type Metadata struct { - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* - // namespace is reserved for Envoy's built-in filters. - FilterMetadata map[string]*types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FilterMetadata map[string]*_struct.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"` + 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_a7738c0f9e1bfff4, []int{2} + return fileDescriptor_a7738c0f9e1bfff4, []int{4} } + func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Metadata.Unmarshal(m, b) } func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) } func (m *Metadata) XXX_Merge(src proto.Message) { xxx_messageInfo_Metadata.Merge(m, src) } func (m *Metadata) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Metadata.Size(m) } func (m *Metadata) XXX_DiscardUnknown() { xxx_messageInfo_Metadata.DiscardUnknown(m) @@ -371,18 +487,15 @@ func (m *Metadata) XXX_DiscardUnknown() { var xxx_messageInfo_Metadata proto.InternalMessageInfo -func (m *Metadata) GetFilterMetadata() map[string]*types.Struct { +func (m *Metadata) GetFilterMetadata() map[string]*_struct.Struct { if m != nil { return m.FilterMetadata } return nil } -// Runtime derived uint32 with a default when not specified. type RuntimeUInt32 struct { - // 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. + DefaultValue uint32 `protobuf:"varint,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` RuntimeKey string `protobuf:"bytes,3,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -393,24 +506,20 @@ func (m *RuntimeUInt32) Reset() { *m = RuntimeUInt32{} } func (m *RuntimeUInt32) String() string { return proto.CompactTextString(m) } func (*RuntimeUInt32) ProtoMessage() {} func (*RuntimeUInt32) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{3} + return fileDescriptor_a7738c0f9e1bfff4, []int{5} } + func (m *RuntimeUInt32) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_RuntimeUInt32.Unmarshal(m, b) } func (m *RuntimeUInt32) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_RuntimeUInt32.Marshal(b, m, deterministic) } func (m *RuntimeUInt32) XXX_Merge(src proto.Message) { xxx_messageInfo_RuntimeUInt32.Merge(m, src) } func (m *RuntimeUInt32) XXX_Size() int { - return m.Size() + return xxx_messageInfo_RuntimeUInt32.Size(m) } func (m *RuntimeUInt32) XXX_DiscardUnknown() { xxx_messageInfo_RuntimeUInt32.DiscardUnknown(m) @@ -432,15 +541,55 @@ func (m *RuntimeUInt32) GetRuntimeKey() string { return "" } -// Header name/value pair. +type RuntimeFeatureFlag struct { + DefaultValue *wrappers.BoolValue `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RuntimeFeatureFlag) Reset() { *m = RuntimeFeatureFlag{} } +func (m *RuntimeFeatureFlag) String() string { return proto.CompactTextString(m) } +func (*RuntimeFeatureFlag) ProtoMessage() {} +func (*RuntimeFeatureFlag) Descriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{6} +} + +func (m *RuntimeFeatureFlag) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RuntimeFeatureFlag.Unmarshal(m, b) +} +func (m *RuntimeFeatureFlag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RuntimeFeatureFlag.Marshal(b, m, deterministic) +} +func (m *RuntimeFeatureFlag) XXX_Merge(src proto.Message) { + xxx_messageInfo_RuntimeFeatureFlag.Merge(m, src) +} +func (m *RuntimeFeatureFlag) XXX_Size() int { + return xxx_messageInfo_RuntimeFeatureFlag.Size(m) +} +func (m *RuntimeFeatureFlag) XXX_DiscardUnknown() { + xxx_messageInfo_RuntimeFeatureFlag.DiscardUnknown(m) +} + +var xxx_messageInfo_RuntimeFeatureFlag proto.InternalMessageInfo + +func (m *RuntimeFeatureFlag) GetDefaultValue() *wrappers.BoolValue { + if m != nil { + return m.DefaultValue + } + return nil +} + +func (m *RuntimeFeatureFlag) GetRuntimeKey() string { + if m != nil { + return m.RuntimeKey + } + return "" +} + type HeaderValue struct { - // 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 `-`. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -451,24 +600,20 @@ func (m *HeaderValue) Reset() { *m = HeaderValue{} } func (m *HeaderValue) String() string { return proto.CompactTextString(m) } func (*HeaderValue) ProtoMessage() {} func (*HeaderValue) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{4} + return fileDescriptor_a7738c0f9e1bfff4, []int{7} } + func (m *HeaderValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HeaderValue.Unmarshal(m, b) } func (m *HeaderValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_HeaderValue.Marshal(b, m, deterministic) } func (m *HeaderValue) XXX_Merge(src proto.Message) { xxx_messageInfo_HeaderValue.Merge(m, src) } func (m *HeaderValue) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HeaderValue.Size(m) } func (m *HeaderValue) XXX_DiscardUnknown() { xxx_messageInfo_HeaderValue.DiscardUnknown(m) @@ -490,40 +635,32 @@ func (m *HeaderValue) GetValue() string { return "" } -// Header name/value pair plus option to control append behavior. type HeaderValueOption struct { - // 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. - Append *types.BoolValue `protobuf:"bytes,2,opt,name=append,proto3" json:"append,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Header *HeaderValue `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Append *wrappers.BoolValue `protobuf:"bytes,2,opt,name=append,proto3" json:"append,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HeaderValueOption) Reset() { *m = HeaderValueOption{} } func (m *HeaderValueOption) String() string { return proto.CompactTextString(m) } func (*HeaderValueOption) ProtoMessage() {} func (*HeaderValueOption) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{5} + return fileDescriptor_a7738c0f9e1bfff4, []int{8} } + func (m *HeaderValueOption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HeaderValueOption.Unmarshal(m, b) } func (m *HeaderValueOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_HeaderValueOption.Marshal(b, m, deterministic) } func (m *HeaderValueOption) XXX_Merge(src proto.Message) { xxx_messageInfo_HeaderValueOption.Merge(m, src) } func (m *HeaderValueOption) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HeaderValueOption.Size(m) } func (m *HeaderValueOption) XXX_DiscardUnknown() { xxx_messageInfo_HeaderValueOption.DiscardUnknown(m) @@ -538,14 +675,13 @@ func (m *HeaderValueOption) GetHeader() *HeaderValue { return nil } -func (m *HeaderValueOption) GetAppend() *types.BoolValue { +func (m *HeaderValueOption) GetAppend() *wrappers.BoolValue { if m != nil { return m.Append } return nil } -// Wrapper for a set of headers. type HeaderMap struct { Headers []*HeaderValue `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -557,24 +693,20 @@ func (m *HeaderMap) Reset() { *m = HeaderMap{} } func (m *HeaderMap) String() string { return proto.CompactTextString(m) } func (*HeaderMap) ProtoMessage() {} func (*HeaderMap) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{6} + return fileDescriptor_a7738c0f9e1bfff4, []int{9} } + func (m *HeaderMap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HeaderMap.Unmarshal(m, b) } func (m *HeaderMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_HeaderMap.Marshal(b, m, deterministic) } func (m *HeaderMap) XXX_Merge(src proto.Message) { xxx_messageInfo_HeaderMap.Merge(m, src) } func (m *HeaderMap) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HeaderMap.Size(m) } func (m *HeaderMap) XXX_DiscardUnknown() { xxx_messageInfo_HeaderMap.DiscardUnknown(m) @@ -589,7 +721,6 @@ func (m *HeaderMap) GetHeaders() []*HeaderValue { return nil } -// Data source consisting of either a file or an inline value. type DataSource struct { // Types that are valid to be assigned to Specifier: // *DataSource_Filename @@ -605,24 +736,20 @@ func (m *DataSource) Reset() { *m = DataSource{} } func (m *DataSource) String() string { return proto.CompactTextString(m) } func (*DataSource) ProtoMessage() {} func (*DataSource) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{7} + return fileDescriptor_a7738c0f9e1bfff4, []int{10} } + func (m *DataSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DataSource.Unmarshal(m, b) } func (m *DataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_DataSource.Marshal(b, m, deterministic) } func (m *DataSource) XXX_Merge(src proto.Message) { xxx_messageInfo_DataSource.Merge(m, src) } func (m *DataSource) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DataSource.Size(m) } func (m *DataSource) XXX_DiscardUnknown() { xxx_messageInfo_DataSource.DiscardUnknown(m) @@ -632,23 +759,24 @@ var xxx_messageInfo_DataSource proto.InternalMessageInfo type isDataSource_Specifier interface { isDataSource_Specifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type DataSource_Filename struct { Filename string `protobuf:"bytes,1,opt,name=filename,proto3,oneof"` } + type DataSource_InlineBytes struct { InlineBytes []byte `protobuf:"bytes,2,opt,name=inline_bytes,json=inlineBytes,proto3,oneof"` } + type DataSource_InlineString struct { InlineString string `protobuf:"bytes,3,opt,name=inline_string,json=inlineString,proto3,oneof"` } -func (*DataSource_Filename) isDataSource_Specifier() {} -func (*DataSource_InlineBytes) isDataSource_Specifier() {} +func (*DataSource_Filename) isDataSource_Specifier() {} + +func (*DataSource_InlineBytes) isDataSource_Specifier() {} + func (*DataSource_InlineString) isDataSource_Specifier() {} func (m *DataSource) GetSpecifier() isDataSource_Specifier { @@ -679,98 +807,199 @@ func (m *DataSource) GetInlineString() string { return "" } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*DataSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _DataSource_OneofMarshaler, _DataSource_OneofUnmarshaler, _DataSource_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*DataSource) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*DataSource_Filename)(nil), (*DataSource_InlineBytes)(nil), (*DataSource_InlineString)(nil), } } -func _DataSource_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*DataSource) - // specifier - switch x := m.Specifier.(type) { - case *DataSource_Filename: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Filename) - case *DataSource_InlineBytes: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.InlineBytes) - case *DataSource_InlineString: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.InlineString) - case nil: - default: - return fmt.Errorf("DataSource.Specifier has unexpected type %T", x) +type RetryPolicy struct { + RetryBackOff *BackoffStrategy `protobuf:"bytes,1,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` + NumRetries *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryPolicy) Reset() { *m = RetryPolicy{} } +func (m *RetryPolicy) String() string { return proto.CompactTextString(m) } +func (*RetryPolicy) ProtoMessage() {} +func (*RetryPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{11} +} + +func (m *RetryPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetryPolicy.Unmarshal(m, b) +} +func (m *RetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetryPolicy.Marshal(b, m, deterministic) +} +func (m *RetryPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicy.Merge(m, src) +} +func (m *RetryPolicy) XXX_Size() int { + return xxx_messageInfo_RetryPolicy.Size(m) +} +func (m *RetryPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_RetryPolicy proto.InternalMessageInfo + +func (m *RetryPolicy) GetRetryBackOff() *BackoffStrategy { + if m != nil { + return m.RetryBackOff } return nil } -func _DataSource_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*DataSource) - switch tag { - case 1: // specifier.filename - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Specifier = &DataSource_Filename{x} - return true, err - case 2: // specifier.inline_bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Specifier = &DataSource_InlineBytes{x} - return true, err - case 3: // specifier.inline_string - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Specifier = &DataSource_InlineString{x} - return true, err - default: - return false, nil +func (m *RetryPolicy) GetNumRetries() *wrappers.UInt32Value { + if m != nil { + return m.NumRetries + } + return nil +} + +type RemoteDataSource struct { + HttpUri *HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` + Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"` + RetryPolicy *RetryPolicy `protobuf:"bytes,3,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoteDataSource) Reset() { *m = RemoteDataSource{} } +func (m *RemoteDataSource) String() string { return proto.CompactTextString(m) } +func (*RemoteDataSource) ProtoMessage() {} +func (*RemoteDataSource) Descriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{12} +} + +func (m *RemoteDataSource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RemoteDataSource.Unmarshal(m, b) +} +func (m *RemoteDataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RemoteDataSource.Marshal(b, m, deterministic) +} +func (m *RemoteDataSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoteDataSource.Merge(m, src) +} +func (m *RemoteDataSource) XXX_Size() int { + return xxx_messageInfo_RemoteDataSource.Size(m) +} +func (m *RemoteDataSource) XXX_DiscardUnknown() { + xxx_messageInfo_RemoteDataSource.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoteDataSource proto.InternalMessageInfo + +func (m *RemoteDataSource) GetHttpUri() *HttpUri { + if m != nil { + return m.HttpUri + } + return nil +} + +func (m *RemoteDataSource) GetSha256() string { + if m != nil { + return m.Sha256 + } + return "" +} + +func (m *RemoteDataSource) GetRetryPolicy() *RetryPolicy { + if m != nil { + return m.RetryPolicy + } + return nil +} + +type AsyncDataSource struct { + // Types that are valid to be assigned to Specifier: + // *AsyncDataSource_Local + // *AsyncDataSource_Remote + Specifier isAsyncDataSource_Specifier `protobuf_oneof:"specifier"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AsyncDataSource) Reset() { *m = AsyncDataSource{} } +func (m *AsyncDataSource) String() string { return proto.CompactTextString(m) } +func (*AsyncDataSource) ProtoMessage() {} +func (*AsyncDataSource) Descriptor() ([]byte, []int) { + return fileDescriptor_a7738c0f9e1bfff4, []int{13} +} + +func (m *AsyncDataSource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AsyncDataSource.Unmarshal(m, b) +} +func (m *AsyncDataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AsyncDataSource.Marshal(b, m, deterministic) +} +func (m *AsyncDataSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_AsyncDataSource.Merge(m, src) +} +func (m *AsyncDataSource) XXX_Size() int { + return xxx_messageInfo_AsyncDataSource.Size(m) +} +func (m *AsyncDataSource) XXX_DiscardUnknown() { + xxx_messageInfo_AsyncDataSource.DiscardUnknown(m) +} + +var xxx_messageInfo_AsyncDataSource proto.InternalMessageInfo + +type isAsyncDataSource_Specifier interface { + isAsyncDataSource_Specifier() +} + +type AsyncDataSource_Local struct { + Local *DataSource `protobuf:"bytes,1,opt,name=local,proto3,oneof"` +} + +type AsyncDataSource_Remote struct { + Remote *RemoteDataSource `protobuf:"bytes,2,opt,name=remote,proto3,oneof"` +} + +func (*AsyncDataSource_Local) isAsyncDataSource_Specifier() {} + +func (*AsyncDataSource_Remote) isAsyncDataSource_Specifier() {} + +func (m *AsyncDataSource) GetSpecifier() isAsyncDataSource_Specifier { + if m != nil { + return m.Specifier + } + return nil +} + +func (m *AsyncDataSource) GetLocal() *DataSource { + if x, ok := m.GetSpecifier().(*AsyncDataSource_Local); ok { + return x.Local + } + return nil +} + +func (m *AsyncDataSource) GetRemote() *RemoteDataSource { + if x, ok := m.GetSpecifier().(*AsyncDataSource_Remote); ok { + return x.Remote + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AsyncDataSource) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*AsyncDataSource_Local)(nil), + (*AsyncDataSource_Remote)(nil), } } -func _DataSource_OneofSizer(msg proto.Message) (n int) { - m := msg.(*DataSource) - // specifier - switch x := m.Specifier.(type) { - case *DataSource_Filename: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Filename))) - n += len(x.Filename) - case *DataSource_InlineBytes: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.InlineBytes))) - n += len(x.InlineBytes) - case *DataSource_InlineString: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.InlineString))) - n += len(x.InlineString) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// 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 { - // 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 valid to be assigned to ConfigType: // *TransportSocket_Config // *TransportSocket_TypedConfig @@ -784,24 +1013,20 @@ func (m *TransportSocket) Reset() { *m = TransportSocket{} } func (m *TransportSocket) String() string { return proto.CompactTextString(m) } func (*TransportSocket) ProtoMessage() {} func (*TransportSocket) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{8} + return fileDescriptor_a7738c0f9e1bfff4, []int{14} } + func (m *TransportSocket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TransportSocket.Unmarshal(m, b) } func (m *TransportSocket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_TransportSocket.Marshal(b, m, deterministic) } func (m *TransportSocket) XXX_Merge(src proto.Message) { xxx_messageInfo_TransportSocket.Merge(m, src) } func (m *TransportSocket) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TransportSocket.Size(m) } func (m *TransportSocket) XXX_DiscardUnknown() { xxx_messageInfo_TransportSocket.DiscardUnknown(m) @@ -809,21 +1034,27 @@ func (m *TransportSocket) XXX_DiscardUnknown() { var xxx_messageInfo_TransportSocket proto.InternalMessageInfo +func (m *TransportSocket) GetName() string { + if m != nil { + return m.Name + } + return "" +} + type isTransportSocket_ConfigType interface { isTransportSocket_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type TransportSocket_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type TransportSocket_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` } -func (*TransportSocket_Config) isTransportSocket_ConfigType() {} +type TransportSocket_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*TransportSocket_Config) isTransportSocket_ConfigType() {} + func (*TransportSocket_TypedConfig) isTransportSocket_ConfigType() {} func (m *TransportSocket) GetConfigType() isTransportSocket_ConfigType { @@ -833,317 +1064,55 @@ func (m *TransportSocket) GetConfigType() isTransportSocket_ConfigType { return nil } -func (m *TransportSocket) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TransportSocket) GetConfig() *types.Struct { +// Deprecated: Do not use. +func (m *TransportSocket) GetConfig() *_struct.Struct { if x, ok := m.GetConfigType().(*TransportSocket_Config); ok { return x.Config } return nil } -func (m *TransportSocket) GetTypedConfig() *types.Any { +func (m *TransportSocket) GetTypedConfig() *any.Any { if x, ok := m.GetConfigType().(*TransportSocket_TypedConfig); ok { return x.TypedConfig } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TransportSocket) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _TransportSocket_OneofMarshaler, _TransportSocket_OneofUnmarshaler, _TransportSocket_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TransportSocket) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*TransportSocket_Config)(nil), (*TransportSocket_TypedConfig)(nil), } } -func _TransportSocket_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TransportSocket) - // config_type - switch x := m.ConfigType.(type) { - case *TransportSocket_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *TransportSocket_TypedConfig: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TransportSocket.ConfigType has unexpected type %T", x) - } - return nil -} - -func _TransportSocket_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TransportSocket) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &TransportSocket_Config{msg} - return true, err - case 3: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &TransportSocket_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _TransportSocket_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TransportSocket) - // config_type - switch x := m.ConfigType.(type) { - case *TransportSocket_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *TransportSocket_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Generic socket option message. This would be used to set socket options that -// might not exist in upstream kernels or precompiled Envoy binaries. -type SocketOption struct { - // 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 valid to be assigned 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.api.v2.core.SocketOption_SocketState" json:"state,omitempty"` +type RuntimeFractionalPercent struct { + DefaultValue *_type.FractionalPercent `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *SocketOption) Reset() { *m = SocketOption{} } -func (m *SocketOption) String() string { return proto.CompactTextString(m) } -func (*SocketOption) ProtoMessage() {} -func (*SocketOption) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{9} -} -func (m *SocketOption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SocketOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SocketOption) XXX_Merge(src proto.Message) { - xxx_messageInfo_SocketOption.Merge(m, src) -} -func (m *SocketOption) XXX_Size() int { - return m.Size() -} -func (m *SocketOption) XXX_DiscardUnknown() { - xxx_messageInfo_SocketOption.DiscardUnknown(m) -} - -var xxx_messageInfo_SocketOption proto.InternalMessageInfo - -type isSocketOption_Value interface { - isSocketOption_Value() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type SocketOption_IntValue struct { - IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3,oneof"` -} -type SocketOption_BufValue struct { - BufValue []byte `protobuf:"bytes,5,opt,name=buf_value,json=bufValue,proto3,oneof"` -} - -func (*SocketOption_IntValue) isSocketOption_Value() {} -func (*SocketOption_BufValue) isSocketOption_Value() {} - -func (m *SocketOption) GetValue() isSocketOption_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *SocketOption) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *SocketOption) GetLevel() int64 { - if m != nil { - return m.Level - } - return 0 -} - -func (m *SocketOption) GetName() int64 { - if m != nil { - return m.Name - } - return 0 -} - -func (m *SocketOption) GetIntValue() int64 { - if x, ok := m.GetValue().(*SocketOption_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (m *SocketOption) GetBufValue() []byte { - if x, ok := m.GetValue().(*SocketOption_BufValue); ok { - return x.BufValue - } - return nil -} - -func (m *SocketOption) GetState() SocketOption_SocketState { - if m != nil { - return m.State - } - return STATE_PREBIND -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*SocketOption) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _SocketOption_OneofMarshaler, _SocketOption_OneofUnmarshaler, _SocketOption_OneofSizer, []interface{}{ - (*SocketOption_IntValue)(nil), - (*SocketOption_BufValue)(nil), - } -} - -func _SocketOption_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*SocketOption) - // value - switch x := m.Value.(type) { - case *SocketOption_IntValue: - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.IntValue)) - case *SocketOption_BufValue: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.BufValue) - case nil: - default: - return fmt.Errorf("SocketOption.Value has unexpected type %T", x) - } - return nil -} - -func _SocketOption_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*SocketOption) - switch tag { - case 4: // value.int_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Value = &SocketOption_IntValue{int64(x)} - return true, err - case 5: // value.buf_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Value = &SocketOption_BufValue{x} - return true, err - default: - return false, nil - } -} - -func _SocketOption_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SocketOption) - // value - switch x := m.Value.(type) { - case *SocketOption_IntValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.IntValue)) - case *SocketOption_BufValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.BufValue))) - n += len(x.BufValue) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not -// specified via a runtime key. -type RuntimeFractionalPercent struct { - // Default value if the runtime value's for the numerator/denominator keys are not available. - DefaultValue *_type.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - func (m *RuntimeFractionalPercent) Reset() { *m = RuntimeFractionalPercent{} } func (m *RuntimeFractionalPercent) String() string { return proto.CompactTextString(m) } func (*RuntimeFractionalPercent) ProtoMessage() {} func (*RuntimeFractionalPercent) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{10} + return fileDescriptor_a7738c0f9e1bfff4, []int{15} } + func (m *RuntimeFractionalPercent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_RuntimeFractionalPercent.Unmarshal(m, b) } func (m *RuntimeFractionalPercent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_RuntimeFractionalPercent.Marshal(b, m, deterministic) } func (m *RuntimeFractionalPercent) XXX_Merge(src proto.Message) { xxx_messageInfo_RuntimeFractionalPercent.Merge(m, src) } func (m *RuntimeFractionalPercent) XXX_Size() int { - return m.Size() + return xxx_messageInfo_RuntimeFractionalPercent.Size(m) } func (m *RuntimeFractionalPercent) XXX_DiscardUnknown() { xxx_messageInfo_RuntimeFractionalPercent.DiscardUnknown(m) @@ -1165,11 +1134,7 @@ func (m *RuntimeFractionalPercent) GetRuntimeKey() string { return "" } -// Identifies a specific ControlPlane instance that Envoy is connected to. type ControlPlane struct { - // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1180,24 +1145,20 @@ func (m *ControlPlane) Reset() { *m = ControlPlane{} } func (m *ControlPlane) String() string { return proto.CompactTextString(m) } func (*ControlPlane) ProtoMessage() {} func (*ControlPlane) Descriptor() ([]byte, []int) { - return fileDescriptor_a7738c0f9e1bfff4, []int{11} + return fileDescriptor_a7738c0f9e1bfff4, []int{16} } + func (m *ControlPlane) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ControlPlane.Unmarshal(m, b) } func (m *ControlPlane) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_ControlPlane.Marshal(b, m, deterministic) } func (m *ControlPlane) XXX_Merge(src proto.Message) { xxx_messageInfo_ControlPlane.Merge(m, src) } func (m *ControlPlane) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ControlPlane.Size(m) } func (m *ControlPlane) XXX_DiscardUnknown() { xxx_messageInfo_ControlPlane.DiscardUnknown(m) @@ -1215,18 +1176,23 @@ func (m *ControlPlane) GetIdentifier() string { func init() { proto.RegisterEnum("envoy.api.v2.core.RoutingPriority", RoutingPriority_name, RoutingPriority_value) proto.RegisterEnum("envoy.api.v2.core.RequestMethod", RequestMethod_name, RequestMethod_value) - proto.RegisterEnum("envoy.api.v2.core.SocketOption_SocketState", SocketOption_SocketState_name, SocketOption_SocketState_value) + proto.RegisterEnum("envoy.api.v2.core.TrafficDirection", TrafficDirection_name, TrafficDirection_value) proto.RegisterType((*Locality)(nil), "envoy.api.v2.core.Locality") + proto.RegisterType((*BuildVersion)(nil), "envoy.api.v2.core.BuildVersion") + proto.RegisterType((*Extension)(nil), "envoy.api.v2.core.Extension") proto.RegisterType((*Node)(nil), "envoy.api.v2.core.Node") proto.RegisterType((*Metadata)(nil), "envoy.api.v2.core.Metadata") - proto.RegisterMapType((map[string]*types.Struct)(nil), "envoy.api.v2.core.Metadata.FilterMetadataEntry") + proto.RegisterMapType((map[string]*_struct.Struct)(nil), "envoy.api.v2.core.Metadata.FilterMetadataEntry") proto.RegisterType((*RuntimeUInt32)(nil), "envoy.api.v2.core.RuntimeUInt32") + proto.RegisterType((*RuntimeFeatureFlag)(nil), "envoy.api.v2.core.RuntimeFeatureFlag") proto.RegisterType((*HeaderValue)(nil), "envoy.api.v2.core.HeaderValue") proto.RegisterType((*HeaderValueOption)(nil), "envoy.api.v2.core.HeaderValueOption") proto.RegisterType((*HeaderMap)(nil), "envoy.api.v2.core.HeaderMap") proto.RegisterType((*DataSource)(nil), "envoy.api.v2.core.DataSource") + proto.RegisterType((*RetryPolicy)(nil), "envoy.api.v2.core.RetryPolicy") + proto.RegisterType((*RemoteDataSource)(nil), "envoy.api.v2.core.RemoteDataSource") + proto.RegisterType((*AsyncDataSource)(nil), "envoy.api.v2.core.AsyncDataSource") proto.RegisterType((*TransportSocket)(nil), "envoy.api.v2.core.TransportSocket") - proto.RegisterType((*SocketOption)(nil), "envoy.api.v2.core.SocketOption") proto.RegisterType((*RuntimeFractionalPercent)(nil), "envoy.api.v2.core.RuntimeFractionalPercent") proto.RegisterType((*ControlPlane)(nil), "envoy.api.v2.core.ControlPlane") } @@ -1234,3349 +1200,105 @@ func init() { func init() { proto.RegisterFile("envoy/api/v2/core/base.proto", fileDescriptor_a7738c0f9e1bfff4) } var fileDescriptor_a7738c0f9e1bfff4 = []byte{ - // 1163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xf8, 0x2b, 0xf6, 0xb3, 0x9d, 0x6c, 0xa7, 0x51, 0xeb, 0x86, 0xc6, 0x0d, 0xe6, 0x40, - 0x54, 0xc4, 0x1a, 0xdc, 0x03, 0x85, 0x5b, 0x36, 0xde, 0xd4, 0x16, 0x89, 0xed, 0xae, 0x37, 0x05, - 0xf5, 0x62, 0xd6, 0xde, 0xb1, 0xbb, 0xea, 0x76, 0x67, 0x99, 0x9d, 0x35, 0xb8, 0xa7, 0x0a, 0x71, - 0x40, 0xf4, 0xcf, 0xe0, 0x82, 0x84, 0xb8, 0x23, 0x4e, 0x95, 0xb8, 0x70, 0x83, 0x23, 0x47, 0x94, - 0x5b, 0xff, 0x0b, 0x34, 0x1f, 0x4e, 0x9d, 0x0f, 0xd1, 0xdb, 0xcc, 0xef, 0xfd, 0x7e, 0x6f, 0xdf, - 0x7b, 0xf3, 0xde, 0x5b, 0xb8, 0x4d, 0xa2, 0x39, 0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, 0xb4, 0xf5, 0x73, 0xb2, 0x68, 0x3c, 0x84, 0x72, 0x87, - 0x78, 0x3e, 0x61, 0x4a, 0x7a, 0x67, 0x25, 0x6a, 0xab, 0x2a, 0x24, 0x45, 0x56, 0xd8, 0x45, 0x7b, - 0x2f, 0x5e, 0x20, 0x95, 0xc4, 0xbb, 0xab, 0x49, 0x94, 0xac, 0xb2, 0xa0, 0x14, 0x58, 0x4e, 0x12, - 0x94, 0xa5, 0xf1, 0x12, 0xc1, 0xb5, 0x15, 0x9f, 0xfd, 0x98, 0x8b, 0x16, 0xb4, 0xa0, 0xf0, 0x44, - 0x82, 0xd2, 0x79, 0xb9, 0x55, 0xbf, 0xa2, 0xee, 0x2b, 0x2a, 0x0b, 0x84, 0xe7, 0xfc, 0x8f, 0x28, - 0x63, 0x20, 0x47, 0x2b, 0x71, 0x0b, 0x0a, 0x62, 0x86, 0x22, 0x5f, 0x97, 0x70, 0xfb, 0x52, 0x09, - 0x2d, 0x4a, 0x43, 0xa9, 0x77, 0x34, 0xb3, 0x61, 0x43, 0x49, 0xb9, 0x3d, 0xf6, 0x62, 0x7c, 0x1f, - 0xd6, 0x95, 0xab, 0x44, 0xbf, 0xfe, 0x5b, 0xa2, 0x70, 0x96, 0xf4, 0xc6, 0x2f, 0x08, 0xa0, 0xed, - 0x71, 0x6f, 0x48, 0x53, 0x36, 0x21, 0xf8, 0x7d, 0x28, 0x4e, 0x83, 0x90, 0x44, 0xde, 0x33, 0xa2, - 0x8b, 0xf5, 0xa6, 0xbe, 0x9d, 0x35, 0xe7, 0xcc, 0x88, 0x4d, 0xa8, 0x04, 0x51, 0x18, 0x44, 0x64, - 0x34, 0x5e, 0x70, 0x92, 0xc8, 0xc0, 0x2b, 0x9a, 0xfc, 0x3c, 0x63, 0x08, 0x72, 0x59, 0x11, 0x2c, - 0x61, 0xc7, 0x1f, 0x41, 0x55, 0xf3, 0x13, 0xce, 0x82, 0x68, 0x76, 0xe9, 0xf5, 0x3a, 0x6b, 0x8e, - 0xf6, 0x38, 0x94, 0x04, 0x0b, 0x43, 0x29, 0x89, 0xc9, 0x24, 0x98, 0x06, 0x84, 0xe1, 0xfc, 0x6f, - 0xaf, 0x5f, 0x65, 0x51, 0xe3, 0x57, 0x04, 0x9b, 0x2e, 0xf3, 0xa2, 0x24, 0xa6, 0x8c, 0x0f, 0xe9, - 0xe4, 0x29, 0xe1, 0x78, 0x07, 0x72, 0x57, 0x86, 0xeb, 0x48, 0x18, 0x7f, 0x0c, 0x85, 0x09, 0x8d, - 0xa6, 0xc1, 0xec, 0x2d, 0xed, 0xd9, 0x59, 0x73, 0x34, 0x11, 0x7f, 0x0a, 0x15, 0xb1, 0x8f, 0xfc, - 0x91, 0x16, 0xaa, 0xb9, 0xdf, 0xba, 0x24, 0xdc, 0x8f, 0x16, 0x22, 0x4d, 0xc9, 0x3d, 0x90, 0x54, - 0xab, 0x0a, 0x65, 0x25, 0x1a, 0x09, 0xb4, 0xf1, 0x57, 0x06, 0x2a, 0x2a, 0x4c, 0xdd, 0x2d, 0xbb, - 0x50, 0xf6, 0x49, 0x32, 0x61, 0x81, 0xbc, 0xea, 0x29, 0x5a, 0x85, 0xf0, 0x16, 0xe4, 0x43, 0x32, - 0x27, 0xa1, 0x0c, 0x37, 0xeb, 0xa8, 0x8b, 0x58, 0x74, 0x32, 0xc9, 0xac, 0x04, 0x55, 0x66, 0x3b, - 0x50, 0x0a, 0xa2, 0xe5, 0xbc, 0x88, 0x35, 0x93, 0x15, 0x2f, 0x14, 0x44, 0x7a, 0x5a, 0x76, 0xa0, - 0x34, 0x4e, 0xa7, 0xda, 0x2c, 0xf6, 0x48, 0x45, 0x98, 0xc7, 0xe9, 0x54, 0x99, 0xbf, 0x80, 0x7c, - 0xc2, 0x3d, 0x4e, 0x6a, 0x62, 0x0c, 0x36, 0x5a, 0x1f, 0x5c, 0xd1, 0x30, 0xab, 0x91, 0xeb, 0xcb, - 0x50, 0x48, 0xac, 0xad, 0x37, 0x3d, 0x2c, 0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xdb, 0xed, 0xf4, - 0xdb, 0xa3, 0x93, 0xde, 0x70, 0x60, 0x1f, 0x74, 0x0f, 0xbb, 0xb6, 0xa8, 0xe6, 0x3a, 0x64, 0x1f, - 0xd8, 0xae, 0x81, 0xa4, 0xd8, 0xde, 0x6f, 0x1b, 0x19, 0x71, 0x1a, 0xf4, 0x87, 0xae, 0x91, 0x15, - 0xc6, 0xc1, 0x89, 0x6b, 0xe4, 0x30, 0x40, 0xa1, 0x6d, 0x1f, 0xd9, 0xae, 0x6d, 0xe4, 0xc5, 0x27, - 0x0f, 0xfa, 0xbd, 0x9e, 0x7d, 0xe0, 0x1a, 0x05, 0x71, 0xe9, 0x0f, 0xdc, 0x6e, 0xbf, 0x37, 0x34, - 0xd6, 0x71, 0x09, 0xf2, 0xae, 0xb3, 0x7f, 0x60, 0x1b, 0x45, 0x5d, 0xfe, 0xce, 0xcf, 0xa7, 0x75, - 0xf4, 0xe7, 0x69, 0x1d, 0xfd, 0x7d, 0x5a, 0x47, 0xff, 0x9c, 0xd6, 0xd1, 0xbf, 0xa7, 0x75, 0x04, - 0x77, 0x02, 0xaa, 0x4a, 0x1a, 0x33, 0xfa, 0xed, 0xe2, 0x72, 0xe7, 0x58, 0x25, 0xcb, 0x4b, 0xc8, - 0x40, 0xcc, 0xc9, 0x00, 0x3d, 0xce, 0x09, 0x68, 0x5c, 0x90, 0x63, 0x73, 0xef, 0xbf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xd2, 0xc9, 0x64, 0xea, 0xaa, 0x08, 0x00, 0x00, + // 1593 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4b, 0x6f, 0x1b, 0xc9, + 0x11, 0xe6, 0x50, 0x12, 0x1f, 0x45, 0x4a, 0x9a, 0xed, 0xdd, 0xd8, 0xb4, 0xfc, 0x90, 0x42, 0xc3, + 0x59, 0xc1, 0x48, 0x48, 0x40, 0x86, 0x93, 0xdd, 0x20, 0x9b, 0x84, 0x23, 0x52, 0x4b, 0x61, 0x6d, + 0x91, 0x19, 0x52, 0x8b, 0xc4, 0x87, 0x0c, 0x9a, 0x33, 0x4d, 0xaa, 0xe1, 0xd1, 0xf4, 0xa4, 0xa7, + 0x47, 0x59, 0xfa, 0xe4, 0xab, 0x73, 0xc9, 0x2d, 0x48, 0xce, 0xf9, 0x01, 0x39, 0x06, 0x48, 0x2e, + 0x7b, 0x5c, 0xe4, 0x96, 0xbf, 0x92, 0x53, 0xe0, 0x43, 0x10, 0xf4, 0x63, 0xc8, 0x91, 0x48, 0xaf, + 0xf7, 0x36, 0x5d, 0xf5, 0x55, 0x75, 0xd5, 0x57, 0x35, 0xd5, 0x05, 0xf7, 0x48, 0x74, 0xc5, 0xe6, + 0x6d, 0x1c, 0xd3, 0xf6, 0xd5, 0x51, 0xdb, 0x67, 0x9c, 0xb4, 0x27, 0x38, 0x21, 0xad, 0x98, 0x33, + 0xc1, 0xd0, 0x07, 0x4a, 0xdb, 0xc2, 0x31, 0x6d, 0x5d, 0x1d, 0xb5, 0xa4, 0x76, 0x6f, 0x7f, 0xd5, + 0x00, 0x07, 0x01, 0x27, 0x49, 0xa2, 0x6d, 0xd6, 0x01, 0x26, 0xd8, 0x7f, 0xc9, 0xa6, 0x53, 0x03, + 0x38, 0x58, 0x05, 0x5c, 0x08, 0x11, 0x7b, 0x29, 0xa7, 0x06, 0xd1, 0xd0, 0x08, 0x31, 0x8f, 0x49, + 0x3b, 0x26, 0xdc, 0x27, 0x91, 0x30, 0x9a, 0xef, 0xe7, 0x34, 0x09, 0xb9, 0xc4, 0x91, 0xa0, 0xbe, + 0x77, 0x45, 0x78, 0x42, 0x59, 0x64, 0x20, 0x77, 0x66, 0x8c, 0xcd, 0x42, 0xd2, 0x56, 0xa7, 0x49, + 0x3a, 0x6d, 0xe3, 0x68, 0x6e, 0x54, 0x0f, 0x6e, 0xaa, 0x82, 0x94, 0x63, 0xb1, 0x34, 0xbd, 0x77, + 0x53, 0x9f, 0x08, 0x9e, 0xfa, 0xe2, 0x5d, 0xd6, 0xbf, 0xe7, 0x38, 0x8e, 0x09, 0xcf, 0x12, 0x7f, + 0x90, 0x06, 0x31, 0x6e, 0xe3, 0x28, 0x62, 0x42, 0x39, 0x4d, 0xda, 0x97, 0x74, 0xc6, 0xb1, 0x30, + 0x64, 0xee, 0xdd, 0x5f, 0xd1, 0x27, 0x02, 0x8b, 0x34, 0x33, 0xbf, 0x7d, 0x85, 0x43, 0x1a, 0x60, + 0x41, 0xda, 0xd9, 0x87, 0x51, 0x3c, 0x5a, 0xe5, 0x2b, 0x61, 0xfe, 0x4b, 0x22, 0x3c, 0x16, 0x2f, + 0x83, 0x6f, 0xfe, 0x0a, 0x2a, 0xcf, 0x98, 0x8f, 0x43, 0x2a, 0xe6, 0xe8, 0x16, 0x94, 0x38, 0x99, + 0x51, 0x16, 0x35, 0xac, 0x03, 0xeb, 0xb0, 0xea, 0x9a, 0x13, 0x42, 0xb0, 0xf9, 0x8a, 0x45, 0xa4, + 0x51, 0x54, 0x52, 0xf5, 0x8d, 0xee, 0x40, 0x25, 0x49, 0x27, 0x9e, 0x92, 0x6f, 0x28, 0x79, 0x39, + 0x49, 0x27, 0x2f, 0x58, 0x44, 0x9a, 0xaf, 0xa0, 0xee, 0xa4, 0x34, 0x0c, 0xbe, 0xd4, 0x04, 0xa3, + 0xa7, 0x50, 0x36, 0x5c, 0x2b, 0xbf, 0xb5, 0xa3, 0xbb, 0x2d, 0xdd, 0x20, 0xb2, 0x1e, 0xad, 0x91, + 0xa9, 0x87, 0x41, 0xbb, 0x19, 0x16, 0x3d, 0x81, 0xca, 0x25, 0x11, 0x38, 0xc0, 0x02, 0xab, 0x9b, + 0x6b, 0x47, 0xb7, 0x5b, 0x9a, 0xcb, 0x56, 0xc6, 0x65, 0x6b, 0xa4, 0x98, 0x76, 0x17, 0xc0, 0xe6, + 0x3f, 0x2d, 0xa8, 0xf6, 0xbe,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ca, 0x89, 0xe2, 0x0e, 0xed, 0x42, 0xed, + 0x7a, 0x18, 0x35, 0x28, 0x9f, 0x9e, 0x39, 0x83, 0xf3, 0xb3, 0xae, 0x6d, 0xa1, 0x3a, 0x54, 0x06, + 0xe7, 0x63, 0x7d, 0x2a, 0x3a, 0xee, 0x7f, 0xfe, 0xfc, 0xbf, 0x3f, 0x6e, 0xdd, 0x42, 0x1f, 0xe9, + 0x22, 0xe8, 0x62, 0xea, 0x5e, 0xbd, 0x7a, 0xf2, 0x8f, 0xd7, 0xdf, 0xfc, 0xbb, 0x54, 0xb4, 0x2d, + 0xd8, 0xa7, 0x4c, 0x57, 0x29, 0xe6, 0xec, 0xab, 0xf9, 0x6a, 0x5f, 0x3b, 0x55, 0x07, 0x27, 0x64, + 0x28, 0x1b, 0x65, 0x68, 0x0d, 0xeb, 0x93, 0x92, 0xea, 0x99, 0x27, 0xff, 0x0f, 0x00, 0x00, 0xff, + 0xff, 0xf7, 0x8b, 0xc8, 0x9a, 0xd8, 0x0d, 0x00, 0x00, } - -func (this *Locality) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Locality) - if !ok { - that2, ok := that.(Locality) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Region != that1.Region { - return false - } - if this.Zone != that1.Zone { - return false - } - if this.SubZone != that1.SubZone { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Node) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Id != that1.Id { - return false - } - if this.Cluster != that1.Cluster { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !this.Locality.Equal(that1.Locality) { - return false - } - if this.BuildVersion != that1.BuildVersion { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Metadata) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Metadata) - if !ok { - that2, ok := that.(Metadata) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.FilterMetadata) != len(that1.FilterMetadata) { - return false - } - for i := range this.FilterMetadata { - if !this.FilterMetadata[i].Equal(that1.FilterMetadata[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RuntimeUInt32) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RuntimeUInt32) - if !ok { - that2, ok := that.(RuntimeUInt32) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DefaultValue != that1.DefaultValue { - return false - } - if this.RuntimeKey != that1.RuntimeKey { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HeaderValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderValue) - if !ok { - that2, ok := that.(HeaderValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Key != that1.Key { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HeaderValueOption) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderValueOption) - if !ok { - that2, ok := that.(HeaderValueOption) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Header.Equal(that1.Header) { - return false - } - if !this.Append.Equal(that1.Append) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HeaderMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMap) - if !ok { - that2, ok := that.(HeaderMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Headers) != len(that1.Headers) { - return false - } - for i := range this.Headers { - if !this.Headers[i].Equal(that1.Headers[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DataSource) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DataSource) - if !ok { - that2, ok := that.(DataSource) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Specifier == nil { - if this.Specifier != nil { - return false - } - } else if this.Specifier == nil { - return false - } else if !this.Specifier.Equal(that1.Specifier) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DataSource_Filename) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DataSource_Filename) - if !ok { - that2, ok := that.(DataSource_Filename) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Filename != that1.Filename { - return false - } - return true -} -func (this *DataSource_InlineBytes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DataSource_InlineBytes) - if !ok { - that2, ok := that.(DataSource_InlineBytes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.InlineBytes, that1.InlineBytes) { - return false - } - return true -} -func (this *DataSource_InlineString) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DataSource_InlineString) - if !ok { - that2, ok := that.(DataSource_InlineString) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.InlineString != that1.InlineString { - return false - } - return true -} -func (this *TransportSocket) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TransportSocket) - if !ok { - that2, ok := that.(TransportSocket) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TransportSocket_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TransportSocket_Config) - if !ok { - that2, ok := that.(TransportSocket_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *TransportSocket_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TransportSocket_TypedConfig) - if !ok { - that2, ok := that.(TransportSocket_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (this *SocketOption) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SocketOption) - if !ok { - that2, ok := that.(SocketOption) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Description != that1.Description { - return false - } - if this.Level != that1.Level { - return false - } - if this.Name != that1.Name { - return false - } - if that1.Value == nil { - if this.Value != nil { - return false - } - } else if this.Value == nil { - return false - } else if !this.Value.Equal(that1.Value) { - return false - } - if this.State != that1.State { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *SocketOption_IntValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SocketOption_IntValue) - if !ok { - that2, ok := that.(SocketOption_IntValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.IntValue != that1.IntValue { - return false - } - return true -} -func (this *SocketOption_BufValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SocketOption_BufValue) - if !ok { - that2, ok := that.(SocketOption_BufValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.BufValue, that1.BufValue) { - return false - } - return true -} -func (this *RuntimeFractionalPercent) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RuntimeFractionalPercent) - if !ok { - that2, ok := that.(RuntimeFractionalPercent) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.DefaultValue.Equal(that1.DefaultValue) { - return false - } - if this.RuntimeKey != that1.RuntimeKey { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ControlPlane) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ControlPlane) - if !ok { - that2, ok := that.(ControlPlane) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Identifier != that1.Identifier { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Locality) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Locality) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Region) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Region))) - i += copy(dAtA[i:], m.Region) - } - if len(m.Zone) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Zone))) - i += copy(dAtA[i:], m.Zone) - } - if len(m.SubZone) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.SubZone))) - i += copy(dAtA[i:], m.SubZone) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Node) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Cluster) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Cluster))) - i += copy(dAtA[i:], m.Cluster) - } - if m.Metadata != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Metadata.Size())) - n1, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Locality != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Locality.Size())) - n2, err := m.Locality.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if len(m.BuildVersion) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.BuildVersion))) - i += copy(dAtA[i:], m.BuildVersion) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Metadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FilterMetadata) > 0 { - keysForFilterMetadata := make([]string, 0, len(m.FilterMetadata)) - for k, _ := range m.FilterMetadata { - keysForFilterMetadata = append(keysForFilterMetadata, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForFilterMetadata) - for _, k := range keysForFilterMetadata { - dAtA[i] = 0xa - i++ - v := m.FilterMetadata[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovBase(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovBase(uint64(len(k))) + msgSize - i = encodeVarintBase(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(v.Size())) - n3, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RuntimeUInt32) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RuntimeUInt32) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.DefaultValue != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.DefaultValue)) - } - if len(m.RuntimeKey) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.RuntimeKey))) - i += copy(dAtA[i:], m.RuntimeKey) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HeaderValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HeaderValue) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HeaderValueOption) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HeaderValueOption) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Header != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Header.Size())) - n4, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.Append != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Append.Size())) - n5, err := m.Append.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HeaderMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HeaderMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Headers) > 0 { - for _, msg := range m.Headers { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DataSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataSource) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Specifier != nil { - nn6, err := m.Specifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DataSource_Filename) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Filename))) - i += copy(dAtA[i:], m.Filename) - return i, nil -} -func (m *DataSource_InlineBytes) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.InlineBytes != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.InlineBytes))) - i += copy(dAtA[i:], m.InlineBytes) - } - return i, nil -} -func (m *DataSource_InlineString) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x1a - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.InlineString))) - i += copy(dAtA[i:], m.InlineString) - return i, nil -} -func (m *TransportSocket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransportSocket) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn7, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn7 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TransportSocket_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Config.Size())) - n8, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} -func (m *TransportSocket_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBase(dAtA, i, uint64(m.TypedConfig.Size())) - n9, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - return i, nil -} -func (m *SocketOption) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SocketOption) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Description) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if m.Level != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Level)) - } - if m.Name != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.Name)) - } - if m.Value != nil { - nn10, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn10 - } - if m.State != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.State)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *SocketOption_IntValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x20 - i++ - i = encodeVarintBase(dAtA, i, uint64(m.IntValue)) - return i, nil -} -func (m *SocketOption_BufValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.BufValue != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.BufValue))) - i += copy(dAtA[i:], m.BufValue) - } - return i, nil -} -func (m *RuntimeFractionalPercent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RuntimeFractionalPercent) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.DefaultValue != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(m.DefaultValue.Size())) - n11, err := m.DefaultValue.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if len(m.RuntimeKey) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.RuntimeKey))) - i += copy(dAtA[i:], m.RuntimeKey) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ControlPlane) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ControlPlane) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Identifier) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBase(dAtA, i, uint64(len(m.Identifier))) - i += copy(dAtA[i:], m.Identifier) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintBase(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Locality) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Region) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - l = len(m.Zone) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - l = len(m.SubZone) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Node) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - l = len(m.Cluster) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovBase(uint64(l)) - } - if m.Locality != nil { - l = m.Locality.Size() - n += 1 + l + sovBase(uint64(l)) - } - l = len(m.BuildVersion) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - 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 - if len(m.FilterMetadata) > 0 { - for k, v := range m.FilterMetadata { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovBase(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovBase(uint64(len(k))) + l - n += mapEntrySize + 1 + sovBase(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RuntimeUInt32) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DefaultValue != 0 { - n += 1 + sovBase(uint64(m.DefaultValue)) - } - l = len(m.RuntimeKey) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HeaderValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HeaderValueOption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovBase(uint64(l)) - } - if m.Append != nil { - l = m.Append.Size() - n += 1 + l + sovBase(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HeaderMap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Headers) > 0 { - for _, e := range m.Headers { - l = e.Size() - n += 1 + l + sovBase(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DataSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Specifier != nil { - n += m.Specifier.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DataSource_Filename) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Filename) - n += 1 + l + sovBase(uint64(l)) - return n -} -func (m *DataSource_InlineBytes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InlineBytes != nil { - l = len(m.InlineBytes) - n += 1 + l + sovBase(uint64(l)) - } - return n -} -func (m *DataSource_InlineString) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InlineString) - n += 1 + l + sovBase(uint64(l)) - return n -} -func (m *TransportSocket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TransportSocket_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovBase(uint64(l)) - } - return n -} -func (m *TransportSocket_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovBase(uint64(l)) - } - return n -} -func (m *SocketOption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Description) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.Level != 0 { - n += 1 + sovBase(uint64(m.Level)) - } - if m.Name != 0 { - n += 1 + sovBase(uint64(m.Name)) - } - if m.Value != nil { - n += m.Value.Size() - } - if m.State != 0 { - n += 1 + sovBase(uint64(m.State)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SocketOption_IntValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovBase(uint64(m.IntValue)) - return n -} -func (m *SocketOption_BufValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BufValue != nil { - l = len(m.BufValue) - n += 1 + l + sovBase(uint64(l)) - } - return n -} -func (m *RuntimeFractionalPercent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DefaultValue != nil { - l = m.DefaultValue.Size() - n += 1 + l + sovBase(uint64(l)) - } - l = len(m.RuntimeKey) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ControlPlane) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovBase(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovBase(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozBase(x uint64) (n int) { - return sovBase(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Locality) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Locality: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Locality: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cluster = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &types.Struct{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Locality == nil { - m.Locality = &Locality{} - } - if err := m.Locality.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuildVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FilterMetadata == nil { - m.FilterMetadata = make(map[string]*types.Struct) - } - var mapkey string - var mapvalue *types.Struct - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - 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 ErrIntOverflowBase - } - 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 ErrInvalidLengthBase - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthBase - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthBase - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthBase - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Struct{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.FilterMetadata[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *RuntimeUInt32) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RuntimeUInt32: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RuntimeUInt32: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) - } - m.DefaultValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DefaultValue |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *HeaderValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderValue: 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *HeaderValueOption) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderValueOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderValueOption: 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &HeaderValue{} - } - 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 Append", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Append == nil { - m.Append = &types.BoolValue{} - } - if err := m.Append.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *HeaderMap) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Headers = append(m.Headers, &HeaderValue{}) - if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *DataSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Specifier = &DataSource_Filename{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InlineBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Specifier = &DataSource_InlineBytes{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InlineString", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Specifier = &DataSource_InlineString{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *TransportSocket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransportSocket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransportSocket: 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &TransportSocket_Config{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &TransportSocket_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *SocketOption) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SocketOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SocketOption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - m.Level = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Level |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - m.Name = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Name |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - 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 ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = &SocketOption_IntValue{v} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BufValue", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Value = &SocketOption_BufValue{v} - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= SocketOption_SocketState(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *RuntimeFractionalPercent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RuntimeFractionalPercent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RuntimeFractionalPercent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DefaultValue == nil { - m.DefaultValue = &_type.FractionalPercent{} - } - if err := m.DefaultValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 *ControlPlane) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ControlPlane: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ControlPlane: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBase - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBase - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBase - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBase(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBase - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBase - } - 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 skipBase(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBase - } - 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, ErrIntOverflowBase - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBase - } - 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, ErrInvalidLengthBase - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthBase - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBase - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipBase(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthBase - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthBase = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBase = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.validate.go index 3aac8b4bce..dd3f5576d6 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/base.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/base.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _base_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on Locality with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *Locality) Validate() error { @@ -103,6 +106,173 @@ var _ interface { 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, an error +// is returned. +func (m *BuildVersion) Validate() error { + if m == nil { + return nil + } + + 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 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, + } + } + } + + return nil +} + +// 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, an error is returned. +func (m *Extension) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + // no validation rules for Category + + // no validation rules for TypeDescriptor + + 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 + + return nil +} + +// 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, an error is returned. func (m *Node) Validate() error { @@ -114,38 +284,79 @@ func (m *Node) Validate() error { // no validation rules for Cluster - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetLocality() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } + 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 BuildVersion + // no validation rules for UserAgentName + + for idx, item := range m.GetExtensions() { + _, _ = idx, item + + 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 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 m.UserAgentVersionType.(type) { + + case *Node_UserAgentVersion: + // no validation rules for UserAgentVersion + + case *Node_UserAgentBuildVersion: + + 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, + } + } + } + + } + return nil } @@ -210,7 +421,22 @@ func (m *Metadata) Validate() error { return nil } - // no validation rules for FilterMetadata + for key, val := range m.GetFilterMetadata() { + _ = val + + // no validation rules for FilterMetadata[key] + + 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, + } + } + } + + } return nil } @@ -343,6 +569,97 @@ var _ interface { ErrorName() string } = RuntimeUInt32ValidationError{} +// Validate checks the field values on RuntimeFeatureFlag with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RuntimeFeatureFlag) Validate() error { + if m == nil { + return nil + } + + if m.GetDefaultValue() == nil { + return RuntimeFeatureFlagValidationError{ + field: "DefaultValue", + reason: "value is required", + } + } + + 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 len(m.GetRuntimeKey()) < 1 { + return RuntimeFeatureFlagValidationError{ + field: "RuntimeKey", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// 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 HeaderValue with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. @@ -358,6 +675,13 @@ func (m *HeaderValue) Validate() error { } } + if !_HeaderValue_Key_Pattern.MatchString(m.GetKey()) { + return HeaderValueValidationError{ + field: "Key", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + if len(m.GetValue()) > 16384 { return HeaderValueValidationError{ field: "Value", @@ -365,6 +689,13 @@ func (m *HeaderValue) Validate() error { } } + if !_HeaderValue_Value_Pattern.MatchString(m.GetValue()) { + return HeaderValueValidationError{ + field: "Value", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + return nil } @@ -422,6 +753,10 @@ var _ interface { 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, an // error is returned. @@ -437,32 +772,22 @@ func (m *HeaderValueOption) Validate() error { } } - { - tmp := m.GetHeader() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HeaderValueOptionValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetAppend() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HeaderValueOptionValidationError{ - field: "Append", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -536,17 +861,12 @@ func (m *HeaderMap) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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 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, } } } @@ -711,6 +1031,289 @@ var _ interface { 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, an error +// is returned. +func (m *RetryPolicy) Validate() error { + if m == nil { + return nil + } + + 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 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, + } + } + } + + return nil +} + +// 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, an +// error is returned. +func (m *RemoteDataSource) Validate() error { + if m == nil { + return nil + } + + if m.GetHttpUri() == nil { + return RemoteDataSourceValidationError{ + field: "HttpUri", + reason: "value is required", + } + } + + 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 len(m.GetSha256()) < 1 { + return RemoteDataSourceValidationError{ + field: "Sha256", + reason: "value length must be at least 1 bytes", + } + } + + 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, + } + } + } + + return nil +} + +// 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, an +// error is returned. +func (m *AsyncDataSource) Validate() error { + if m == nil { + return nil + } + + switch m.Specifier.(type) { + + case *AsyncDataSource_Local: + + 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, 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: + return AsyncDataSourceValidationError{ + field: "Specifier", + reason: "value is required", + } + + } + + return nil +} + +// 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, an // error is returned. @@ -730,34 +1333,24 @@ func (m *TransportSocket) Validate() error { case *TransportSocket_Config: - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TransportSocketValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TransportSocketValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, } } } case *TransportSocket_TypedConfig: - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TransportSocketValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -821,100 +1414,6 @@ var _ interface { ErrorName() string } = TransportSocketValidationError{} -// Validate checks the field values on SocketOption with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *SocketOption) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Description - - // no validation rules for Level - - // no validation rules for Name - - if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { - return SocketOptionValidationError{ - field: "State", - reason: "value must be one of the defined enum values", - } - } - - switch m.Value.(type) { - - case *SocketOption_IntValue: - // no validation rules for IntValue - - case *SocketOption_BufValue: - // no validation rules for BufValue - - default: - return SocketOptionValidationError{ - field: "Value", - reason: "value is required", - } - - } - - return nil -} - -// 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 RuntimeFractionalPercent with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -930,17 +1429,12 @@ func (m *RuntimeFractionalPercent) Validate() error { } } - { - tmp := m.GetDefaultValue() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.go index 569a0d99dd..83ba9e5443 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.go @@ -1,54 +1,65 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/config_source.proto -package core +package envoy_api_v2_core import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - time "time" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type ApiVersion int32 + +const ( + ApiVersion_AUTO ApiVersion = 0 + ApiVersion_V2 ApiVersion = 1 + ApiVersion_V3 ApiVersion = 2 +) + +var ApiVersion_name = map[int32]string{ + 0: "AUTO", + 1: "V2", + 2: "V3", +} + +var ApiVersion_value = map[string]int32{ + "AUTO": 0, + "V2": 1, + "V3": 2, +} + +func (x ApiVersion) String() string { + return proto.EnumName(ApiVersion_name, int32(x)) +} + +func (ApiVersion) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1ffcc55cf4c30535, []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. ApiConfigSource_UNSUPPORTED_REST_LEGACY ApiConfigSource_ApiType = 0 // Deprecated: Do not use. - // REST-JSON v2 API. The `canonical JSON encoding - // `_ for - // the v2 protos is used. - ApiConfigSource_REST ApiConfigSource_ApiType = 1 - // gRPC v2 API. - 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. - // - // DELTA_GRPC is not yet entirely implemented! Initially, only CDS is available. - // Do not use for other xDSes. TODO(fredlas) update/remove this warning when appropriate. - ApiConfigSource_DELTA_GRPC ApiConfigSource_ApiType = 3 + ApiConfigSource_REST ApiConfigSource_ApiType = 1 + ApiConfigSource_GRPC ApiConfigSource_ApiType = 2 + ApiConfigSource_DELTA_GRPC ApiConfigSource_ApiType = 3 ) var ApiConfigSource_ApiType_name = map[int32]string{ @@ -73,32 +84,18 @@ func (ApiConfigSource_ApiType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_1ffcc55cf4c30535, []int{0, 0} } -// API configuration source. This identifies the API type and cluster that Envoy -// will use to fetch an xDS API. type ApiConfigSource struct { - ApiType ApiConfigSource_ApiType `protobuf:"varint,1,opt,name=api_type,json=apiType,proto3,enum=envoy.api.v2.core.ApiConfigSource_ApiType" json:"api_type,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 *time.Duration `protobuf:"bytes,3,opt,name=refresh_delay,json=refreshDelay,proto3,stdduration" json:"refresh_delay,omitempty"` - // For REST APIs, the request timeout. If not set, a default value of 1s will be used. - RequestTimeout *time.Duration `protobuf:"bytes,5,opt,name=request_timeout,json=requestTimeout,proto3,stdduration" 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ApiType ApiConfigSource_ApiType `protobuf:"varint,1,opt,name=api_type,json=apiType,proto3,enum=envoy.api.v2.core.ApiConfigSource_ApiType" json:"api_type,omitempty"` + TransportApiVersion ApiVersion `protobuf:"varint,8,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.api.v2.core.ApiVersion" json:"transport_api_version,omitempty"` + ClusterNames []string `protobuf:"bytes,2,rep,name=cluster_names,json=clusterNames,proto3" json:"cluster_names,omitempty"` + GrpcServices []*GrpcService `protobuf:"bytes,4,rep,name=grpc_services,json=grpcServices,proto3" json:"grpc_services,omitempty"` + RefreshDelay *duration.Duration `protobuf:"bytes,3,opt,name=refresh_delay,json=refreshDelay,proto3" json:"refresh_delay,omitempty"` + RequestTimeout *duration.Duration `protobuf:"bytes,5,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` + RateLimitSettings *RateLimitSettings `protobuf:"bytes,6,opt,name=rate_limit_settings,json=rateLimitSettings,proto3" json:"rate_limit_settings,omitempty"` + SetNodeOnFirstMessageOnly bool `protobuf:"varint,7,opt,name=set_node_on_first_message_only,json=setNodeOnFirstMessageOnly,proto3" json:"set_node_on_first_message_only,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ApiConfigSource) Reset() { *m = ApiConfigSource{} } @@ -107,26 +104,18 @@ func (*ApiConfigSource) ProtoMessage() {} func (*ApiConfigSource) Descriptor() ([]byte, []int) { return fileDescriptor_1ffcc55cf4c30535, []int{0} } + func (m *ApiConfigSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ApiConfigSource.Unmarshal(m, b) } func (m *ApiConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ApiConfigSource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ApiConfigSource.Marshal(b, m, deterministic) } func (m *ApiConfigSource) XXX_Merge(src proto.Message) { xxx_messageInfo_ApiConfigSource.Merge(m, src) } func (m *ApiConfigSource) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ApiConfigSource.Size(m) } func (m *ApiConfigSource) XXX_DiscardUnknown() { xxx_messageInfo_ApiConfigSource.DiscardUnknown(m) @@ -141,6 +130,13 @@ func (m *ApiConfigSource) GetApiType() ApiConfigSource_ApiType { return ApiConfigSource_UNSUPPORTED_REST_LEGACY } +func (m *ApiConfigSource) GetTransportApiVersion() ApiVersion { + if m != nil { + return m.TransportApiVersion + } + return ApiVersion_AUTO +} + func (m *ApiConfigSource) GetClusterNames() []string { if m != nil { return m.ClusterNames @@ -155,14 +151,14 @@ func (m *ApiConfigSource) GetGrpcServices() []*GrpcService { return nil } -func (m *ApiConfigSource) GetRefreshDelay() *time.Duration { +func (m *ApiConfigSource) GetRefreshDelay() *duration.Duration { if m != nil { return m.RefreshDelay } return nil } -func (m *ApiConfigSource) GetRequestTimeout() *time.Duration { +func (m *ApiConfigSource) GetRequestTimeout() *duration.Duration { if m != nil { return m.RequestTimeout } @@ -176,9 +172,13 @@ func (m *ApiConfigSource) GetRateLimitSettings() *RateLimitSettings { 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. +func (m *ApiConfigSource) GetSetNodeOnFirstMessageOnly() bool { + if m != nil { + return m.SetNodeOnFirstMessageOnly + } + return false +} + type AggregatedConfigSource struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -191,26 +191,18 @@ func (*AggregatedConfigSource) ProtoMessage() {} func (*AggregatedConfigSource) Descriptor() ([]byte, []int) { return fileDescriptor_1ffcc55cf4c30535, []int{1} } + func (m *AggregatedConfigSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AggregatedConfigSource.Unmarshal(m, b) } func (m *AggregatedConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AggregatedConfigSource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AggregatedConfigSource.Marshal(b, m, deterministic) } func (m *AggregatedConfigSource) XXX_Merge(src proto.Message) { xxx_messageInfo_AggregatedConfigSource.Merge(m, src) } func (m *AggregatedConfigSource) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AggregatedConfigSource.Size(m) } func (m *AggregatedConfigSource) XXX_DiscardUnknown() { xxx_messageInfo_AggregatedConfigSource.DiscardUnknown(m) @@ -218,45 +210,63 @@ func (m *AggregatedConfigSource) XXX_DiscardUnknown() { var xxx_messageInfo_AggregatedConfigSource proto.InternalMessageInfo -// Rate Limit settings to be applied for discovery requests made by Envoy. +type SelfConfigSource struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SelfConfigSource) Reset() { *m = SelfConfigSource{} } +func (m *SelfConfigSource) String() string { return proto.CompactTextString(m) } +func (*SelfConfigSource) ProtoMessage() {} +func (*SelfConfigSource) Descriptor() ([]byte, []int) { + return fileDescriptor_1ffcc55cf4c30535, []int{2} +} + +func (m *SelfConfigSource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SelfConfigSource.Unmarshal(m, b) +} +func (m *SelfConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SelfConfigSource.Marshal(b, m, deterministic) +} +func (m *SelfConfigSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_SelfConfigSource.Merge(m, src) +} +func (m *SelfConfigSource) XXX_Size() int { + return xxx_messageInfo_SelfConfigSource.Size(m) +} +func (m *SelfConfigSource) XXX_DiscardUnknown() { + xxx_messageInfo_SelfConfigSource.DiscardUnknown(m) +} + +var xxx_messageInfo_SelfConfigSource proto.InternalMessageInfo + type RateLimitSettings struct { - // 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 *types.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 *types.DoubleValue `protobuf:"bytes,2,opt,name=fill_rate,json=fillRate,proto3" json:"fill_rate,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + MaxTokens *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` + FillRate *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=fill_rate,json=fillRate,proto3" json:"fill_rate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RateLimitSettings) Reset() { *m = RateLimitSettings{} } func (m *RateLimitSettings) String() string { return proto.CompactTextString(m) } func (*RateLimitSettings) ProtoMessage() {} func (*RateLimitSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_1ffcc55cf4c30535, []int{2} + return fileDescriptor_1ffcc55cf4c30535, []int{3} } + func (m *RateLimitSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_RateLimitSettings.Unmarshal(m, b) } func (m *RateLimitSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RateLimitSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_RateLimitSettings.Marshal(b, m, deterministic) } func (m *RateLimitSettings) XXX_Merge(src proto.Message) { xxx_messageInfo_RateLimitSettings.Merge(m, src) } func (m *RateLimitSettings) XXX_Size() int { - return m.Size() + return xxx_messageInfo_RateLimitSettings.Size(m) } func (m *RateLimitSettings) XXX_DiscardUnknown() { xxx_messageInfo_RateLimitSettings.DiscardUnknown(m) @@ -264,72 +274,52 @@ func (m *RateLimitSettings) XXX_DiscardUnknown() { var xxx_messageInfo_RateLimitSettings proto.InternalMessageInfo -func (m *RateLimitSettings) GetMaxTokens() *types.UInt32Value { +func (m *RateLimitSettings) GetMaxTokens() *wrappers.UInt32Value { if m != nil { return m.MaxTokens } return nil } -func (m *RateLimitSettings) GetFillRate() *types.DoubleValue { +func (m *RateLimitSettings) GetFillRate() *wrappers.DoubleValue { if m != nil { return m.FillRate } 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. type ConfigSource struct { // Types that are valid to be assigned to ConfigSourceSpecifier: // *ConfigSource_Path // *ConfigSource_ApiConfigSource // *ConfigSource_Ads + // *ConfigSource_Self ConfigSourceSpecifier isConfigSource_ConfigSourceSpecifier `protobuf_oneof:"config_source_specifier"` - // Optional initialization timeout. - // 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). Default 0. - InitialFetchTimeout *types.Duration `protobuf:"bytes,4,opt,name=initial_fetch_timeout,json=initialFetchTimeout,proto3" json:"initial_fetch_timeout,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + InitialFetchTimeout *duration.Duration `protobuf:"bytes,4,opt,name=initial_fetch_timeout,json=initialFetchTimeout,proto3" json:"initial_fetch_timeout,omitempty"` + ResourceApiVersion ApiVersion `protobuf:"varint,6,opt,name=resource_api_version,json=resourceApiVersion,proto3,enum=envoy.api.v2.core.ApiVersion" json:"resource_api_version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ConfigSource) Reset() { *m = ConfigSource{} } func (m *ConfigSource) String() string { return proto.CompactTextString(m) } func (*ConfigSource) ProtoMessage() {} func (*ConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_1ffcc55cf4c30535, []int{3} + return fileDescriptor_1ffcc55cf4c30535, []int{4} } + func (m *ConfigSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ConfigSource.Unmarshal(m, b) } func (m *ConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConfigSource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ConfigSource.Marshal(b, m, deterministic) } func (m *ConfigSource) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigSource.Merge(m, src) } func (m *ConfigSource) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ConfigSource.Size(m) } func (m *ConfigSource) XXX_DiscardUnknown() { xxx_messageInfo_ConfigSource.DiscardUnknown(m) @@ -339,24 +329,31 @@ var xxx_messageInfo_ConfigSource proto.InternalMessageInfo type isConfigSource_ConfigSourceSpecifier interface { isConfigSource_ConfigSourceSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type ConfigSource_Path struct { Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` } + type ConfigSource_ApiConfigSource struct { ApiConfigSource *ApiConfigSource `protobuf:"bytes,2,opt,name=api_config_source,json=apiConfigSource,proto3,oneof"` } + type ConfigSource_Ads struct { Ads *AggregatedConfigSource `protobuf:"bytes,3,opt,name=ads,proto3,oneof"` } -func (*ConfigSource_Path) isConfigSource_ConfigSourceSpecifier() {} +type ConfigSource_Self struct { + Self *SelfConfigSource `protobuf:"bytes,5,opt,name=self,proto3,oneof"` +} + +func (*ConfigSource_Path) isConfigSource_ConfigSourceSpecifier() {} + func (*ConfigSource_ApiConfigSource) isConfigSource_ConfigSourceSpecifier() {} -func (*ConfigSource_Ads) isConfigSource_ConfigSourceSpecifier() {} + +func (*ConfigSource_Ads) isConfigSource_ConfigSourceSpecifier() {} + +func (*ConfigSource_Self) isConfigSource_ConfigSourceSpecifier() {} func (m *ConfigSource) GetConfigSourceSpecifier() isConfigSource_ConfigSourceSpecifier { if m != nil { @@ -386,106 +383,43 @@ func (m *ConfigSource) GetAds() *AggregatedConfigSource { return nil } -func (m *ConfigSource) GetInitialFetchTimeout() *types.Duration { +func (m *ConfigSource) GetSelf() *SelfConfigSource { + if x, ok := m.GetConfigSourceSpecifier().(*ConfigSource_Self); ok { + return x.Self + } + return nil +} + +func (m *ConfigSource) GetInitialFetchTimeout() *duration.Duration { if m != nil { return m.InitialFetchTimeout } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ConfigSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ConfigSource_OneofMarshaler, _ConfigSource_OneofUnmarshaler, _ConfigSource_OneofSizer, []interface{}{ +func (m *ConfigSource) GetResourceApiVersion() ApiVersion { + if m != nil { + return m.ResourceApiVersion + } + return ApiVersion_AUTO +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ConfigSource) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*ConfigSource_Path)(nil), (*ConfigSource_ApiConfigSource)(nil), (*ConfigSource_Ads)(nil), + (*ConfigSource_Self)(nil), } } -func _ConfigSource_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ConfigSource) - // config_source_specifier - switch x := m.ConfigSourceSpecifier.(type) { - case *ConfigSource_Path: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Path) - case *ConfigSource_ApiConfigSource: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ApiConfigSource); err != nil { - return err - } - case *ConfigSource_Ads: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Ads); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("ConfigSource.ConfigSourceSpecifier has unexpected type %T", x) - } - return nil -} - -func _ConfigSource_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ConfigSource) - switch tag { - case 1: // config_source_specifier.path - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.ConfigSourceSpecifier = &ConfigSource_Path{x} - return true, err - case 2: // config_source_specifier.api_config_source - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ApiConfigSource) - err := b.DecodeMessage(msg) - m.ConfigSourceSpecifier = &ConfigSource_ApiConfigSource{msg} - return true, err - case 3: // config_source_specifier.ads - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AggregatedConfigSource) - err := b.DecodeMessage(msg) - m.ConfigSourceSpecifier = &ConfigSource_Ads{msg} - return true, err - default: - return false, nil - } -} - -func _ConfigSource_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ConfigSource) - // config_source_specifier - switch x := m.ConfigSourceSpecifier.(type) { - case *ConfigSource_Path: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Path))) - n += len(x.Path) - case *ConfigSource_ApiConfigSource: - s := proto.Size(x.ApiConfigSource) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ConfigSource_Ads: - s := proto.Size(x.Ads) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { + proto.RegisterEnum("envoy.api.v2.core.ApiVersion", ApiVersion_name, ApiVersion_value) proto.RegisterEnum("envoy.api.v2.core.ApiConfigSource_ApiType", ApiConfigSource_ApiType_name, ApiConfigSource_ApiType_value) proto.RegisterType((*ApiConfigSource)(nil), "envoy.api.v2.core.ApiConfigSource") proto.RegisterType((*AggregatedConfigSource)(nil), "envoy.api.v2.core.AggregatedConfigSource") + proto.RegisterType((*SelfConfigSource)(nil), "envoy.api.v2.core.SelfConfigSource") proto.RegisterType((*RateLimitSettings)(nil), "envoy.api.v2.core.RateLimitSettings") proto.RegisterType((*ConfigSource)(nil), "envoy.api.v2.core.ConfigSource") } @@ -495,1372 +429,61 @@ func init() { } var fileDescriptor_1ffcc55cf4c30535 = []byte{ - // 707 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0xcf, 0x24, 0x01, 0x92, 0x49, 0x80, 0x64, 0x60, 0x17, 0x2f, 0x5a, 0x85, 0x6c, 0x96, 0x95, - 0xb2, 0x1c, 0x6c, 0x29, 0x1c, 0x57, 0x7b, 0xc8, 0x3f, 0x60, 0xb5, 0x94, 0xa6, 0x13, 0x53, 0xa9, - 0xa7, 0xd1, 0xe0, 0x4c, 0xcc, 0xa8, 0x8e, 0xc7, 0x1d, 0x8f, 0x53, 0x72, 0xed, 0x27, 0xe8, 0xb1, - 0x97, 0x5e, 0xab, 0xaa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ea, 0x91, 0x21, 0x53, 0xce, 0xf9, 0x0f, 0xcf, 0x65, 0x1f, - 0xf0, 0x1c, 0xde, 0x48, 0x70, 0x07, 0x1a, 0x96, 0xd8, 0xac, 0x55, 0x85, 0x5b, 0xb7, 0xb8, 0x91, - 0x30, 0x60, 0x0e, 0x1f, 0x72, 0x26, 0xd1, 0xd2, 0xc7, 0xab, 0xcb, 0x0c, 0x68, 0x1d, 0xbc, 0x9f, - 0x56, 0xc0, 0xe7, 0x69, 0x05, 0x7c, 0x99, 0x56, 0xc0, 0xb7, 0x69, 0x05, 0xc0, 0x1d, 0x2e, 0x66, - 0x6b, 0x07, 0x52, 0x5c, 0x4c, 0xe6, 0x19, 0xb4, 0xca, 0x37, 0x17, 0xef, 0xe9, 0x45, 0x7a, 0xe0, - 0x6c, 0x39, 0xde, 0x68, 0xff, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x59, 0x6b, 0x4c, 0x15, - 0x05, 0x00, 0x00, + // 882 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x93, 0x34, 0x4d, 0xa6, 0xbf, 0x92, 0x69, 0x77, 0xeb, 0xad, 0xd8, 0x12, 0xd2, 0x5d, + 0x14, 0x7a, 0x48, 0xa4, 0xf4, 0x84, 0x10, 0x48, 0x49, 0xd3, 0x6d, 0x57, 0xea, 0x36, 0x91, 0x93, + 0x56, 0x5a, 0x38, 0x8c, 0xa6, 0xf6, 0xb3, 0x3b, 0xc2, 0xf1, 0x98, 0x99, 0x71, 0x68, 0x6e, 0x88, + 0x2b, 0x07, 0xae, 0x48, 0xdc, 0x11, 0xe2, 0xcc, 0x69, 0xff, 0x02, 0xae, 0xfc, 0x2b, 0x5c, 0x40, + 0x7b, 0x40, 0x68, 0x6c, 0x67, 0x37, 0x69, 0x52, 0x55, 0xe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 0x3b, 0x5f, 0xfe, 0xf5, 0xd3, 0xbf, 0x3f, 0xae, 0x3c, 0xc6, 0x3b, 0x49, 0x2d, 0x89, 0x66, + 0x52, 0xcb, 0xf8, 0xe8, 0xcd, 0x77, 0x7f, 0xfc, 0x59, 0xc8, 0x96, 0x0d, 0xf4, 0x21, 0xe3, 0x49, + 0xb1, 0xa1, 0xe0, 0xb7, 0x93, 0xc5, 0xba, 0x3b, 0x95, 0x59, 0x3b, 0xfb, 0xda, 0x9d, 0xbe, 0x71, + 0x5d, 0x88, 0x6d, 0x3a, 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xeb, 0xf5, 0x3a, 0xdb, 0x06, + 0x00, 0x00, } - -func (this *ApiConfigSource) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ApiConfigSource) - if !ok { - that2, ok := that.(ApiConfigSource) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ApiType != that1.ApiType { - return false - } - if len(this.ClusterNames) != len(that1.ClusterNames) { - return false - } - for i := range this.ClusterNames { - if this.ClusterNames[i] != that1.ClusterNames[i] { - return false - } - } - if len(this.GrpcServices) != len(that1.GrpcServices) { - return false - } - for i := range this.GrpcServices { - if !this.GrpcServices[i].Equal(that1.GrpcServices[i]) { - return false - } - } - if this.RefreshDelay != nil && that1.RefreshDelay != nil { - if *this.RefreshDelay != *that1.RefreshDelay { - return false - } - } else if this.RefreshDelay != nil { - return false - } else if that1.RefreshDelay != nil { - return false - } - if this.RequestTimeout != nil && that1.RequestTimeout != nil { - if *this.RequestTimeout != *that1.RequestTimeout { - return false - } - } else if this.RequestTimeout != nil { - return false - } else if that1.RequestTimeout != nil { - return false - } - if !this.RateLimitSettings.Equal(that1.RateLimitSettings) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AggregatedConfigSource) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AggregatedConfigSource) - if !ok { - that2, ok := that.(AggregatedConfigSource) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimitSettings) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimitSettings) - if !ok { - that2, ok := that.(RateLimitSettings) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.MaxTokens.Equal(that1.MaxTokens) { - return false - } - if !this.FillRate.Equal(that1.FillRate) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ConfigSource) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConfigSource) - if !ok { - that2, ok := that.(ConfigSource) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.ConfigSourceSpecifier == nil { - if this.ConfigSourceSpecifier != nil { - return false - } - } else if this.ConfigSourceSpecifier == nil { - return false - } else if !this.ConfigSourceSpecifier.Equal(that1.ConfigSourceSpecifier) { - return false - } - if !this.InitialFetchTimeout.Equal(that1.InitialFetchTimeout) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ConfigSource_Path) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConfigSource_Path) - if !ok { - that2, ok := that.(ConfigSource_Path) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - return true -} -func (this *ConfigSource_ApiConfigSource) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConfigSource_ApiConfigSource) - if !ok { - that2, ok := that.(ConfigSource_ApiConfigSource) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ApiConfigSource.Equal(that1.ApiConfigSource) { - return false - } - return true -} -func (this *ConfigSource_Ads) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConfigSource_Ads) - if !ok { - that2, ok := that.(ConfigSource_Ads) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Ads.Equal(that1.Ads) { - return false - } - return true -} -func (m *ApiConfigSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ApiConfigSource) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ApiType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.ApiType)) - } - if len(m.ClusterNames) > 0 { - for _, s := range m.ClusterNames { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.RefreshDelay != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.RefreshDelay))) - n1, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.RefreshDelay, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.GrpcServices) > 0 { - for _, msg := range m.GrpcServices { - dAtA[i] = 0x22 - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.RequestTimeout != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.RequestTimeout))) - n2, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.RequestTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.RateLimitSettings != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.RateLimitSettings.Size())) - n3, err := m.RateLimitSettings.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AggregatedConfigSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AggregatedConfigSource) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimitSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitSettings) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MaxTokens != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.MaxTokens.Size())) - n4, err := m.MaxTokens.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.FillRate != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.FillRate.Size())) - n5, err := m.FillRate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ConfigSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigSource) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ConfigSourceSpecifier != nil { - nn6, err := m.ConfigSourceSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.InitialFetchTimeout != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.InitialFetchTimeout.Size())) - n7, err := m.InitialFetchTimeout.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ConfigSource_Path) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0xa - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - return i, nil -} -func (m *ConfigSource_ApiConfigSource) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ApiConfigSource != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.ApiConfigSource.Size())) - n8, err := m.ApiConfigSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} -func (m *ConfigSource_Ads) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Ads != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintConfigSource(dAtA, i, uint64(m.Ads.Size())) - n9, err := m.Ads.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - return i, nil -} -func encodeVarintConfigSource(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ApiConfigSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ApiType != 0 { - n += 1 + sovConfigSource(uint64(m.ApiType)) - } - if len(m.ClusterNames) > 0 { - for _, s := range m.ClusterNames { - l = len(s) - n += 1 + l + sovConfigSource(uint64(l)) - } - } - if m.RefreshDelay != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.RefreshDelay) - n += 1 + l + sovConfigSource(uint64(l)) - } - if len(m.GrpcServices) > 0 { - for _, e := range m.GrpcServices { - l = e.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - } - if m.RequestTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.RequestTimeout) - n += 1 + l + sovConfigSource(uint64(l)) - } - if m.RateLimitSettings != nil { - l = m.RateLimitSettings.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AggregatedConfigSource) 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 *RateLimitSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxTokens != nil { - l = m.MaxTokens.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - if m.FillRate != nil { - l = m.FillRate.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConfigSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConfigSourceSpecifier != nil { - n += m.ConfigSourceSpecifier.Size() - } - if m.InitialFetchTimeout != nil { - l = m.InitialFetchTimeout.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConfigSource_Path) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovConfigSource(uint64(l)) - return n -} -func (m *ConfigSource_ApiConfigSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ApiConfigSource != nil { - l = m.ApiConfigSource.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - return n -} -func (m *ConfigSource_Ads) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ads != nil { - l = m.Ads.Size() - n += 1 + l + sovConfigSource(uint64(l)) - } - return n -} - -func sovConfigSource(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozConfigSource(x uint64) (n int) { - return sovConfigSource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ApiConfigSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ApiConfigSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ApiConfigSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ApiType", wireType) - } - m.ApiType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ApiType |= ApiConfigSource_ApiType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterNames = append(m.ClusterNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RefreshDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RefreshDelay == nil { - m.RefreshDelay = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.RefreshDelay, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcServices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrpcServices = append(m.GrpcServices, &GrpcService{}) - if err := m.GrpcServices[len(m.GrpcServices)-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 RequestTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestTimeout == nil { - m.RequestTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.RequestTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateLimitSettings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateLimitSettings == nil { - m.RateLimitSettings = &RateLimitSettings{} - } - if err := m.RateLimitSettings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfigSource(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfigSource - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfigSource - } - 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 *AggregatedConfigSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AggregatedConfigSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AggregatedConfigSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipConfigSource(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfigSource - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfigSource - } - 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 *RateLimitSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RateLimitSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RateLimitSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxTokens", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxTokens == nil { - m.MaxTokens = &types.UInt32Value{} - } - if err := m.MaxTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FillRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FillRate == nil { - m.FillRate = &types.DoubleValue{} - } - if err := m.FillRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfigSource(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfigSource - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfigSource - } - 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 *ConfigSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConfigSourceSpecifier = &ConfigSource_Path{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApiConfigSource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ApiConfigSource{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigSourceSpecifier = &ConfigSource_ApiConfigSource{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ads", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AggregatedConfigSource{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigSourceSpecifier = &ConfigSource_Ads{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialFetchTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfigSource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfigSource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfigSource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InitialFetchTimeout == nil { - m.InitialFetchTimeout = &types.Duration{} - } - if err := m.InitialFetchTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfigSource(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthConfigSource - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthConfigSource - } - 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 skipConfigSource(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfigSource - } - 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, ErrIntOverflowConfigSource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfigSource - } - 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, ErrInvalidLengthConfigSource - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthConfigSource - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConfigSource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipConfigSource(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthConfigSource - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthConfigSource = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConfigSource = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.validate.go index 30aca65c35..13231ab882 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/config_source.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/config_source.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _config_source_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on ApiConfigSource with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -48,43 +51,47 @@ func (m *ApiConfigSource) Validate() error { } } + if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { + return ApiConfigSourceValidationError{ + field: "TransportApiVersion", + reason: "value must be one of the defined enum values", + } + } + for idx, item := range m.GetGrpcServices() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetRefreshDelay() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ - field: "RefreshDelay", + field: fmt.Sprintf("GrpcServices[%v]", idx), reason: "embedded message failed validation", cause: err, } } } + + } + + 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 := *d + dur, err := ptypes.Duration(d) + if err != nil { + return ApiConfigSourceValidationError{ + field: "RequestTimeout", + reason: "value is not a valid duration", + cause: err, + } + } gt := time.Duration(0*time.Second + 0*time.Nanosecond) @@ -97,21 +104,18 @@ func (m *ApiConfigSource) Validate() error { } - { - tmp := m.GetRateLimitSettings() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: "RateLimitSettings", - reason: "embedded message failed validation", - cause: err, - } + 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 + return nil } @@ -236,6 +240,71 @@ var _ interface { 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, an +// error is returned. +func (m *SelfConfigSource) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an // error is returned. @@ -244,17 +313,12 @@ func (m *RateLimitSettings) Validate() error { return nil } - { - tmp := m.GetMaxTokens() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RateLimitSettingsValidationError{ - field: "MaxTokens", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -337,21 +401,23 @@ func (m *ConfigSource) Validate() error { return nil } - { - tmp := m.GetInitialFetchTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "InitialFetchTimeout", - reason: "embedded message failed validation", - cause: err, - } + 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 { + return ConfigSourceValidationError{ + field: "ResourceApiVersion", + reason: "value must be one of the defined enum values", + } + } + switch m.ConfigSourceSpecifier.(type) { case *ConfigSource_Path: @@ -359,34 +425,36 @@ func (m *ConfigSource) Validate() error { case *ConfigSource_ApiConfigSource: - { - tmp := m.GetApiConfigSource() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "ApiConfigSource", - reason: "embedded message failed validation", - cause: err, - } + 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: - { - tmp := m.GetAds() + 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, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + case *ConfigSource_Self: - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "Ads", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.go new file mode 100644 index 0000000000..02eba23fe0 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/core/event_service_config.proto + +package envoy_api_v2_core + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type EventServiceConfig struct { + // Types that are valid to be assigned to ConfigSourceSpecifier: + // *EventServiceConfig_GrpcService + ConfigSourceSpecifier isEventServiceConfig_ConfigSourceSpecifier `protobuf_oneof:"config_source_specifier"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventServiceConfig) Reset() { *m = EventServiceConfig{} } +func (m *EventServiceConfig) String() string { return proto.CompactTextString(m) } +func (*EventServiceConfig) ProtoMessage() {} +func (*EventServiceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0289257eb2a50b92, []int{0} +} + +func (m *EventServiceConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EventServiceConfig.Unmarshal(m, b) +} +func (m *EventServiceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EventServiceConfig.Marshal(b, m, deterministic) +} +func (m *EventServiceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventServiceConfig.Merge(m, src) +} +func (m *EventServiceConfig) XXX_Size() int { + return xxx_messageInfo_EventServiceConfig.Size(m) +} +func (m *EventServiceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_EventServiceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_EventServiceConfig proto.InternalMessageInfo + +type isEventServiceConfig_ConfigSourceSpecifier interface { + isEventServiceConfig_ConfigSourceSpecifier() +} + +type EventServiceConfig_GrpcService struct { + GrpcService *GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3,oneof"` +} + +func (*EventServiceConfig_GrpcService) isEventServiceConfig_ConfigSourceSpecifier() {} + +func (m *EventServiceConfig) GetConfigSourceSpecifier() isEventServiceConfig_ConfigSourceSpecifier { + if m != nil { + return m.ConfigSourceSpecifier + } + return nil +} + +func (m *EventServiceConfig) GetGrpcService() *GrpcService { + if x, ok := m.GetConfigSourceSpecifier().(*EventServiceConfig_GrpcService); ok { + return x.GrpcService + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*EventServiceConfig) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*EventServiceConfig_GrpcService)(nil), + } +} + +func init() { + proto.RegisterType((*EventServiceConfig)(nil), "envoy.api.v2.core.EventServiceConfig") +} + +func init() { + proto.RegisterFile("envoy/api/v2/core/event_service_config.proto", fileDescriptor_0289257eb2a50b92) +} + +var fileDescriptor_0289257eb2a50b92 = []byte{ + // 276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x41, 0x4a, 0xc4, 0x30, + 0x14, 0x86, 0xad, 0xe2, 0x2c, 0x3a, 0x2e, 0xb4, 0x88, 0x95, 0x01, 0xab, 0x88, 0x0b, 0x17, 0x92, + 0x40, 0xe7, 0x06, 0x1d, 0x44, 0x97, 0x83, 0x1e, 0xa0, 0xc6, 0xcc, 0x9b, 0xf2, 0x40, 0xf3, 0x42, + 0x92, 0x06, 0xbb, 0xf3, 0x06, 0x6e, 0x3d, 0x8b, 0x27, 0x70, 0xeb, 0x55, 0x5c, 0xb9, 0x12, 0x69, + 0xd3, 0xe2, 0x40, 0x77, 0x09, 0xff, 0xfb, 0xff, 0xf7, 0xfd, 0x2f, 0xbe, 0x02, 0xe5, 0xa9, 0xe1, + 0x42, 0x23, 0xf7, 0x39, 0x97, 0x64, 0x80, 0x83, 0x07, 0xe5, 0x4a, 0x0b, 0xc6, 0xa3, 0x84, 0x52, + 0x92, 0x5a, 0x63, 0xc5, 0xb4, 0x21, 0x47, 0xc9, 0x41, 0x37, 0xcd, 0x84, 0x46, 0xe6, 0x73, 0xd6, + 0x4e, 0xcf, 0x2e, 0xc6, 0x01, 0x95, 0xd1, 0x72, 0xf0, 0x07, 0xe3, 0x2c, 0xab, 0x57, 0x5a, 0x70, + 0xa1, 0x14, 0x39, 0xe1, 0x90, 0x94, 0xe5, 0xcf, 0x58, 0x19, 0xe1, 0x06, 0xfd, 0x64, 0xa4, 0x5b, + 0x27, 0x5c, 0x6d, 0x7b, 0x39, 0xf5, 0xe2, 0x09, 0x57, 0xc2, 0x01, 0x1f, 0x1e, 0x41, 0x38, 0x6f, + 0xe2, 0xe4, 0xba, 0xc5, 0xbd, 0x0f, 0xdb, 0x16, 0x1d, 0x6c, 0xb2, 0x88, 0xf7, 0x36, 0x19, 0x8e, + 0xa3, 0xb3, 0xe8, 0x72, 0x9a, 0x67, 0x6c, 0x44, 0xcf, 0x6e, 0x8c, 0x96, 0xbd, 0xf7, 0x76, 0xeb, + 0x6e, 0x5a, 0xfd, 0x7f, 0x8b, 0x2c, 0x4e, 0x43, 0xf7, 0xd2, 0x52, 0x6d, 0x24, 0x94, 0x56, 0x83, + 0xc4, 0x35, 0x82, 0x49, 0x76, 0x7e, 0x8a, 0xa8, 0x78, 0xf8, 0x7e, 0xff, 0x7d, 0xdb, 0x3d, 0x4a, + 0x0e, 0x43, 0x6a, 0x7f, 0xa7, 0x2e, 0xd5, 0xcf, 0x3f, 0x5e, 0x3f, 0xbf, 0x26, 0xdb, 0xfb, 0x51, + 0x7c, 0x8a, 0x14, 0xd6, 0x6a, 0x43, 0x2f, 0xcd, 0x98, 0xa0, 0x48, 0xc7, 0xfc, 0xcb, 0xb6, 0xda, + 0x32, 0x7a, 0x9c, 0x74, 0x1d, 0xe7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x56, 0x93, 0xc8, 0xf3, + 0xa4, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.validate.go new file mode 100644 index 0000000000..788d553847 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/event_service_config.pb.validate.go @@ -0,0 +1,126 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/core/event_service_config.proto + +package envoy_api_v2_core + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _event_service_config_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on EventServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *EventServiceConfig) Validate() error { + if m == nil { + return nil + } + + switch m.ConfigSourceSpecifier.(type) { + + case *EventServiceConfig_GrpcService: + + 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: + return EventServiceConfigValidationError{ + field: "ConfigSourceSpecifier", + reason: "value is required", + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.go new file mode 100644 index 0000000000..1ac97a9cbc --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/core/grpc_method_list.proto + +package envoy_api_v2_core + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type GrpcMethodList struct { + Services []*GrpcMethodList_Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GrpcMethodList) Reset() { *m = GrpcMethodList{} } +func (m *GrpcMethodList) String() string { return proto.CompactTextString(m) } +func (*GrpcMethodList) ProtoMessage() {} +func (*GrpcMethodList) Descriptor() ([]byte, []int) { + return fileDescriptor_63bac5d4aa07ee79, []int{0} +} + +func (m *GrpcMethodList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GrpcMethodList.Unmarshal(m, b) +} +func (m *GrpcMethodList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GrpcMethodList.Marshal(b, m, deterministic) +} +func (m *GrpcMethodList) XXX_Merge(src proto.Message) { + xxx_messageInfo_GrpcMethodList.Merge(m, src) +} +func (m *GrpcMethodList) XXX_Size() int { + return xxx_messageInfo_GrpcMethodList.Size(m) +} +func (m *GrpcMethodList) XXX_DiscardUnknown() { + xxx_messageInfo_GrpcMethodList.DiscardUnknown(m) +} + +var xxx_messageInfo_GrpcMethodList proto.InternalMessageInfo + +func (m *GrpcMethodList) GetServices() []*GrpcMethodList_Service { + if m != nil { + return m.Services + } + return nil +} + +type GrpcMethodList_Service struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + MethodNames []string `protobuf:"bytes,2,rep,name=method_names,json=methodNames,proto3" json:"method_names,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GrpcMethodList_Service) Reset() { *m = GrpcMethodList_Service{} } +func (m *GrpcMethodList_Service) String() string { return proto.CompactTextString(m) } +func (*GrpcMethodList_Service) ProtoMessage() {} +func (*GrpcMethodList_Service) Descriptor() ([]byte, []int) { + return fileDescriptor_63bac5d4aa07ee79, []int{0, 0} +} + +func (m *GrpcMethodList_Service) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GrpcMethodList_Service.Unmarshal(m, b) +} +func (m *GrpcMethodList_Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GrpcMethodList_Service.Marshal(b, m, deterministic) +} +func (m *GrpcMethodList_Service) XXX_Merge(src proto.Message) { + xxx_messageInfo_GrpcMethodList_Service.Merge(m, src) +} +func (m *GrpcMethodList_Service) XXX_Size() int { + return xxx_messageInfo_GrpcMethodList_Service.Size(m) +} +func (m *GrpcMethodList_Service) XXX_DiscardUnknown() { + xxx_messageInfo_GrpcMethodList_Service.DiscardUnknown(m) +} + +var xxx_messageInfo_GrpcMethodList_Service proto.InternalMessageInfo + +func (m *GrpcMethodList_Service) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GrpcMethodList_Service) GetMethodNames() []string { + if m != nil { + return m.MethodNames + } + return nil +} + +func init() { + proto.RegisterType((*GrpcMethodList)(nil), "envoy.api.v2.core.GrpcMethodList") + proto.RegisterType((*GrpcMethodList_Service)(nil), "envoy.api.v2.core.GrpcMethodList.Service") +} + +func init() { + proto.RegisterFile("envoy/api/v2/core/grpc_method_list.proto", fileDescriptor_63bac5d4aa07ee79) +} + +var fileDescriptor_63bac5d4aa07ee79 = []byte{ + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x4f, 0x4a, 0x03, 0x31, + 0x1c, 0x85, 0xc9, 0xf4, 0x7f, 0x2a, 0xa2, 0xa3, 0x68, 0xa9, 0xa8, 0x83, 0xab, 0x11, 0x21, 0x81, + 0xf6, 0x06, 0x01, 0x71, 0xa3, 0x52, 0xda, 0xad, 0x50, 0xe2, 0x4c, 0x1c, 0x03, 0x9d, 0x24, 0x24, + 0x69, 0xb0, 0x3b, 0x6f, 0x20, 0xb8, 0xf2, 0x10, 0x9e, 0xc0, 0x13, 0xb8, 0xf5, 0x2a, 0x2e, 0xbb, + 0x10, 0x99, 0xc9, 0x28, 0x94, 0xd9, 0x25, 0xbf, 0xef, 0x3d, 0xf8, 0x78, 0x30, 0x66, 0xc2, 0xc9, + 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0x57, 0x3b, 0xd8, 0x01, 0xf0, 0x94, 0x4b, 0x6f, 0xac, + 0xb4, 0x7c, 0x5a, 0xd5, 0xe5, 0xc9, 0xde, 0xa6, 0xfd, 0xa4, 0x98, 0x62, 0x02, 0xee, 0xdb, 0xe5, + 0x26, 0xe3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x34, 0x3a, 0xc6, 0xaa, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.validate.go new file mode 100644 index 0000000000..8146321e50 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_method_list.pb.validate.go @@ -0,0 +1,198 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/core/grpc_method_list.proto + +package envoy_api_v2_core + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _grpc_method_list_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on GrpcMethodList with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *GrpcMethodList) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetServices() { + _, _ = idx, item + + 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, + } + } + } + + } + + return nil +} + +// 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, an error is returned. +func (m *GrpcMethodList_Service) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return GrpcMethodList_ServiceValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetMethodNames()) < 1 { + return GrpcMethodList_ServiceValidationError{ + field: "MethodNames", + reason: "value must contain at least 1 item(s)", + } + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.go index 6abd162621..b5487f68bd 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.go @@ -1,18 +1,18 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/grpc_service.proto -package core +package envoy_api_v2_core import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + duration "github.com/golang/protobuf/ptypes/duration" + empty "github.com/golang/protobuf/ptypes/empty" + _struct "github.com/golang/protobuf/ptypes/struct" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,25 +24,18 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. type GrpcService struct { // Types that are valid to be assigned 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 *types.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. - InitialMetadata []*HeaderValue `protobuf:"bytes,5,rep,name=initial_metadata,json=initialMetadata,proto3" json:"initial_metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + TargetSpecifier isGrpcService_TargetSpecifier `protobuf_oneof:"target_specifier"` + Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + InitialMetadata []*HeaderValue `protobuf:"bytes,5,rep,name=initial_metadata,json=initialMetadata,proto3" json:"initial_metadata,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GrpcService) Reset() { *m = GrpcService{} } @@ -51,26 +44,18 @@ func (*GrpcService) ProtoMessage() {} func (*GrpcService) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0} } + func (m *GrpcService) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService.Unmarshal(m, b) } func (m *GrpcService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService.Marshal(b, m, deterministic) } func (m *GrpcService) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService.Merge(m, src) } func (m *GrpcService) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService.Size(m) } func (m *GrpcService) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService.DiscardUnknown(m) @@ -80,19 +65,18 @@ var xxx_messageInfo_GrpcService proto.InternalMessageInfo type isGrpcService_TargetSpecifier interface { isGrpcService_TargetSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type GrpcService_EnvoyGrpc_ struct { EnvoyGrpc *GrpcService_EnvoyGrpc `protobuf:"bytes,1,opt,name=envoy_grpc,json=envoyGrpc,proto3,oneof"` } + type GrpcService_GoogleGrpc_ struct { GoogleGrpc *GrpcService_GoogleGrpc `protobuf:"bytes,2,opt,name=google_grpc,json=googleGrpc,proto3,oneof"` } -func (*GrpcService_EnvoyGrpc_) isGrpcService_TargetSpecifier() {} +func (*GrpcService_EnvoyGrpc_) isGrpcService_TargetSpecifier() {} + func (*GrpcService_GoogleGrpc_) isGrpcService_TargetSpecifier() {} func (m *GrpcService) GetTargetSpecifier() isGrpcService_TargetSpecifier { @@ -116,7 +100,7 @@ func (m *GrpcService) GetGoogleGrpc() *GrpcService_GoogleGrpc { return nil } -func (m *GrpcService) GetTimeout() *types.Duration { +func (m *GrpcService) GetTimeout() *duration.Duration { if m != nil { return m.Timeout } @@ -130,84 +114,15 @@ func (m *GrpcService) GetInitialMetadata() []*HeaderValue { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GrpcService) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GrpcService_OneofMarshaler, _GrpcService_OneofUnmarshaler, _GrpcService_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GrpcService) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*GrpcService_EnvoyGrpc_)(nil), (*GrpcService_GoogleGrpc_)(nil), } } -func _GrpcService_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GrpcService) - // target_specifier - switch x := m.TargetSpecifier.(type) { - case *GrpcService_EnvoyGrpc_: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.EnvoyGrpc); err != nil { - return err - } - case *GrpcService_GoogleGrpc_: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GoogleGrpc); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("GrpcService.TargetSpecifier has unexpected type %T", x) - } - return nil -} - -func _GrpcService_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GrpcService) - switch tag { - case 1: // target_specifier.envoy_grpc - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_EnvoyGrpc) - err := b.DecodeMessage(msg) - m.TargetSpecifier = &GrpcService_EnvoyGrpc_{msg} - return true, err - case 2: // target_specifier.google_grpc - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_GoogleGrpc) - err := b.DecodeMessage(msg) - m.TargetSpecifier = &GrpcService_GoogleGrpc_{msg} - return true, err - default: - return false, nil - } -} - -func _GrpcService_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GrpcService) - // target_specifier - switch x := m.TargetSpecifier.(type) { - case *GrpcService_EnvoyGrpc_: - s := proto.Size(x.EnvoyGrpc) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_: - s := proto.Size(x.GoogleGrpc) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type GrpcService_EnvoyGrpc struct { - // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`tls_context - // `. ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -220,26 +135,18 @@ func (*GrpcService_EnvoyGrpc) ProtoMessage() {} func (*GrpcService_EnvoyGrpc) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 0} } + func (m *GrpcService_EnvoyGrpc) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_EnvoyGrpc.Unmarshal(m, b) } func (m *GrpcService_EnvoyGrpc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_EnvoyGrpc.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_EnvoyGrpc.Marshal(b, m, deterministic) } func (m *GrpcService_EnvoyGrpc) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_EnvoyGrpc.Merge(m, src) } func (m *GrpcService_EnvoyGrpc) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_EnvoyGrpc.Size(m) } func (m *GrpcService_EnvoyGrpc) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_EnvoyGrpc.DiscardUnknown(m) @@ -254,36 +161,16 @@ func (m *GrpcService_EnvoyGrpc) GetClusterName() string { return "" } -// [#proto-status: draft] type GrpcService_GoogleGrpc struct { - // 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 *types.Struct `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + 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"` + CallCredentials []*GrpcService_GoogleGrpc_CallCredentials `protobuf:"bytes,3,rep,name=call_credentials,json=callCredentials,proto3" json:"call_credentials,omitempty"` + StatPrefix string `protobuf:"bytes,4,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + CredentialsFactoryName string `protobuf:"bytes,5,opt,name=credentials_factory_name,json=credentialsFactoryName,proto3" json:"credentials_factory_name,omitempty"` + Config *_struct.Struct `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GrpcService_GoogleGrpc) Reset() { *m = GrpcService_GoogleGrpc{} } @@ -292,26 +179,18 @@ func (*GrpcService_GoogleGrpc) ProtoMessage() {} func (*GrpcService_GoogleGrpc) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1} } + func (m *GrpcService_GoogleGrpc) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc.Merge(m, src) } func (m *GrpcService_GoogleGrpc) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc.Size(m) } func (m *GrpcService_GoogleGrpc) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc.DiscardUnknown(m) @@ -354,20 +233,16 @@ func (m *GrpcService_GoogleGrpc) GetCredentialsFactoryName() string { return "" } -func (m *GrpcService_GoogleGrpc) GetConfig() *types.Struct { +func (m *GrpcService_GoogleGrpc) GetConfig() *_struct.Struct { if m != nil { return m.Config } return nil } -// See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. type GrpcService_GoogleGrpc_SslCredentials struct { - // 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. + RootCerts *DataSource `protobuf:"bytes,1,opt,name=root_certs,json=rootCerts,proto3" json:"root_certs,omitempty"` + PrivateKey *DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` CertChain *DataSource `protobuf:"bytes,3,opt,name=cert_chain,json=certChain,proto3" json:"cert_chain,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -380,26 +255,18 @@ func (*GrpcService_GoogleGrpc_SslCredentials) ProtoMessage() {} func (*GrpcService_GoogleGrpc_SslCredentials) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 0} } + func (m *GrpcService_GoogleGrpc_SslCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_SslCredentials.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_SslCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_SslCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_SslCredentials.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_SslCredentials) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_SslCredentials.Merge(m, src) } func (m *GrpcService_GoogleGrpc_SslCredentials) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_SslCredentials.Size(m) } func (m *GrpcService_GoogleGrpc_SslCredentials) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_SslCredentials.DiscardUnknown(m) @@ -428,8 +295,6 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) GetCertChain() *DataSource { return nil } -// Local channel credentials. Only UDS is supported for now. -// See https://github.com/grpc/grpc/pull/15909. type GrpcService_GoogleGrpc_GoogleLocalCredentials struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -446,26 +311,18 @@ func (*GrpcService_GoogleGrpc_GoogleLocalCredentials) ProtoMessage() {} func (*GrpcService_GoogleGrpc_GoogleLocalCredentials) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 1} } + func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials.Merge(m, src) } func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials.Size(m) } func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials.DiscardUnknown(m) @@ -473,8 +330,6 @@ func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) XXX_DiscardUnknown() { var xxx_messageInfo_GrpcService_GoogleGrpc_GoogleLocalCredentials proto.InternalMessageInfo -// See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call -// credential types. type GrpcService_GoogleGrpc_ChannelCredentials struct { // Types that are valid to be assigned to CredentialSpecifier: // *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials @@ -494,26 +349,18 @@ func (*GrpcService_GoogleGrpc_ChannelCredentials) ProtoMessage() {} func (*GrpcService_GoogleGrpc_ChannelCredentials) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 2} } + func (m *GrpcService_GoogleGrpc_ChannelCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_ChannelCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_ChannelCredentials) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials.Merge(m, src) } func (m *GrpcService_GoogleGrpc_ChannelCredentials) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials.Size(m) } func (m *GrpcService_GoogleGrpc_ChannelCredentials) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials.DiscardUnknown(m) @@ -523,25 +370,26 @@ var xxx_messageInfo_GrpcService_GoogleGrpc_ChannelCredentials proto.InternalMess type isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier interface { isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } 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 { - GoogleDefault *types.Empty `protobuf:"bytes,2,opt,name=google_default,json=googleDefault,proto3,oneof"` + GoogleDefault *empty.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() { } @@ -559,7 +407,7 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) GetSslCredentials() *GrpcSer return nil } -func (m *GrpcService_GoogleGrpc_ChannelCredentials) GetGoogleDefault() *types.Empty { +func (m *GrpcService_GoogleGrpc_ChannelCredentials) GetGoogleDefault() *empty.Empty { if x, ok := m.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault); ok { return x.GoogleDefault } @@ -573,99 +421,15 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) GetLocalCredentials() *GrpcS return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GrpcService_GoogleGrpc_ChannelCredentials) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GrpcService_GoogleGrpc_ChannelCredentials_OneofMarshaler, _GrpcService_GoogleGrpc_ChannelCredentials_OneofUnmarshaler, _GrpcService_GoogleGrpc_ChannelCredentials_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GrpcService_GoogleGrpc_ChannelCredentials) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials)(nil), (*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault)(nil), (*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials)(nil), } } -func _GrpcService_GoogleGrpc_ChannelCredentials_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GrpcService_GoogleGrpc_ChannelCredentials) - // credential_specifier - switch x := m.CredentialSpecifier.(type) { - case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SslCredentials); err != nil { - return err - } - case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GoogleDefault); err != nil { - return err - } - case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.LocalCredentials); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("GrpcService_GoogleGrpc_ChannelCredentials.CredentialSpecifier has unexpected type %T", x) - } - return nil -} - -func _GrpcService_GoogleGrpc_ChannelCredentials_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GrpcService_GoogleGrpc_ChannelCredentials) - switch tag { - case 1: // credential_specifier.ssl_credentials - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_GoogleGrpc_SslCredentials) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials{msg} - return true, err - case 2: // credential_specifier.google_default - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Empty) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault{msg} - return true, err - case 3: // credential_specifier.local_credentials - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_GoogleGrpc_GoogleLocalCredentials) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials{msg} - return true, err - default: - return false, nil - } -} - -func _GrpcService_GoogleGrpc_ChannelCredentials_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GrpcService_GoogleGrpc_ChannelCredentials) - // credential_specifier - switch x := m.CredentialSpecifier.(type) { - case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - s := proto.Size(x.SslCredentials) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault: - s := proto.Size(x.GoogleDefault) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials: - s := proto.Size(x.LocalCredentials) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type GrpcService_GoogleGrpc_CallCredentials struct { // Types that are valid to be assigned to CredentialSpecifier: // *GrpcService_GoogleGrpc_CallCredentials_AccessToken @@ -674,6 +438,7 @@ type GrpcService_GoogleGrpc_CallCredentials struct { // *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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -688,26 +453,18 @@ func (*GrpcService_GoogleGrpc_CallCredentials) ProtoMessage() {} func (*GrpcService_GoogleGrpc_CallCredentials) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 3} } + func (m *GrpcService_GoogleGrpc_CallCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_CallCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_CallCredentials) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials.Merge(m, src) } func (m *GrpcService_GoogleGrpc_CallCredentials) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials.Size(m) } func (m *GrpcService_GoogleGrpc_CallCredentials) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials.DiscardUnknown(m) @@ -717,43 +474,57 @@ var xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials proto.InternalMessage type isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier interface { isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type GrpcService_GoogleGrpc_CallCredentials_AccessToken struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3,oneof"` } + type GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine struct { - GoogleComputeEngine *types.Empty `protobuf:"bytes,2,opt,name=google_compute_engine,json=googleComputeEngine,proto3,oneof"` + GoogleComputeEngine *empty.Empty `protobuf:"bytes,2,opt,name=google_compute_engine,json=googleComputeEngine,proto3,oneof"` } + type GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken struct { GoogleRefreshToken string `protobuf:"bytes,3,opt,name=google_refresh_token,json=googleRefreshToken,proto3,oneof"` } + type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess struct { ServiceAccountJwtAccess *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials `protobuf:"bytes,4,opt,name=service_account_jwt_access,json=serviceAccountJwtAccess,proto3,oneof"` } + type GrpcService_GoogleGrpc_CallCredentials_GoogleIam struct { GoogleIam *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials `protobuf:"bytes,5,opt,name=google_iam,json=googleIam,proto3,oneof"` } + type GrpcService_GoogleGrpc_CallCredentials_FromPlugin struct { FromPlugin *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin `protobuf:"bytes,6,opt,name=from_plugin,json=fromPlugin,proto3,oneof"` } +type GrpcService_GoogleGrpc_CallCredentials_StsService_ struct { + 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() { +} + func (m *GrpcService_GoogleGrpc_CallCredentials) GetCredentialSpecifier() isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier { if m != nil { return m.CredentialSpecifier @@ -768,7 +539,7 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) GetAccessToken() string { return "" } -func (m *GrpcService_GoogleGrpc_CallCredentials) GetGoogleComputeEngine() *types.Empty { +func (m *GrpcService_GoogleGrpc_CallCredentials) GetGoogleComputeEngine() *empty.Empty { if x, ok := m.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine); ok { return x.GoogleComputeEngine } @@ -803,148 +574,26 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) GetFromPlugin() *GrpcService_Go return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GrpcService_GoogleGrpc_CallCredentials) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GrpcService_GoogleGrpc_CallCredentials_OneofMarshaler, _GrpcService_GoogleGrpc_CallCredentials_OneofUnmarshaler, _GrpcService_GoogleGrpc_CallCredentials_OneofSizer, []interface{}{ +func (m *GrpcService_GoogleGrpc_CallCredentials) GetStsService() *GrpcService_GoogleGrpc_CallCredentials_StsService { + if x, ok := m.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_StsService_); ok { + return x.StsService + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GrpcService_GoogleGrpc_CallCredentials) XXX_OneofWrappers() []interface{} { + return []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), } } -func _GrpcService_GoogleGrpc_CallCredentials_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GrpcService_GoogleGrpc_CallCredentials) - // credential_specifier - switch x := m.CredentialSpecifier.(type) { - case *GrpcService_GoogleGrpc_CallCredentials_AccessToken: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.AccessToken) - case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GoogleComputeEngine); err != nil { - return err - } - case *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.GoogleRefreshToken) - case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ServiceAccountJwtAccess); err != nil { - return err - } - case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GoogleIam); err != nil { - return err - } - case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.FromPlugin); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("GrpcService_GoogleGrpc_CallCredentials.CredentialSpecifier has unexpected type %T", x) - } - return nil -} - -func _GrpcService_GoogleGrpc_CallCredentials_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GrpcService_GoogleGrpc_CallCredentials) - switch tag { - case 1: // credential_specifier.access_token - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_AccessToken{x} - return true, err - case 2: // credential_specifier.google_compute_engine - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Empty) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine{msg} - return true, err - case 3: // credential_specifier.google_refresh_token - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken{x} - return true, err - case 4: // credential_specifier.service_account_jwt_access - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess{msg} - return true, err - case 5: // credential_specifier.google_iam - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_GoogleIam{msg} - return true, err - case 6: // credential_specifier.from_plugin - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) - err := b.DecodeMessage(msg) - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_FromPlugin{msg} - return true, err - default: - return false, nil - } -} - -func _GrpcService_GoogleGrpc_CallCredentials_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GrpcService_GoogleGrpc_CallCredentials) - // credential_specifier - switch x := m.CredentialSpecifier.(type) { - case *GrpcService_GoogleGrpc_CallCredentials_AccessToken: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.AccessToken))) - n += len(x.AccessToken) - case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - s := proto.Size(x.GoogleComputeEngine) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.GoogleRefreshToken))) - n += len(x.GoogleRefreshToken) - case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - s := proto.Size(x.ServiceAccountJwtAccess) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam: - s := proto.Size(x.GoogleIam) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin: - s := proto.Size(x.FromPlugin) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials struct { 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"` @@ -963,26 +612,18 @@ func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 3, 0} } + func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Merge(m, src) } func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Size(m) } func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.DiscardUnknown(m) @@ -1022,26 +663,18 @@ func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ProtoMessage func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 3, 1} } + func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Merge(m, src) } func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Size(m) } func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.DiscardUnknown(m) @@ -1084,26 +717,18 @@ func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Pro func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Descriptor() ([]byte, []int) { return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 3, 2} } + func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Unmarshal(m, b) } func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Marshal(b, m, deterministic) } func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Merge(m, src) } func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Size(m) } func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_DiscardUnknown() { xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.DiscardUnknown(m) @@ -1111,22 +736,28 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) X var xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin proto.InternalMessageInfo +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetName() string { + if m != nil { + return m.Name + } + return "" +} + type isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType interface { isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` } + type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` } func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config) isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() { } + func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() { } @@ -1137,99 +768,134 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) G return nil } -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetConfig() *types.Struct { +// Deprecated: Do not use. +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetConfig() *_struct.Struct { if x, ok := m.GetConfigType().(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config); ok { return x.Config } return nil } -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetTypedConfig() *types.Any { +func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetTypedConfig() *any.Any { if x, ok := m.GetConfigType().(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig); ok { return x.TypedConfig } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_OneofMarshaler, _GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_OneofUnmarshaler, _GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config)(nil), (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig)(nil), } } -func _GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) - // config_type - switch x := m.ConfigType.(type) { - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.ConfigType has unexpected type %T", x) - } - return nil +type GrpcService_GoogleGrpc_CallCredentials_StsService struct { + TokenExchangeServiceUri string `protobuf:"bytes,1,opt,name=token_exchange_service_uri,json=tokenExchangeServiceUri,proto3" json:"token_exchange_service_uri,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Audience string `protobuf:"bytes,3,opt,name=audience,proto3" json:"audience,omitempty"` + Scope string `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` + RequestedTokenType string `protobuf:"bytes,5,opt,name=requested_token_type,json=requestedTokenType,proto3" json:"requested_token_type,omitempty"` + SubjectTokenPath string `protobuf:"bytes,6,opt,name=subject_token_path,json=subjectTokenPath,proto3" json:"subject_token_path,omitempty"` + SubjectTokenType string `protobuf:"bytes,7,opt,name=subject_token_type,json=subjectTokenType,proto3" json:"subject_token_type,omitempty"` + ActorTokenPath string `protobuf:"bytes,8,opt,name=actor_token_path,json=actorTokenPath,proto3" json:"actor_token_path,omitempty"` + ActorTokenType string `protobuf:"bytes,9,opt,name=actor_token_type,json=actorTokenType,proto3" json:"actor_token_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func _GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config{msg} - return true, err - case 3: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig{msg} - return true, err - default: - return false, nil - } +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Reset() { + *m = GrpcService_GoogleGrpc_CallCredentials_StsService{} +} +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) String() string { + return proto.CompactTextString(m) +} +func (*GrpcService_GoogleGrpc_CallCredentials_StsService) ProtoMessage() {} +func (*GrpcService_GoogleGrpc_CallCredentials_StsService) Descriptor() ([]byte, []int) { + return fileDescriptor_936cbcb9830ffdc2, []int{0, 1, 3, 3} } -func _GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) - // config_type - switch x := m.ConfigType.(type) { - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_StsService.Unmarshal(m, b) +} +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_StsService.Marshal(b, m, deterministic) +} +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) XXX_Merge(src proto.Message) { + xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_StsService.Merge(m, src) +} +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) XXX_Size() int { + return xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_StsService.Size(m) +} +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) XXX_DiscardUnknown() { + xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_StsService.DiscardUnknown(m) +} + +var xxx_messageInfo_GrpcService_GoogleGrpc_CallCredentials_StsService proto.InternalMessageInfo + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetTokenExchangeServiceUri() string { + if m != nil { + return m.TokenExchangeServiceUri } - return n + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetResource() string { + if m != nil { + return m.Resource + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetAudience() string { + if m != nil { + return m.Audience + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetRequestedTokenType() string { + if m != nil { + return m.RequestedTokenType + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetSubjectTokenPath() string { + if m != nil { + return m.SubjectTokenPath + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetSubjectTokenType() string { + if m != nil { + return m.SubjectTokenType + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetActorTokenPath() string { + if m != nil { + return m.ActorTokenPath + } + return "" +} + +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) GetActorTokenType() string { + if m != nil { + return m.ActorTokenType + } + return "" } func init() { @@ -1243,6 +909,7 @@ func init() { proto.RegisterType((*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials)(nil), "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials") proto.RegisterType((*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials)(nil), "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials") proto.RegisterType((*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin)(nil), "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin") + proto.RegisterType((*GrpcService_GoogleGrpc_CallCredentials_StsService)(nil), "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.StsService") } func init() { @@ -1250,3304 +917,87 @@ func init() { } var fileDescriptor_936cbcb9830ffdc2 = []byte{ - // 1084 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4d, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf7, 0xc6, 0x4e, 0x5b, 0x3f, 0x9b, 0x26, 0xce, 0xc4, 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, 0x61, 0x8d, 0x9e, 0x92, 0x38, 0x66, 0x11, 0xa6, - 0x82, 0x75, 0x58, 0xac, 0x2a, 0x4a, 0xad, 0x92, 0x0f, 0xae, 0xac, 0xa4, 0xdf, 0x34, 0x41, 0x9a, - 0x17, 0x31, 0x02, 0x44, 0x67, 0x6c, 0xa8, 0x03, 0x25, 0x4a, 0xa2, 0xc9, 0x5c, 0x79, 0xad, 0xd6, - 0xee, 0x7f, 0xc8, 0x45, 0xa2, 0x89, 0x44, 0x2b, 0x74, 0xd2, 0x80, 0x3e, 0x01, 0x37, 0x95, 0x44, - 0xe2, 0x44, 0xb0, 0x6e, 0xf8, 0xba, 0x52, 0x98, 0xee, 0x1f, 0x14, 0x7a, 0xac, 0x41, 0x74, 0x1f, - 0x2a, 0x63, 0xc5, 0xe0, 0x2e, 0xa1, 0x92, 0x8b, 0xa1, 0xd1, 0x7c, 0x51, 0x11, 0x83, 0xf5, 0x31, - 0xfc, 0xa1, 0x81, 0x95, 0xe6, 0xa8, 0x06, 0x37, 0x28, 0x8f, 0xbb, 0x61, 0xaf, 0x72, 0x43, 0xab, - 0xb5, 0x31, 0x33, 0x2d, 0x6d, 0x7d, 0xa5, 0x02, 0xeb, 0xe6, 0xfd, 0xe1, 0xc0, 0x72, 0x3b, 0x9d, - 0xa8, 0xf4, 0x01, 0x80, 0xe0, 0x5c, 0x62, 0xca, 0x84, 0x4c, 0xed, 0x5d, 0xd8, 0xba, 0x44, 0x89, - 0x7d, 0x22, 0x49, 0x9b, 0x67, 0x82, 0xb2, 0xa0, 0xa8, 0x08, 0x4d, 0xe5, 0x8f, 0xbe, 0x04, 0x37, - 0x11, 0xe1, 0x80, 0x48, 0x86, 0x5f, 0xb2, 0xa1, 0x3d, 0xb4, 0x39, 0x74, 0xb0, 0x8c, 0x6f, 0xd8, - 0x50, 0x65, 0x57, 0x89, 0x31, 0x3d, 0x25, 0x61, 0x6c, 0x67, 0x7e, 0x5e, 0x76, 0x45, 0x68, 0x2a, - 0x7f, 0xaf, 0x02, 0xeb, 0xe6, 0x50, 0x8e, 0x38, 0x25, 0xe3, 0x5d, 0x79, 0xbf, 0x2f, 0x00, 0x9a, - 0x1d, 0x08, 0x44, 0x61, 0x25, 0x4d, 0x27, 0xcf, 0xde, 0x74, 0x7c, 0xff, 0xea, 0x67, 0x3f, 0xa9, - 0x5f, 0x2b, 0x17, 0x2c, 0xa7, 0x93, 0x8a, 0x7e, 0x05, 0xcb, 0x76, 0x25, 0x74, 0x58, 0x97, 0x64, - 0x91, 0xb4, 0xb2, 0xac, 0xcf, 0x9c, 0xce, 0x81, 0x5a, 0x69, 0xad, 0x5c, 0x70, 0xdb, 0x00, 0xfb, - 0xc6, 0x1d, 0x71, 0x58, 0x8d, 0x54, 0x43, 0x53, 0x33, 0xaa, 0x62, 0x7c, 0x7d, 0xf5, 0x3a, 0x2f, - 0x57, 0xa6, 0x95, 0x0b, 0x4a, 0xd1, 0x94, 0xad, 0xb1, 0x05, 0xe5, 0x8b, 0x54, 0x38, 0x4d, 0x18, - 0x0d, 0xbb, 0x21, 0x13, 0x68, 0xf1, 0x97, 0x77, 0x6f, 0xf3, 0x8e, 0xf7, 0xc3, 0x2d, 0x58, 0x99, - 0x9a, 0x78, 0xf4, 0x21, 0x2c, 0x11, 0x4a, 0x59, 0x9a, 0x62, 0xc9, 0x5f, 0xb2, 0xd8, 0xdc, 0xf0, - 0x56, 0x2e, 0x70, 0x8d, 0xf5, 0x99, 0x32, 0xa2, 0x23, 0xf8, 0x9f, 0x55, 0x82, 0xf2, 0x7e, 0x92, - 0x49, 0x86, 0x59, 0xdc, 0x0b, 0x63, 0x36, 0x57, 0x90, 0x35, 0x03, 0x34, 0x0d, 0xeb, 0x40, 0x93, - 0x50, 0x1d, 0xca, 0x36, 0x9a, 0x60, 0x5d, 0xc1, 0xd2, 0x53, 0x9b, 0x3a, 0x6f, 0x53, 0x23, 0x83, - 0x06, 0x06, 0x34, 0x15, 0xfc, 0xe8, 0x80, 0x67, 0x5f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0x53, 0x16, 0x31, 0xb5, - 0x87, 0x75, 0xea, 0x62, 0xb0, 0x7a, 0x8e, 0xb4, 0x2d, 0xe0, 0xfd, 0xec, 0xc0, 0xd6, 0x7b, 0xe5, - 0x41, 0x08, 0x0a, 0x17, 0xef, 0x6a, 0xa0, 0xbf, 0xd1, 0xe7, 0xe7, 0x1b, 0x7d, 0xe1, 0xbd, 0x1b, - 0xbd, 0x95, 0x1b, 0xed, 0x74, 0xb4, 0x0b, 0x4b, 0x72, 0x98, 0xb0, 0x0e, 0xb6, 0x44, 0xb3, 0x28, - 0xca, 0x33, 0xc4, 0xbd, 0x58, 0xdd, 0x2c, 0x57, 0xfb, 0x36, 0xb5, 0x6b, 0xe3, 0x36, 0xb8, 0x86, - 0x84, 0x95, 0x75, 0xce, 0x1a, 0x68, 0x6c, 0x42, 0xc9, 0x3e, 0xe9, 0xd3, 0xd0, 0xe3, 0xc2, 0xad, - 0x42, 0x69, 0xb1, 0x71, 0xf0, 0xd3, 0x59, 0xd5, 0xf9, 0xed, 0xac, 0xea, 0xfc, 0x79, 0x56, 0x75, - 0xfe, 0x3e, 0xab, 0x3a, 0xf0, 0x41, 0xc8, 0xcd, 0x70, 0x25, 0x82, 0xbf, 0x1e, 0xce, 0xce, 0x59, - 0xa3, 0x34, 0x36, 0x68, 0xc7, 0xaa, 0xd2, 0x63, 0xe7, 0xe4, 0x86, 0x2e, 0xf9, 0xde, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x73, 0xdb, 0x2f, 0x5b, 0xb2, 0x0a, 0x00, 0x00, + // 1299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0x8f, 0x9d, 0xbf, 0x7e, 0xdb, 0x26, 0xee, 0xc4, 0x24, 0xee, 0xf6, 0x0f, 0x51, 0x41, 0x28, + 0x20, 0x61, 0x23, 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0x46, 0xac, 0x43, 0xf5, 0x94, 0x0d, 0x25, 0x25, 0x3c, 0x6e, 0xdb, 0xc1, 0x34, 0x17, 0x54, + 0x0c, 0xba, 0xef, 0xc0, 0x43, 0x8b, 0xf9, 0x7d, 0xa8, 0x9c, 0x74, 0x01, 0xa8, 0x0e, 0xab, 0x38, + 0x55, 0xc7, 0x5c, 0xb0, 0x67, 0x66, 0x70, 0x8f, 0x37, 0x4c, 0x80, 0x72, 0x90, 0xad, 0xd9, 0x77, + 0x21, 0xdb, 0x55, 0x83, 0x50, 0xd2, 0x88, 0xea, 0x67, 0xdf, 0x84, 0x2e, 0x05, 0x17, 0x86, 0xc8, + 0xa1, 0x03, 0xfc, 0x1f, 0x0a, 0x70, 0xe5, 0xd4, 0x7b, 0x40, 0x08, 0xe6, 0x46, 0x03, 0x3c, 0x30, + 0xdf, 0xe8, 0x83, 0xe1, 0x00, 0x29, 0x9e, 0x3a, 0x40, 0x9a, 0xc5, 0x6a, 0xa1, 0x35, 0x93, 0x8d, + 0x11, 0x74, 0x13, 0xce, 0xa9, 0x41, 0x42, 0xdb, 0xa1, 0x23, 0xdb, 0x37, 0xa9, 0x32, 0x45, 0xde, + 0x8a, 0x75, 0x1b, 0x7b, 0xc6, 0x76, 0xdb, 0x98, 0x36, 0xcf, 0x83, 0x67, 0x49, 0xa1, 0xde, 0xf5, + 0x9f, 0xcf, 0x02, 0x8c, 0xae, 0x10, 0x7d, 0x04, 0xbe, 0xd5, 0x9c, 0x3e, 0xd5, 0x83, 0xbb, 0x4b, + 0xb3, 0x42, 0x19, 0xfd, 0x41, 0x04, 0xeb, 0xc6, 0x62, 0xd7, 0x19, 0x38, 0xa6, 0xfe, 0x8d, 0xf0, + 0x61, 0x49, 0x50, 0x69, 0x86, 0x83, 0xd3, 0x69, 0xb8, 0xd6, 0x18, 0x4e, 0xdb, 0x8c, 0xc6, 0x84, + 0xda, 0x97, 0x22, 0x18, 0xae, 0x51, 0x05, 0xe6, 0x25, 0xe1, 0x09, 0xb5, 0x33, 0x3a, 0xb0, 0x0b, + 0xf4, 0x1e, 0x54, 0x04, 0xfd, 0x2a, 0xa5, 0x52, 0xd1, 0xb6, 0xbd, 0x2c, 0x93, 0xb1, 0x9b, 0xc8, + 0x68, 0x88, 0x99, 0xdb, 0x7a, 0x30, 0x48, 0xb4, 0x98, 0x48, 0xa6, 0x47, 0x8f, 0x28, 0x51, 0xce, + 0x3e, 0xc1, 0xea, 0xd8, 0x74, 0xd7, 0xd8, 0xe0, 0x2f, 0x3b, 0x13, 0x43, 0x3b, 0xc0, 0xea, 0x78, + 0x9a, 0x66, 0xc2, 0x2c, 0x9e, 0x42, 0x33, 0xd1, 0x36, 0xa1, 0x6c, 0xfe, 0x04, 0xc6, 0x63, 0x2d, + 0x99, 0xdc, 0x96, 0xcd, 0xfe, 0x28, 0xc0, 0x84, 0xa5, 0x71, 0x5f, 0x9a, 0xb4, 0xd4, 0x3e, 0x4f, + 0x7d, 0xff, 0x9b, 0xeb, 0x50, 0x76, 0x7f, 0x73, 0x79, 0xe0, 0xee, 0xdc, 0xd2, 0x5c, 0x79, 0xbe, + 0xf9, 0xc5, 0x1f, 0xdf, 0xfe, 0xf3, 0xcd, 0xfc, 0x1a, 0xaa, 0xd8, 0x56, 0xb6, 0x97, 0x6c, 0x5b, + 0xb9, 0x7f, 0xfd, 0xe7, 0xaf, 0x5f, 0xfc, 0xb2, 0x50, 0x2c, 0x17, 0xe0, 0x75, 0xc6, 0x6d, 0xaf, + 0x27, 0x82, 0x3f, 0x1d, 0x4c, 0xb7, 0x7d, 0xb3, 0x3c, 0xd6, 0xf7, 0x07, 0xba, 0x8e, 0x0e, 0x0a, + 0x47, 0x0b, 0xa6, 0xa0, 0xae, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x31, 0xbc, 0xb6, 0xb8, 0x08, + 0x0d, 0x00, 0x00, } - -func (this *GrpcService) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService) - if !ok { - that2, ok := that.(GrpcService) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.TargetSpecifier == nil { - if this.TargetSpecifier != nil { - return false - } - } else if this.TargetSpecifier == nil { - return false - } else if !this.TargetSpecifier.Equal(that1.TargetSpecifier) { - return false - } - if !this.Timeout.Equal(that1.Timeout) { - return false - } - if len(this.InitialMetadata) != len(that1.InitialMetadata) { - return false - } - for i := range this.InitialMetadata { - if !this.InitialMetadata[i].Equal(that1.InitialMetadata[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_EnvoyGrpc_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_EnvoyGrpc_) - if !ok { - that2, ok := that.(GrpcService_EnvoyGrpc_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.EnvoyGrpc.Equal(that1.EnvoyGrpc) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.GoogleGrpc.Equal(that1.GoogleGrpc) { - return false - } - return true -} -func (this *GrpcService_EnvoyGrpc) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_EnvoyGrpc) - if !ok { - that2, ok := that.(GrpcService_EnvoyGrpc) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ClusterName != that1.ClusterName { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.TargetUri != that1.TargetUri { - return false - } - if !this.ChannelCredentials.Equal(that1.ChannelCredentials) { - return false - } - if len(this.CallCredentials) != len(that1.CallCredentials) { - return false - } - for i := range this.CallCredentials { - if !this.CallCredentials[i].Equal(that1.CallCredentials[i]) { - return false - } - } - if this.StatPrefix != that1.StatPrefix { - return false - } - if this.CredentialsFactoryName != that1.CredentialsFactoryName { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_SslCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_SslCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_SslCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RootCerts.Equal(that1.RootCerts) { - return false - } - if !this.PrivateKey.Equal(that1.PrivateKey) { - return false - } - if !this.CertChain.Equal(that1.CertChain) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_GoogleLocalCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_GoogleLocalCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_GoogleLocalCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_ChannelCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_ChannelCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_ChannelCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.CredentialSpecifier == nil { - if this.CredentialSpecifier != nil { - return false - } - } else if this.CredentialSpecifier == nil { - return false - } else if !this.CredentialSpecifier.Equal(that1.CredentialSpecifier) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SslCredentials.Equal(that1.SslCredentials) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.GoogleDefault.Equal(that1.GoogleDefault) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.LocalCredentials.Equal(that1.LocalCredentials) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.CredentialSpecifier == nil { - if this.CredentialSpecifier != nil { - return false - } - } else if this.CredentialSpecifier == nil { - return false - } else if !this.CredentialSpecifier.Equal(that1.CredentialSpecifier) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_AccessToken) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_AccessToken) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_AccessToken) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.AccessToken != that1.AccessToken { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.GoogleComputeEngine.Equal(that1.GoogleComputeEngine) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.GoogleRefreshToken != that1.GoogleRefreshToken { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ServiceAccountJwtAccess.Equal(that1.ServiceAccountJwtAccess) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_GoogleIam) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_GoogleIam) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_GoogleIam) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.GoogleIam.Equal(that1.GoogleIam) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_FromPlugin) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_FromPlugin) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_FromPlugin) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.FromPlugin.Equal(that1.FromPlugin) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.JsonKey != that1.JsonKey { - return false - } - if this.TokenLifetimeSeconds != that1.TokenLifetimeSeconds { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.AuthorizationToken != that1.AuthorizationToken { - return false - } - if this.AuthoritySelector != that1.AuthoritySelector { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) - if !ok { - that2, ok := that.(GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (m *GrpcService) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TargetSpecifier != nil { - nn1, err := m.TargetSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.Timeout != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.Timeout.Size())) - n2, err := m.Timeout.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if len(m.InitialMetadata) > 0 { - for _, msg := range m.InitialMetadata { - dAtA[i] = 0x2a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_EnvoyGrpc_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.EnvoyGrpc != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.EnvoyGrpc.Size())) - n3, err := m.EnvoyGrpc.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GoogleGrpc != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.GoogleGrpc.Size())) - n4, err := m.GoogleGrpc.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - return i, nil -} -func (m *GrpcService_EnvoyGrpc) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_EnvoyGrpc) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ClusterName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.ClusterName))) - i += copy(dAtA[i:], m.ClusterName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.TargetUri) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.TargetUri))) - i += copy(dAtA[i:], m.TargetUri) - } - if m.ChannelCredentials != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.ChannelCredentials.Size())) - n5, err := m.ChannelCredentials.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.CallCredentials) > 0 { - for _, msg := range m.CallCredentials { - dAtA[i] = 0x1a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.StatPrefix) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.StatPrefix))) - i += copy(dAtA[i:], m.StatPrefix) - } - if len(m.CredentialsFactoryName) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.CredentialsFactoryName))) - i += copy(dAtA[i:], m.CredentialsFactoryName) - } - if m.Config != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.Config.Size())) - n6, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_SslCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_SslCredentials) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.RootCerts != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.RootCerts.Size())) - n7, err := m.RootCerts.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.PrivateKey != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.PrivateKey.Size())) - n8, err := m.PrivateKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.CertChain != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.CertChain.Size())) - n9, err := m.CertChain.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.CredentialSpecifier != nil { - nn10, err := m.CredentialSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SslCredentials != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.SslCredentials.Size())) - n11, err := m.SslCredentials.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GoogleDefault != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.GoogleDefault.Size())) - n12, err := m.GoogleDefault.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.LocalCredentials != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.LocalCredentials.Size())) - n13, err := m.LocalCredentials.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.CredentialSpecifier != nil { - nn14, err := m.CredentialSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn14 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_AccessToken) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.AccessToken))) - i += copy(dAtA[i:], m.AccessToken) - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GoogleComputeEngine != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.GoogleComputeEngine.Size())) - n15, err := m.GoogleComputeEngine.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x1a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.GoogleRefreshToken))) - i += copy(dAtA[i:], m.GoogleRefreshToken) - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ServiceAccountJwtAccess != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.ServiceAccountJwtAccess.Size())) - n16, err := m.ServiceAccountJwtAccess.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIam) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GoogleIam != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.GoogleIam.Size())) - n17, err := m.GoogleIam.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_FromPlugin) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.FromPlugin != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.FromPlugin.Size())) - n18, err := m.FromPlugin.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.JsonKey) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.JsonKey))) - i += copy(dAtA[i:], m.JsonKey) - } - if m.TokenLifetimeSeconds != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.TokenLifetimeSeconds)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.AuthorizationToken) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.AuthorizationToken))) - i += copy(dAtA[i:], m.AuthorizationToken) - } - if len(m.AuthoritySelector) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.AuthoritySelector))) - i += copy(dAtA[i:], m.AuthoritySelector) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn19, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn19 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.Config.Size())) - n20, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - return i, nil -} -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGrpcService(dAtA, i, uint64(m.TypedConfig.Size())) - n21, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - return i, nil -} -func encodeVarintGrpcService(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *GrpcService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TargetSpecifier != nil { - n += m.TargetSpecifier.Size() - } - if m.Timeout != nil { - l = m.Timeout.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - if len(m.InitialMetadata) > 0 { - for _, e := range m.InitialMetadata { - l = e.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_EnvoyGrpc_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EnvoyGrpc != nil { - l = m.EnvoyGrpc.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GoogleGrpc != nil { - l = m.GoogleGrpc.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_EnvoyGrpc) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClusterName) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TargetUri) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.ChannelCredentials != nil { - l = m.ChannelCredentials.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - if len(m.CallCredentials) > 0 { - for _, e := range m.CallCredentials { - l = e.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - } - l = len(m.StatPrefix) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - l = len(m.CredentialsFactoryName) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_SslCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RootCerts != nil { - l = m.RootCerts.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.PrivateKey != nil { - l = m.PrivateKey.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.CertChain != nil { - l = m.CertChain.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) 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 *GrpcService_GoogleGrpc_ChannelCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CredentialSpecifier != nil { - n += m.CredentialSpecifier.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SslCredentials != nil { - l = m.SslCredentials.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GoogleDefault != nil { - l = m.GoogleDefault.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LocalCredentials != nil { - l = m.LocalCredentials.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CredentialSpecifier != nil { - n += m.CredentialSpecifier.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_AccessToken) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AccessToken) - n += 1 + l + sovGrpcService(uint64(l)) - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GoogleComputeEngine != nil { - l = m.GoogleComputeEngine.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.GoogleRefreshToken) - n += 1 + l + sovGrpcService(uint64(l)) - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ServiceAccountJwtAccess != nil { - l = m.ServiceAccountJwtAccess.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIam) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GoogleIam != nil { - l = m.GoogleIam.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_FromPlugin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FromPlugin != nil { - l = m.FromPlugin.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.JsonKey) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.TokenLifetimeSeconds != 0 { - n += 1 + sovGrpcService(uint64(m.TokenLifetimeSeconds)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AuthorizationToken) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - l = len(m.AuthoritySelector) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovGrpcService(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovGrpcService(uint64(l)) - } - return n -} - -func sovGrpcService(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGrpcService(x uint64) (n int) { - return sovGrpcService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GrpcService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GrpcService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GrpcService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvoyGrpc", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_EnvoyGrpc{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.TargetSpecifier = &GrpcService_EnvoyGrpc_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoogleGrpc", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_GoogleGrpc{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.TargetSpecifier = &GrpcService_GoogleGrpc_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timeout == nil { - m.Timeout = &types.Duration{} - } - if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InitialMetadata = append(m.InitialMetadata, &HeaderValue{}) - if err := m.InitialMetadata[len(m.InitialMetadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_EnvoyGrpc) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EnvoyGrpc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EnvoyGrpc: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GoogleGrpc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GoogleGrpc: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetUri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TargetUri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelCredentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ChannelCredentials == nil { - m.ChannelCredentials = &GrpcService_GoogleGrpc_ChannelCredentials{} - } - if err := m.ChannelCredentials.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallCredentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallCredentials = append(m.CallCredentials, &GrpcService_GoogleGrpc_CallCredentials{}) - if err := m.CallCredentials[len(m.CallCredentials)-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 StatPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialsFactoryName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialsFactoryName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Config == nil { - m.Config = &types.Struct{} - } - if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_SslCredentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SslCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SslCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootCerts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RootCerts == nil { - m.RootCerts = &DataSource{} - } - if err := m.RootCerts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrivateKey == nil { - m.PrivateKey = &DataSource{} - } - if err := m.PrivateKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CertChain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CertChain == nil { - m.CertChain = &DataSource{} - } - if err := m.CertChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_GoogleLocalCredentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GoogleLocalCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GoogleLocalCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_ChannelCredentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChannelCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChannelCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SslCredentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_GoogleGrpc_SslCredentials{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoogleDefault", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Empty{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalCredentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_GoogleGrpc_GoogleLocalCredentials{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_CallCredentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CallCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CallCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_AccessToken{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoogleComputeEngine", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Empty{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoogleRefreshToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountJwtAccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoogleIam", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_GoogleIam{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromPlugin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.CredentialSpecifier = &GrpcService_GoogleGrpc_CallCredentials_FromPlugin{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceAccountJWTAccessCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceAccountJWTAccessCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JsonKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenLifetimeSeconds", wireType) - } - m.TokenLifetimeSeconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TokenLifetimeSeconds |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GoogleIAMCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GoogleIAMCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorizationToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthoritySelector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthoritySelector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetadataCredentialsFromPlugin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetadataCredentialsFromPlugin: 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 ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpcService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpcService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpcService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpcService(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGrpcService - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGrpcService - } - 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 skipGrpcService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpcService - } - 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, ErrIntOverflowGrpcService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpcService - } - 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, ErrInvalidLengthGrpcService - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpcService - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpcService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGrpcService(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpcService - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGrpcService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpcService = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.validate.go index 0cc81cb2db..ffa9362295 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/grpc_service.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/grpc_service.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _grpc_service_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on GrpcService with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. @@ -41,17 +44,12 @@ func (m *GrpcService) Validate() error { return nil } - { - tmp := m.GetTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -59,17 +57,12 @@ func (m *GrpcService) Validate() error { for idx, item := range m.GetInitialMetadata() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } + 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, } } } @@ -80,34 +73,24 @@ func (m *GrpcService) Validate() error { case *GrpcService_EnvoyGrpc_: - { - tmp := m.GetEnvoyGrpc() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "EnvoyGrpc", - reason: "embedded message failed validation", - cause: err, - } + 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_: - { - tmp := m.GetGoogleGrpc() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "GoogleGrpc", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -266,17 +249,12 @@ func (m *GrpcService_GoogleGrpc) Validate() error { } } - { - tmp := m.GetChannelCredentials() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "ChannelCredentials", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -284,17 +262,12 @@ func (m *GrpcService_GoogleGrpc) Validate() error { for idx, item := range m.GetCallCredentials() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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 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, } } } @@ -310,17 +283,12 @@ func (m *GrpcService_GoogleGrpc) Validate() error { // no validation rules for CredentialsFactoryName - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -392,47 +360,32 @@ func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { return nil } - { - tmp := m.GetRootCerts() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "RootCerts", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetPrivateKey() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetCertChain() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "CertChain", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -578,51 +531,36 @@ func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - { - tmp := m.GetSslCredentials() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "SslCredentials", - reason: "embedded message failed validation", - cause: err, - } + 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: - { - tmp := m.GetGoogleDefault() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "GoogleDefault", - reason: "embedded message failed validation", - cause: err, - } + 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: - { - tmp := m.GetLocalCredentials() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "LocalCredentials", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -710,17 +648,12 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - { - tmp := m.GetGoogleComputeEngine() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleComputeEngine", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -730,51 +663,48 @@ func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - { - tmp := m.GetServiceAccountJwtAccess() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "ServiceAccountJwtAccess", - reason: "embedded message failed validation", - cause: err, - } + 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: - { - tmp := m.GetGoogleIam() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleIam", - reason: "embedded message failed validation", - cause: err, - } + 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: - { - tmp := m.GetFromPlugin() + 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, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + case *GrpcService_GoogleGrpc_CallCredentials_StsService_: - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "FromPlugin", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -1026,34 +956,24 @@ func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) V case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_Config: - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, } } } case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -1128,3 +1048,107 @@ var _ interface { 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, an error +// is returned. +func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error { + if m == nil { + return nil + } + + // 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 len(m.GetSubjectTokenPath()) < 1 { + return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ + field: "SubjectTokenPath", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetSubjectTokenType()) < 1 { + return GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ + field: "SubjectTokenType", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for ActorTokenPath + + // no validation rules for ActorTokenType + + return nil +} + +// 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{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.go index 4460b01b5b..a0e8b1d88a 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.go @@ -1,57 +1,43 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/health_check.proto -package core +package envoy_api_v2_core import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - time "time" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" _type "github.com/envoyproxy/go-control-plane/envoy/type" + matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + duration "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// 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_UNKNOWN HealthStatus = 0 + HealthStatus_HEALTHY HealthStatus = 1 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 + HealthStatus_DRAINING HealthStatus = 3 + HealthStatus_TIMEOUT HealthStatus = 4 + HealthStatus_DEGRADED HealthStatus = 5 ) var HealthStatus_name = map[int32]string{ @@ -81,77 +67,32 @@ func (HealthStatus) EnumDescriptor() ([]byte, []int) { } type HealthCheck struct { - // The time to wait for a health check response. If the timeout is reached the - // health check attempt will be considered a failure. - Timeout *time.Duration `protobuf:"bytes,1,opt,name=timeout,proto3,stdduration" json:"timeout,omitempty"` - // The interval between health checks. - Interval *time.Duration `protobuf:"bytes,2,opt,name=interval,proto3,stdduration" json:"interval,omitempty"` - // An optional jitter amount in milliseconds. If specified, during every - // interval Envoy will add interval_jitter to the wait time. - IntervalJitter *types.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 503 - // this threshold is ignored and the host is considered unhealthy immediately. - UnhealthyThreshold *types.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 *types.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 *types.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 *types.BoolValue `protobuf:"bytes,7,opt,name=reuse_connection,json=reuseConnection,proto3" json:"reuse_connection,omitempty"` + Timeout *duration.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` + Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` + InitialJitter *duration.Duration `protobuf:"bytes,20,opt,name=initial_jitter,json=initialJitter,proto3" json:"initial_jitter,omitempty"` + IntervalJitter *duration.Duration `protobuf:"bytes,3,opt,name=interval_jitter,json=intervalJitter,proto3" json:"interval_jitter,omitempty"` + IntervalJitterPercent uint32 `protobuf:"varint,18,opt,name=interval_jitter_percent,json=intervalJitterPercent,proto3" json:"interval_jitter_percent,omitempty"` + UnhealthyThreshold *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=unhealthy_threshold,json=unhealthyThreshold,proto3" json:"unhealthy_threshold,omitempty"` + HealthyThreshold *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=healthy_threshold,json=healthyThreshold,proto3" json:"healthy_threshold,omitempty"` + AltPort *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=alt_port,json=altPort,proto3" json:"alt_port,omitempty"` + ReuseConnection *wrappers.BoolValue `protobuf:"bytes,7,opt,name=reuse_connection,json=reuseConnection,proto3" json:"reuse_connection,omitempty"` // Types that are valid to be assigned 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 *types.Duration `protobuf:"bytes,12,opt,name=no_traffic_interval,json=noTrafficInterval,proto3" json:"no_traffic_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 *types.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 *types.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 *types.Duration `protobuf:"bytes,16,opt,name=healthy_edge_interval,json=healthyEdgeInterval,proto3" json:"healthy_edge_interval,omitempty"` - // Specifies the path to the :ref:`health check event log `. - // If empty, no event log will be written. - EventLogPath string `protobuf:"bytes,17,opt,name=event_log_path,json=eventLogPath,proto3" json:"event_log_path,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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + HealthChecker isHealthCheck_HealthChecker `protobuf_oneof:"health_checker"` + NoTrafficInterval *duration.Duration `protobuf:"bytes,12,opt,name=no_traffic_interval,json=noTrafficInterval,proto3" json:"no_traffic_interval,omitempty"` + UnhealthyInterval *duration.Duration `protobuf:"bytes,14,opt,name=unhealthy_interval,json=unhealthyInterval,proto3" json:"unhealthy_interval,omitempty"` + UnhealthyEdgeInterval *duration.Duration `protobuf:"bytes,15,opt,name=unhealthy_edge_interval,json=unhealthyEdgeInterval,proto3" json:"unhealthy_edge_interval,omitempty"` + HealthyEdgeInterval *duration.Duration `protobuf:"bytes,16,opt,name=healthy_edge_interval,json=healthyEdgeInterval,proto3" json:"healthy_edge_interval,omitempty"` + EventLogPath string `protobuf:"bytes,17,opt,name=event_log_path,json=eventLogPath,proto3" json:"event_log_path,omitempty"` + EventService *EventServiceConfig `protobuf:"bytes,22,opt,name=event_service,json=eventService,proto3" json:"event_service,omitempty"` + AlwaysLogHealthCheckFailures bool `protobuf:"varint,19,opt,name=always_log_health_check_failures,json=alwaysLogHealthCheckFailures,proto3" json:"always_log_health_check_failures,omitempty"` + TlsOptions *HealthCheck_TlsOptions `protobuf:"bytes,21,opt,name=tls_options,json=tlsOptions,proto3" json:"tls_options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HealthCheck) Reset() { *m = HealthCheck{} } @@ -160,26 +101,18 @@ func (*HealthCheck) ProtoMessage() {} func (*HealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0} } + func (m *HealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck.Unmarshal(m, b) } func (m *HealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck.Marshal(b, m, deterministic) } func (m *HealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck.Merge(m, src) } func (m *HealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck.Size(m) } func (m *HealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck.DiscardUnknown(m) @@ -187,53 +120,28 @@ func (m *HealthCheck) XXX_DiscardUnknown() { var xxx_messageInfo_HealthCheck proto.InternalMessageInfo -type isHealthCheck_HealthChecker interface { - isHealthCheck_HealthChecker() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type HealthCheck_HttpHealthCheck_ struct { - HttpHealthCheck *HealthCheck_HttpHealthCheck `protobuf:"bytes,8,opt,name=http_health_check,json=httpHealthCheck,proto3,oneof"` -} -type HealthCheck_TcpHealthCheck_ struct { - TcpHealthCheck *HealthCheck_TcpHealthCheck `protobuf:"bytes,9,opt,name=tcp_health_check,json=tcpHealthCheck,proto3,oneof"` -} -type HealthCheck_GrpcHealthCheck_ struct { - GrpcHealthCheck *HealthCheck_GrpcHealthCheck `protobuf:"bytes,11,opt,name=grpc_health_check,json=grpcHealthCheck,proto3,oneof"` -} -type HealthCheck_CustomHealthCheck_ struct { - 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() {} - -func (m *HealthCheck) GetHealthChecker() isHealthCheck_HealthChecker { - if m != nil { - return m.HealthChecker - } - return nil -} - -func (m *HealthCheck) GetTimeout() *time.Duration { +func (m *HealthCheck) GetTimeout() *duration.Duration { if m != nil { return m.Timeout } return nil } -func (m *HealthCheck) GetInterval() *time.Duration { +func (m *HealthCheck) GetInterval() *duration.Duration { if m != nil { return m.Interval } return nil } -func (m *HealthCheck) GetIntervalJitter() *types.Duration { +func (m *HealthCheck) GetInitialJitter() *duration.Duration { + if m != nil { + return m.InitialJitter + } + return nil +} + +func (m *HealthCheck) GetIntervalJitter() *duration.Duration { if m != nil { return m.IntervalJitter } @@ -247,34 +155,69 @@ func (m *HealthCheck) GetIntervalJitterPercent() uint32 { return 0 } -func (m *HealthCheck) GetUnhealthyThreshold() *types.UInt32Value { +func (m *HealthCheck) GetUnhealthyThreshold() *wrappers.UInt32Value { if m != nil { return m.UnhealthyThreshold } return nil } -func (m *HealthCheck) GetHealthyThreshold() *types.UInt32Value { +func (m *HealthCheck) GetHealthyThreshold() *wrappers.UInt32Value { if m != nil { return m.HealthyThreshold } return nil } -func (m *HealthCheck) GetAltPort() *types.UInt32Value { +func (m *HealthCheck) GetAltPort() *wrappers.UInt32Value { if m != nil { return m.AltPort } return nil } -func (m *HealthCheck) GetReuseConnection() *types.BoolValue { +func (m *HealthCheck) GetReuseConnection() *wrappers.BoolValue { if m != nil { return m.ReuseConnection } return nil } +type isHealthCheck_HealthChecker interface { + isHealthCheck_HealthChecker() +} + +type HealthCheck_HttpHealthCheck_ struct { + HttpHealthCheck *HealthCheck_HttpHealthCheck `protobuf:"bytes,8,opt,name=http_health_check,json=httpHealthCheck,proto3,oneof"` +} + +type HealthCheck_TcpHealthCheck_ struct { + TcpHealthCheck *HealthCheck_TcpHealthCheck `protobuf:"bytes,9,opt,name=tcp_health_check,json=tcpHealthCheck,proto3,oneof"` +} + +type HealthCheck_GrpcHealthCheck_ struct { + GrpcHealthCheck *HealthCheck_GrpcHealthCheck `protobuf:"bytes,11,opt,name=grpc_health_check,json=grpcHealthCheck,proto3,oneof"` +} + +type HealthCheck_CustomHealthCheck_ struct { + 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() {} + +func (m *HealthCheck) GetHealthChecker() isHealthCheck_HealthChecker { + if m != nil { + return m.HealthChecker + } + return nil +} + func (m *HealthCheck) GetHttpHealthCheck() *HealthCheck_HttpHealthCheck { if x, ok := m.GetHealthChecker().(*HealthCheck_HttpHealthCheck_); ok { return x.HttpHealthCheck @@ -303,28 +246,28 @@ func (m *HealthCheck) GetCustomHealthCheck() *HealthCheck_CustomHealthCheck { return nil } -func (m *HealthCheck) GetNoTrafficInterval() *types.Duration { +func (m *HealthCheck) GetNoTrafficInterval() *duration.Duration { if m != nil { return m.NoTrafficInterval } return nil } -func (m *HealthCheck) GetUnhealthyInterval() *types.Duration { +func (m *HealthCheck) GetUnhealthyInterval() *duration.Duration { if m != nil { return m.UnhealthyInterval } return nil } -func (m *HealthCheck) GetUnhealthyEdgeInterval() *types.Duration { +func (m *HealthCheck) GetUnhealthyEdgeInterval() *duration.Duration { if m != nil { return m.UnhealthyEdgeInterval } return nil } -func (m *HealthCheck) GetHealthyEdgeInterval() *types.Duration { +func (m *HealthCheck) GetHealthyEdgeInterval() *duration.Duration { if m != nil { return m.HealthyEdgeInterval } @@ -338,6 +281,13 @@ func (m *HealthCheck) GetEventLogPath() string { return "" } +func (m *HealthCheck) GetEventService() *EventServiceConfig { + if m != nil { + return m.EventService + } + return nil +} + func (m *HealthCheck) GetAlwaysLogHealthCheckFailures() bool { if m != nil { return m.AlwaysLogHealthCheckFailures @@ -345,9 +295,16 @@ func (m *HealthCheck) GetAlwaysLogHealthCheckFailures() bool { return false } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HealthCheck) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HealthCheck_OneofMarshaler, _HealthCheck_OneofUnmarshaler, _HealthCheck_OneofSizer, []interface{}{ +func (m *HealthCheck) GetTlsOptions() *HealthCheck_TlsOptions { + if m != nil { + return m.TlsOptions + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HealthCheck) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*HealthCheck_HttpHealthCheck_)(nil), (*HealthCheck_TcpHealthCheck_)(nil), (*HealthCheck_GrpcHealthCheck_)(nil), @@ -355,109 +312,6 @@ func (*HealthCheck) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) e } } -func _HealthCheck_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HealthCheck) - // health_checker - switch x := m.HealthChecker.(type) { - case *HealthCheck_HttpHealthCheck_: - _ = b.EncodeVarint(8<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.HttpHealthCheck); err != nil { - return err - } - case *HealthCheck_TcpHealthCheck_: - _ = b.EncodeVarint(9<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TcpHealthCheck); err != nil { - return err - } - case *HealthCheck_GrpcHealthCheck_: - _ = b.EncodeVarint(11<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GrpcHealthCheck); err != nil { - return err - } - case *HealthCheck_CustomHealthCheck_: - _ = b.EncodeVarint(13<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.CustomHealthCheck); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("HealthCheck.HealthChecker has unexpected type %T", x) - } - return nil -} - -func _HealthCheck_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HealthCheck) - switch tag { - case 8: // health_checker.http_health_check - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HealthCheck_HttpHealthCheck) - err := b.DecodeMessage(msg) - m.HealthChecker = &HealthCheck_HttpHealthCheck_{msg} - return true, err - case 9: // health_checker.tcp_health_check - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HealthCheck_TcpHealthCheck) - err := b.DecodeMessage(msg) - m.HealthChecker = &HealthCheck_TcpHealthCheck_{msg} - return true, err - case 11: // health_checker.grpc_health_check - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HealthCheck_GrpcHealthCheck) - err := b.DecodeMessage(msg) - m.HealthChecker = &HealthCheck_GrpcHealthCheck_{msg} - return true, err - case 13: // health_checker.custom_health_check - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HealthCheck_CustomHealthCheck) - err := b.DecodeMessage(msg) - m.HealthChecker = &HealthCheck_CustomHealthCheck_{msg} - return true, err - default: - return false, nil - } -} - -func _HealthCheck_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HealthCheck) - // health_checker - switch x := m.HealthChecker.(type) { - case *HealthCheck_HttpHealthCheck_: - s := proto.Size(x.HttpHealthCheck) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HealthCheck_TcpHealthCheck_: - s := proto.Size(x.TcpHealthCheck) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HealthCheck_GrpcHealthCheck_: - s := proto.Size(x.GrpcHealthCheck) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HealthCheck_CustomHealthCheck_: - s := proto.Size(x.CustomHealthCheck) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Describes the encoding of the payload bytes in the payload. type HealthCheck_Payload struct { // Types that are valid to be assigned to Payload: // *HealthCheck_Payload_Text @@ -474,26 +328,18 @@ func (*HealthCheck_Payload) ProtoMessage() {} func (*HealthCheck_Payload) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0, 0} } + func (m *HealthCheck_Payload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck_Payload.Unmarshal(m, b) } func (m *HealthCheck_Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck_Payload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck_Payload.Marshal(b, m, deterministic) } func (m *HealthCheck_Payload) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck_Payload.Merge(m, src) } func (m *HealthCheck_Payload) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck_Payload.Size(m) } func (m *HealthCheck_Payload) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck_Payload.DiscardUnknown(m) @@ -503,19 +349,18 @@ var xxx_messageInfo_HealthCheck_Payload proto.InternalMessageInfo type isHealthCheck_Payload_Payload interface { isHealthCheck_Payload_Payload() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type HealthCheck_Payload_Text struct { Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"` } + type HealthCheck_Payload_Binary struct { Binary []byte `protobuf:"bytes,2,opt,name=binary,proto3,oneof"` } -func (*HealthCheck_Payload_Text) isHealthCheck_Payload_Payload() {} +func (*HealthCheck_Payload_Text) isHealthCheck_Payload_Payload() {} + func (*HealthCheck_Payload_Binary) isHealthCheck_Payload_Payload() {} func (m *HealthCheck_Payload) GetPayload() isHealthCheck_Payload_Payload { @@ -539,106 +384,29 @@ func (m *HealthCheck_Payload) GetBinary() []byte { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HealthCheck_Payload) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HealthCheck_Payload_OneofMarshaler, _HealthCheck_Payload_OneofUnmarshaler, _HealthCheck_Payload_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HealthCheck_Payload) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*HealthCheck_Payload_Text)(nil), (*HealthCheck_Payload_Binary)(nil), } } -func _HealthCheck_Payload_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HealthCheck_Payload) - // payload - switch x := m.Payload.(type) { - case *HealthCheck_Payload_Text: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Text) - case *HealthCheck_Payload_Binary: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.Binary) - case nil: - default: - return fmt.Errorf("HealthCheck_Payload.Payload has unexpected type %T", x) - } - return nil -} - -func _HealthCheck_Payload_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HealthCheck_Payload) - switch tag { - case 1: // payload.text - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Payload = &HealthCheck_Payload_Text{x} - return true, err - case 2: // payload.binary - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Payload = &HealthCheck_Payload_Binary{x} - return true, err - default: - return false, nil - } -} - -func _HealthCheck_Payload_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HealthCheck_Payload) - // payload - switch x := m.Payload.(type) { - case *HealthCheck_Payload_Text: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Text))) - n += len(x.Text) - case *HealthCheck_Payload_Binary: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Binary))) - n += len(x.Binary) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// [#comment:next free field: 10] type HealthCheck_HttpHealthCheck struct { - // 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. - 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"` - // [#not-implemented-hide:] HTTP specific response. - Receive *HealthCheck_Payload `protobuf:"bytes,4,opt,name=receive,proto3" json:"receive,omitempty"` - // An optional service name parameter which is used to validate the identity of - // the health checked cluster. See the :ref:`architecture overview - // ` for more information. - ServiceName string `protobuf:"bytes,5,opt,name=service_name,json=serviceName,proto3" json:"service_name,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"` - // If set, health checks will be made using http/2. - UseHttp2 bool `protobuf:"varint,7,opt,name=use_http2,json=useHttp2,proto3" json:"use_http2,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 `. - ExpectedStatuses []*_type.Int64Range `protobuf:"bytes,9,rep,name=expected_statuses,json=expectedStatuses,proto3" json:"expected_statuses,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Send *HealthCheck_Payload `protobuf:"bytes,3,opt,name=send,proto3" json:"send,omitempty"` + Receive *HealthCheck_Payload `protobuf:"bytes,4,opt,name=receive,proto3" json:"receive,omitempty"` + ServiceName string `protobuf:"bytes,5,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // Deprecated: Do not use. + RequestHeadersToAdd []*HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` + UseHttp2 bool `protobuf:"varint,7,opt,name=use_http2,json=useHttp2,proto3" json:"use_http2,omitempty"` // Deprecated: Do not use. + ExpectedStatuses []*_type.Int64Range `protobuf:"bytes,9,rep,name=expected_statuses,json=expectedStatuses,proto3" json:"expected_statuses,omitempty"` + CodecClientType _type.CodecClientType `protobuf:"varint,10,opt,name=codec_client_type,json=codecClientType,proto3,enum=envoy.type.CodecClientType" json:"codec_client_type,omitempty"` + ServiceNameMatcher *matcher.StringMatcher `protobuf:"bytes,11,opt,name=service_name_matcher,json=serviceNameMatcher,proto3" json:"service_name_matcher,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HealthCheck_HttpHealthCheck) Reset() { *m = HealthCheck_HttpHealthCheck{} } @@ -647,26 +415,18 @@ func (*HealthCheck_HttpHealthCheck) ProtoMessage() {} func (*HealthCheck_HttpHealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0, 1} } + func (m *HealthCheck_HttpHealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck_HttpHealthCheck.Unmarshal(m, b) } func (m *HealthCheck_HttpHealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck_HttpHealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck_HttpHealthCheck.Marshal(b, m, deterministic) } func (m *HealthCheck_HttpHealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck_HttpHealthCheck.Merge(m, src) } func (m *HealthCheck_HttpHealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck_HttpHealthCheck.Size(m) } func (m *HealthCheck_HttpHealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck_HttpHealthCheck.DiscardUnknown(m) @@ -702,6 +462,7 @@ func (m *HealthCheck_HttpHealthCheck) GetReceive() *HealthCheck_Payload { return nil } +// Deprecated: Do not use. func (m *HealthCheck_HttpHealthCheck) GetServiceName() string { if m != nil { return m.ServiceName @@ -723,6 +484,7 @@ func (m *HealthCheck_HttpHealthCheck) GetRequestHeadersToRemove() []string { return nil } +// Deprecated: Do not use. func (m *HealthCheck_HttpHealthCheck) GetUseHttp2() bool { if m != nil { return m.UseHttp2 @@ -737,12 +499,22 @@ func (m *HealthCheck_HttpHealthCheck) GetExpectedStatuses() []*_type.Int64Range return nil } +func (m *HealthCheck_HttpHealthCheck) GetCodecClientType() _type.CodecClientType { + if m != nil { + return m.CodecClientType + } + return _type.CodecClientType_HTTP1 +} + +func (m *HealthCheck_HttpHealthCheck) GetServiceNameMatcher() *matcher.StringMatcher { + if m != nil { + return m.ServiceNameMatcher + } + return nil +} + type HealthCheck_TcpHealthCheck struct { - // 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 - // binary block must be found, and in the order specified, but not - // necessarily contiguous. + Send *HealthCheck_Payload `protobuf:"bytes,1,opt,name=send,proto3" json:"send,omitempty"` Receive []*HealthCheck_Payload `protobuf:"bytes,2,rep,name=receive,proto3" json:"receive,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -755,26 +527,18 @@ func (*HealthCheck_TcpHealthCheck) ProtoMessage() {} func (*HealthCheck_TcpHealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0, 2} } + func (m *HealthCheck_TcpHealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck_TcpHealthCheck.Unmarshal(m, b) } func (m *HealthCheck_TcpHealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck_TcpHealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck_TcpHealthCheck.Marshal(b, m, deterministic) } func (m *HealthCheck_TcpHealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck_TcpHealthCheck.Merge(m, src) } func (m *HealthCheck_TcpHealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck_TcpHealthCheck.Size(m) } func (m *HealthCheck_TcpHealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck_TcpHealthCheck.DiscardUnknown(m) @@ -797,10 +561,6 @@ func (m *HealthCheck_TcpHealthCheck) GetReceive() []*HealthCheck_Payload { } type HealthCheck_RedisHealthCheck struct { - // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -813,26 +573,18 @@ func (*HealthCheck_RedisHealthCheck) ProtoMessage() {} func (*HealthCheck_RedisHealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0, 3} } + func (m *HealthCheck_RedisHealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck_RedisHealthCheck.Unmarshal(m, b) } func (m *HealthCheck_RedisHealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck_RedisHealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck_RedisHealthCheck.Marshal(b, m, deterministic) } func (m *HealthCheck_RedisHealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck_RedisHealthCheck.Merge(m, src) } func (m *HealthCheck_RedisHealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck_RedisHealthCheck.Size(m) } func (m *HealthCheck_RedisHealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck_RedisHealthCheck.DiscardUnknown(m) @@ -847,20 +599,8 @@ func (m *HealthCheck_RedisHealthCheck) GetKey() string { return "" } -// `grpc.health.v1.Health -// `_-based -// healthcheck. See `gRPC doc `_ -// for details. type HealthCheck_GrpcHealthCheck struct { - // 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. + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -873,26 +613,18 @@ func (*HealthCheck_GrpcHealthCheck) ProtoMessage() {} func (*HealthCheck_GrpcHealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0, 4} } + func (m *HealthCheck_GrpcHealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck_GrpcHealthCheck.Unmarshal(m, b) } func (m *HealthCheck_GrpcHealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck_GrpcHealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck_GrpcHealthCheck.Marshal(b, m, deterministic) } func (m *HealthCheck_GrpcHealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck_GrpcHealthCheck.Merge(m, src) } func (m *HealthCheck_GrpcHealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck_GrpcHealthCheck.Size(m) } func (m *HealthCheck_GrpcHealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck_GrpcHealthCheck.DiscardUnknown(m) @@ -914,13 +646,8 @@ func (m *HealthCheck_GrpcHealthCheck) GetAuthority() string { return "" } -// Custom health check. type HealthCheck_CustomHealthCheck struct { - // 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. - // // Types that are valid to be assigned to ConfigType: // *HealthCheck_CustomHealthCheck_Config // *HealthCheck_CustomHealthCheck_TypedConfig @@ -936,26 +663,18 @@ func (*HealthCheck_CustomHealthCheck) ProtoMessage() {} func (*HealthCheck_CustomHealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_b6ca44dd529b90bd, []int{0, 5} } + func (m *HealthCheck_CustomHealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheck_CustomHealthCheck.Unmarshal(m, b) } func (m *HealthCheck_CustomHealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheck_CustomHealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheck_CustomHealthCheck.Marshal(b, m, deterministic) } func (m *HealthCheck_CustomHealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheck_CustomHealthCheck.Merge(m, src) } func (m *HealthCheck_CustomHealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheck_CustomHealthCheck.Size(m) } func (m *HealthCheck_CustomHealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheck_CustomHealthCheck.DiscardUnknown(m) @@ -963,21 +682,27 @@ func (m *HealthCheck_CustomHealthCheck) XXX_DiscardUnknown() { var xxx_messageInfo_HealthCheck_CustomHealthCheck proto.InternalMessageInfo +func (m *HealthCheck_CustomHealthCheck) GetName() string { + if m != nil { + return m.Name + } + return "" +} + type isHealthCheck_CustomHealthCheck_ConfigType interface { isHealthCheck_CustomHealthCheck_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int } type HealthCheck_CustomHealthCheck_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type HealthCheck_CustomHealthCheck_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` } -func (*HealthCheck_CustomHealthCheck_Config) isHealthCheck_CustomHealthCheck_ConfigType() {} +type HealthCheck_CustomHealthCheck_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*HealthCheck_CustomHealthCheck_Config) isHealthCheck_CustomHealthCheck_ConfigType() {} + func (*HealthCheck_CustomHealthCheck_TypedConfig) isHealthCheck_CustomHealthCheck_ConfigType() {} func (m *HealthCheck_CustomHealthCheck) GetConfigType() isHealthCheck_CustomHealthCheck_ConfigType { @@ -987,101 +712,68 @@ func (m *HealthCheck_CustomHealthCheck) GetConfigType() isHealthCheck_CustomHeal return nil } -func (m *HealthCheck_CustomHealthCheck) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *HealthCheck_CustomHealthCheck) GetConfig() *types.Struct { +// Deprecated: Do not use. +func (m *HealthCheck_CustomHealthCheck) GetConfig() *_struct.Struct { if x, ok := m.GetConfigType().(*HealthCheck_CustomHealthCheck_Config); ok { return x.Config } return nil } -func (m *HealthCheck_CustomHealthCheck) GetTypedConfig() *types.Any { +func (m *HealthCheck_CustomHealthCheck) GetTypedConfig() *any.Any { if x, ok := m.GetConfigType().(*HealthCheck_CustomHealthCheck_TypedConfig); ok { return x.TypedConfig } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HealthCheck_CustomHealthCheck) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HealthCheck_CustomHealthCheck_OneofMarshaler, _HealthCheck_CustomHealthCheck_OneofUnmarshaler, _HealthCheck_CustomHealthCheck_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HealthCheck_CustomHealthCheck) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*HealthCheck_CustomHealthCheck_Config)(nil), (*HealthCheck_CustomHealthCheck_TypedConfig)(nil), } } -func _HealthCheck_CustomHealthCheck_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HealthCheck_CustomHealthCheck) - // config_type - switch x := m.ConfigType.(type) { - case *HealthCheck_CustomHealthCheck_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *HealthCheck_CustomHealthCheck_TypedConfig: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("HealthCheck_CustomHealthCheck.ConfigType has unexpected type %T", x) +type HealthCheck_TlsOptions struct { + AlpnProtocols []string `protobuf:"bytes,1,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HealthCheck_TlsOptions) Reset() { *m = HealthCheck_TlsOptions{} } +func (m *HealthCheck_TlsOptions) String() string { return proto.CompactTextString(m) } +func (*HealthCheck_TlsOptions) ProtoMessage() {} +func (*HealthCheck_TlsOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_b6ca44dd529b90bd, []int{0, 6} +} + +func (m *HealthCheck_TlsOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HealthCheck_TlsOptions.Unmarshal(m, b) +} +func (m *HealthCheck_TlsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HealthCheck_TlsOptions.Marshal(b, m, deterministic) +} +func (m *HealthCheck_TlsOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheck_TlsOptions.Merge(m, src) +} +func (m *HealthCheck_TlsOptions) XXX_Size() int { + return xxx_messageInfo_HealthCheck_TlsOptions.Size(m) +} +func (m *HealthCheck_TlsOptions) XXX_DiscardUnknown() { + xxx_messageInfo_HealthCheck_TlsOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_HealthCheck_TlsOptions proto.InternalMessageInfo + +func (m *HealthCheck_TlsOptions) GetAlpnProtocols() []string { + if m != nil { + return m.AlpnProtocols } return nil } -func _HealthCheck_CustomHealthCheck_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HealthCheck_CustomHealthCheck) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &HealthCheck_CustomHealthCheck_Config{msg} - return true, err - case 3: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &HealthCheck_CustomHealthCheck_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _HealthCheck_CustomHealthCheck_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HealthCheck_CustomHealthCheck) - // config_type - switch x := m.ConfigType.(type) { - case *HealthCheck_CustomHealthCheck_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HealthCheck_CustomHealthCheck_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { proto.RegisterEnum("envoy.api.v2.core.HealthStatus", HealthStatus_name, HealthStatus_value) proto.RegisterType((*HealthCheck)(nil), "envoy.api.v2.core.HealthCheck") @@ -1091,6 +783,7 @@ func init() { proto.RegisterType((*HealthCheck_RedisHealthCheck)(nil), "envoy.api.v2.core.HealthCheck.RedisHealthCheck") proto.RegisterType((*HealthCheck_GrpcHealthCheck)(nil), "envoy.api.v2.core.HealthCheck.GrpcHealthCheck") proto.RegisterType((*HealthCheck_CustomHealthCheck)(nil), "envoy.api.v2.core.HealthCheck.CustomHealthCheck") + proto.RegisterType((*HealthCheck_TlsOptions)(nil), "envoy.api.v2.core.HealthCheck.TlsOptions") } func init() { @@ -1098,3177 +791,96 @@ func init() { } var fileDescriptor_b6ca44dd529b90bd = []byte{ - // 1203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xc7, 0xbd, 0xb1, 0x13, 0xdb, 0x8f, 0x9d, 0x64, 0x3d, 0x6e, 0x93, 0xad, 0x09, 0xa9, 0x41, - 0x11, 0x8a, 0x2a, 0x61, 0x83, 0x8b, 0x8a, 0xca, 0x89, 0x38, 0x71, 0x63, 0x97, 0xd6, 0x8d, 0xa6, - 0x4e, 0x51, 0x25, 0xd0, 0x32, 0xd9, 0x9d, 0xac, 0x97, 0x6e, 0x76, 0x96, 0xd9, 0x59, 0xb7, 0xfe, - 0x12, 0x1c, 0x38, 0xf1, 0x11, 0x50, 0x2f, 0x5c, 0x2b, 0x4e, 0x3d, 0x72, 0xe4, 0x1b, 0x80, 0x72, - 0xa2, 0x7c, 0x0a, 0x34, 0xb3, 0xeb, 0xf7, 0xa0, 0x24, 0xe2, 0x36, 0xfb, 0x3c, 0xcf, 0xff, 0x37, - 0x2f, 0xcf, 0x8b, 0x16, 0x76, 0xa8, 0x3f, 0x60, 0xc3, 0x3a, 0x09, 0xdc, 0xfa, 0xa0, 0x51, 0xb7, - 0x18, 0xa7, 0xf5, 0x3e, 0x25, 0x9e, 0xe8, 0x9b, 0x56, 0x9f, 0x5a, 0x2f, 0x6a, 0x01, 0x67, 0x82, - 0xa1, 0x92, 0x8a, 0xaa, 0x91, 0xc0, 0xad, 0x0d, 0x1a, 0x35, 0x19, 0x55, 0xd9, 0x5a, 0x14, 0x9e, - 0x90, 0x90, 0xc6, 0x82, 0xca, 0x46, 0xec, 0x15, 0xc3, 0x80, 0xd6, 0x39, 0xf1, 0x9d, 0x91, 0xfd, - 0x96, 0xc3, 0x98, 0xe3, 0xd1, 0xba, 0xfa, 0x3a, 0x89, 0x4e, 0xeb, 0xc4, 0x1f, 0x26, 0xae, 0xed, - 0x79, 0x97, 0x1d, 0x71, 0x22, 0x5c, 0xe6, 0x27, 0xfe, 0xad, 0x79, 0x7f, 0x28, 0x78, 0x64, 0x89, - 0xff, 0x52, 0xbf, 0xe4, 0x24, 0x08, 0x28, 0x0f, 0x13, 0xff, 0xe6, 0x80, 0x78, 0xae, 0x4d, 0x04, - 0xad, 0x8f, 0x16, 0x89, 0xe3, 0x86, 0xc3, 0x1c, 0xa6, 0x96, 0x75, 0xb9, 0x8a, 0xad, 0x1f, 0xbe, - 0x29, 0x43, 0xa1, 0xad, 0xde, 0x61, 0x5f, 0x3e, 0x03, 0x6a, 0x41, 0x56, 0xb8, 0x67, 0x94, 0x45, - 0xc2, 0xd0, 0xaa, 0xda, 0x6e, 0xa1, 0x71, 0xab, 0x16, 0x6f, 0x58, 0x1b, 0x6d, 0x58, 0x3b, 0x48, - 0x8e, 0xdb, 0xd4, 0x7f, 0xfe, 0xf3, 0xb6, 0xf6, 0xdb, 0xbb, 0xb7, 0xe9, 0xec, 0x6b, 0x2d, 0x93, - 0xd3, 0xee, 0xa4, 0xf0, 0x48, 0x8b, 0x0e, 0x21, 0xe7, 0xfa, 0x82, 0xf2, 0x01, 0xf1, 0x8c, 0xa5, - 0xeb, 0x73, 0xc6, 0x62, 0xd4, 0x84, 0xf5, 0xd1, 0xda, 0xfc, 0xde, 0x15, 0x82, 0x72, 0x23, 0x7d, - 0x09, 0x0f, 0xaf, 0x8d, 0x14, 0x0f, 0x95, 0x00, 0xdd, 0x83, 0xcd, 0x39, 0x86, 0x19, 0x50, 0x6e, - 0x51, 0x5f, 0x18, 0xa8, 0xaa, 0xed, 0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xa6, 0xb4, 0x36, - 0x37, 0x61, 0x6d, 0x7a, 0x7c, 0x50, 0x9e, 0xb4, 0xf0, 0xc3, 0x4c, 0x0e, 0xf4, 0x02, 0x46, 0x5c, - 0x3e, 0xe4, 0xcc, 0x84, 0xb9, 0xf3, 0x1d, 0x14, 0xe3, 0xdb, 0xc5, 0x15, 0x80, 0x0a, 0x90, 0x3d, - 0xee, 0x7e, 0xd5, 0x7d, 0xf2, 0x75, 0x57, 0x4f, 0xc9, 0x8f, 0x76, 0x6b, 0xef, 0x51, 0xaf, 0xfd, - 0x5c, 0xd7, 0xd0, 0x2a, 0xe4, 0x8f, 0xbb, 0xa3, 0xcf, 0x25, 0x54, 0x84, 0xdc, 0x01, 0xde, 0xeb, - 0x74, 0x3b, 0xdd, 0x43, 0x3d, 0x2d, 0x23, 0x7b, 0x9d, 0xc7, 0xad, 0x27, 0xc7, 0x3d, 0x3d, 0xa3, - 0x5c, 0xad, 0x43, 0xbc, 0x77, 0xd0, 0x3a, 0xd0, 0x97, 0x9b, 0xad, 0x5f, 0xce, 0xb7, 0xb5, 0xdf, - 0xcf, 0xb7, 0xb5, 0x3f, 0xce, 0xb7, 0xb5, 0xbf, 0xce, 0xb7, 0x35, 0xb8, 0xed, 0xb2, 0xb8, 0x0a, - 0x02, 0xce, 0x5e, 0x0d, 0x17, 0x0b, 0xa2, 0xa9, 0x4f, 0x3d, 0xf8, 0x91, 0xbc, 0xfe, 0x91, 0x76, - 0xb2, 0xa2, 0xde, 0xe1, 0xee, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x48, 0x23, 0xf9, 0xf6, 0x83, - 0x0b, 0x00, 0x00, + // 1456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x97, 0x4d, 0x73, 0xdb, 0xc6, + 0x19, 0xc7, 0x05, 0x8a, 0x12, 0xc9, 0x87, 0x12, 0x05, 0xae, 0xde, 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93, 0x09, 0x31, 0x1f, 0x59, 0x8f, 0x12, 0xa3, 0xb9, 0x0c, 0xa5, 0x74, 0xbd, 0xa5, 0x5c, + 0x56, 0xaa, 0x83, 0x6c, 0x1e, 0xf4, 0xe2, 0x83, 0xff, 0xc2, 0x5c, 0x7c, 0xfc, 0x38, 0x94, 0x51, + 0x11, 0x72, 0x27, 0x87, 0xff, 0x38, 0x7c, 0xf1, 0xf2, 0x50, 0x9f, 0x8a, 0x06, 0xcd, 0xbd, 0xed, + 0x67, 0xad, 0xe6, 0x2b, 0x5d, 0x43, 0xf3, 0x50, 0x38, 0x39, 0x4c, 0x86, 0x19, 0x34, 0x07, 0xf9, + 0x5d, 0xbc, 0xbd, 0x7f, 0xb8, 0x7f, 0xf8, 0x54, 0x9f, 0x8e, 0x3c, 0x5b, 0xfb, 0xcf, 0xf7, 0x5e, + 0x9c, 0xb4, 0xf4, 0xac, 0x9c, 0xda, 0x7b, 0x8a, 0xb7, 0x77, 0xf7, 0x76, 0xf5, 0x19, 0xf3, 0xd5, + 0xfb, 0xcf, 0x7e, 0xfa, 0x64, 0x66, 0x05, 0x2d, 0xc5, 0x91, 0xa1, 0xfe, 0x27, 0xc9, 0xc8, 0xe8, + 0x6d, 0x7d, 0xf5, 0xc1, 0xd7, 0xdf, 0xcc, 0x66, 0x74, 0x0d, 0xee, 0xb9, 0x2c, 0x0e, 0x9d, 0x80, + 0xb3, 0xb7, 0xfd, 0xf1, 0x28, 0x32, 0xf5, 0xd4, 0x2d, 0xc9, 0xb3, 0x1d, 0x69, 0xa7, 0xb3, 0xf2, + 0xe4, 0x5b, 0x3f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x98, 0xd1, 0x65, 0x39, 0xf4, 0x0d, 0x00, 0x00, } - -func (this *HealthCheck) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck) - if !ok { - that2, ok := that.(HealthCheck) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Timeout != nil && that1.Timeout != nil { - if *this.Timeout != *that1.Timeout { - return false - } - } else if this.Timeout != nil { - return false - } else if that1.Timeout != nil { - return false - } - if this.Interval != nil && that1.Interval != nil { - if *this.Interval != *that1.Interval { - return false - } - } else if this.Interval != nil { - return false - } else if that1.Interval != nil { - return false - } - if !this.IntervalJitter.Equal(that1.IntervalJitter) { - return false - } - if this.IntervalJitterPercent != that1.IntervalJitterPercent { - return false - } - if !this.UnhealthyThreshold.Equal(that1.UnhealthyThreshold) { - return false - } - if !this.HealthyThreshold.Equal(that1.HealthyThreshold) { - return false - } - if !this.AltPort.Equal(that1.AltPort) { - return false - } - if !this.ReuseConnection.Equal(that1.ReuseConnection) { - return false - } - if that1.HealthChecker == nil { - if this.HealthChecker != nil { - return false - } - } else if this.HealthChecker == nil { - return false - } else if !this.HealthChecker.Equal(that1.HealthChecker) { - return false - } - if !this.NoTrafficInterval.Equal(that1.NoTrafficInterval) { - return false - } - if !this.UnhealthyInterval.Equal(that1.UnhealthyInterval) { - return false - } - if !this.UnhealthyEdgeInterval.Equal(that1.UnhealthyEdgeInterval) { - return false - } - if !this.HealthyEdgeInterval.Equal(that1.HealthyEdgeInterval) { - return false - } - if this.EventLogPath != that1.EventLogPath { - return false - } - if this.AlwaysLogHealthCheckFailures != that1.AlwaysLogHealthCheckFailures { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_HttpHealthCheck_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_HttpHealthCheck_) - if !ok { - that2, ok := that.(HealthCheck_HttpHealthCheck_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.HttpHealthCheck.Equal(that1.HttpHealthCheck) { - return false - } - return true -} -func (this *HealthCheck_TcpHealthCheck_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_TcpHealthCheck_) - if !ok { - that2, ok := that.(HealthCheck_TcpHealthCheck_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TcpHealthCheck.Equal(that1.TcpHealthCheck) { - return false - } - return true -} -func (this *HealthCheck_GrpcHealthCheck_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_GrpcHealthCheck_) - if !ok { - that2, ok := that.(HealthCheck_GrpcHealthCheck_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.GrpcHealthCheck.Equal(that1.GrpcHealthCheck) { - return false - } - return true -} -func (this *HealthCheck_CustomHealthCheck_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_CustomHealthCheck_) - if !ok { - that2, ok := that.(HealthCheck_CustomHealthCheck_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.CustomHealthCheck.Equal(that1.CustomHealthCheck) { - return false - } - return true -} -func (this *HealthCheck_Payload) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_Payload) - if !ok { - that2, ok := that.(HealthCheck_Payload) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Payload == nil { - if this.Payload != nil { - return false - } - } else if this.Payload == nil { - return false - } else if !this.Payload.Equal(that1.Payload) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_Payload_Text) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_Payload_Text) - if !ok { - that2, ok := that.(HealthCheck_Payload_Text) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Text != that1.Text { - return false - } - return true -} -func (this *HealthCheck_Payload_Binary) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_Payload_Binary) - if !ok { - that2, ok := that.(HealthCheck_Payload_Binary) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Binary, that1.Binary) { - return false - } - return true -} -func (this *HealthCheck_HttpHealthCheck) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_HttpHealthCheck) - if !ok { - that2, ok := that.(HealthCheck_HttpHealthCheck) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Host != that1.Host { - return false - } - if this.Path != that1.Path { - return false - } - if !this.Send.Equal(that1.Send) { - return false - } - if !this.Receive.Equal(that1.Receive) { - return false - } - if this.ServiceName != that1.ServiceName { - return false - } - if len(this.RequestHeadersToAdd) != len(that1.RequestHeadersToAdd) { - return false - } - for i := range this.RequestHeadersToAdd { - if !this.RequestHeadersToAdd[i].Equal(that1.RequestHeadersToAdd[i]) { - return false - } - } - if len(this.RequestHeadersToRemove) != len(that1.RequestHeadersToRemove) { - return false - } - for i := range this.RequestHeadersToRemove { - if this.RequestHeadersToRemove[i] != that1.RequestHeadersToRemove[i] { - return false - } - } - if this.UseHttp2 != that1.UseHttp2 { - return false - } - if len(this.ExpectedStatuses) != len(that1.ExpectedStatuses) { - return false - } - for i := range this.ExpectedStatuses { - if !this.ExpectedStatuses[i].Equal(that1.ExpectedStatuses[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_TcpHealthCheck) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_TcpHealthCheck) - if !ok { - that2, ok := that.(HealthCheck_TcpHealthCheck) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Send.Equal(that1.Send) { - return false - } - if len(this.Receive) != len(that1.Receive) { - return false - } - for i := range this.Receive { - if !this.Receive[i].Equal(that1.Receive[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_RedisHealthCheck) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_RedisHealthCheck) - if !ok { - that2, ok := that.(HealthCheck_RedisHealthCheck) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Key != that1.Key { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_GrpcHealthCheck) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_GrpcHealthCheck) - if !ok { - that2, ok := that.(HealthCheck_GrpcHealthCheck) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ServiceName != that1.ServiceName { - return false - } - if this.Authority != that1.Authority { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_CustomHealthCheck) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_CustomHealthCheck) - if !ok { - that2, ok := that.(HealthCheck_CustomHealthCheck) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheck_CustomHealthCheck_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_CustomHealthCheck_Config) - if !ok { - that2, ok := that.(HealthCheck_CustomHealthCheck_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *HealthCheck_CustomHealthCheck_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheck_CustomHealthCheck_TypedConfig) - if !ok { - that2, ok := that.(HealthCheck_CustomHealthCheck_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (m *HealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Timeout != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout))) - n1, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Timeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Interval != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Interval))) - n2, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Interval, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.IntervalJitter != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.IntervalJitter.Size())) - n3, err := m.IntervalJitter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.UnhealthyThreshold != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.UnhealthyThreshold.Size())) - n4, err := m.UnhealthyThreshold.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.HealthyThreshold != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.HealthyThreshold.Size())) - n5, err := m.HealthyThreshold.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.AltPort != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.AltPort.Size())) - n6, err := m.AltPort.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.ReuseConnection != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.ReuseConnection.Size())) - n7, err := m.ReuseConnection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.HealthChecker != nil { - nn8, err := m.HealthChecker.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn8 - } - if m.NoTrafficInterval != nil { - dAtA[i] = 0x62 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.NoTrafficInterval.Size())) - n9, err := m.NoTrafficInterval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.UnhealthyInterval != nil { - dAtA[i] = 0x72 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.UnhealthyInterval.Size())) - n10, err := m.UnhealthyInterval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.UnhealthyEdgeInterval != nil { - dAtA[i] = 0x7a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.UnhealthyEdgeInterval.Size())) - n11, err := m.UnhealthyEdgeInterval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.HealthyEdgeInterval != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.HealthyEdgeInterval.Size())) - n12, err := m.HealthyEdgeInterval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if len(m.EventLogPath) > 0 { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.EventLogPath))) - i += copy(dAtA[i:], m.EventLogPath) - } - if m.IntervalJitterPercent != 0 { - dAtA[i] = 0x90 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.IntervalJitterPercent)) - } - if m.AlwaysLogHealthCheckFailures { - dAtA[i] = 0x98 - i++ - dAtA[i] = 0x1 - i++ - if m.AlwaysLogHealthCheckFailures { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_HttpHealthCheck_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.HttpHealthCheck != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.HttpHealthCheck.Size())) - n13, err := m.HttpHealthCheck.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - return i, nil -} -func (m *HealthCheck_TcpHealthCheck_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TcpHealthCheck != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.TcpHealthCheck.Size())) - n14, err := m.TcpHealthCheck.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - return i, nil -} -func (m *HealthCheck_GrpcHealthCheck_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GrpcHealthCheck != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.GrpcHealthCheck.Size())) - n15, err := m.GrpcHealthCheck.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - return i, nil -} -func (m *HealthCheck_CustomHealthCheck_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.CustomHealthCheck != nil { - dAtA[i] = 0x6a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.CustomHealthCheck.Size())) - n16, err := m.CustomHealthCheck.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - return i, nil -} -func (m *HealthCheck_Payload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck_Payload) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Payload != nil { - nn17, err := m.Payload.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn17 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_Payload_Text) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Text))) - i += copy(dAtA[i:], m.Text) - return i, nil -} -func (m *HealthCheck_Payload_Binary) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Binary != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Binary))) - i += copy(dAtA[i:], m.Binary) - } - return i, nil -} -func (m *HealthCheck_HttpHealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck_HttpHealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Host) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Host))) - i += copy(dAtA[i:], m.Host) - } - if len(m.Path) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - } - if m.Send != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.Send.Size())) - n18, err := m.Send.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.Receive != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.Receive.Size())) - n19, err := m.Receive.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if len(m.ServiceName) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.ServiceName))) - i += copy(dAtA[i:], m.ServiceName) - } - if len(m.RequestHeadersToAdd) > 0 { - for _, msg := range m.RequestHeadersToAdd { - dAtA[i] = 0x32 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.UseHttp2 { - dAtA[i] = 0x38 - i++ - if m.UseHttp2 { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - dAtA[i] = 0x42 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ExpectedStatuses) > 0 { - for _, msg := range m.ExpectedStatuses { - dAtA[i] = 0x4a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_TcpHealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck_TcpHealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Send != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.Send.Size())) - n20, err := m.Send.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if len(m.Receive) > 0 { - for _, msg := range m.Receive { - dAtA[i] = 0x12 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_RedisHealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck_RedisHealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_GrpcHealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck_GrpcHealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ServiceName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.ServiceName))) - i += copy(dAtA[i:], m.ServiceName) - } - if len(m.Authority) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Authority))) - i += copy(dAtA[i:], m.Authority) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_CustomHealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheck_CustomHealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn21, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn21 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheck_CustomHealthCheck_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.Config.Size())) - n22, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - return i, nil -} -func (m *HealthCheck_CustomHealthCheck_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHealthCheck(dAtA, i, uint64(m.TypedConfig.Size())) - n23, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - return i, nil -} -func encodeVarintHealthCheck(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *HealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Timeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout) - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.Interval != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Interval) - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.IntervalJitter != nil { - l = m.IntervalJitter.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.UnhealthyThreshold != nil { - l = m.UnhealthyThreshold.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.HealthyThreshold != nil { - l = m.HealthyThreshold.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.AltPort != nil { - l = m.AltPort.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.ReuseConnection != nil { - l = m.ReuseConnection.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.HealthChecker != nil { - n += m.HealthChecker.Size() - } - if m.NoTrafficInterval != nil { - l = m.NoTrafficInterval.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.UnhealthyInterval != nil { - l = m.UnhealthyInterval.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.UnhealthyEdgeInterval != nil { - l = m.UnhealthyEdgeInterval.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.HealthyEdgeInterval != nil { - l = m.HealthyEdgeInterval.Size() - n += 2 + l + sovHealthCheck(uint64(l)) - } - l = len(m.EventLogPath) - if l > 0 { - n += 2 + l + sovHealthCheck(uint64(l)) - } - if m.IntervalJitterPercent != 0 { - n += 2 + sovHealthCheck(uint64(m.IntervalJitterPercent)) - } - if m.AlwaysLogHealthCheckFailures { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_HttpHealthCheck_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HttpHealthCheck != nil { - l = m.HttpHealthCheck.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} -func (m *HealthCheck_TcpHealthCheck_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TcpHealthCheck != nil { - l = m.TcpHealthCheck.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} -func (m *HealthCheck_GrpcHealthCheck_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GrpcHealthCheck != nil { - l = m.GrpcHealthCheck.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} -func (m *HealthCheck_CustomHealthCheck_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CustomHealthCheck != nil { - l = m.CustomHealthCheck.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} -func (m *HealthCheck_Payload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Payload != nil { - n += m.Payload.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_Payload_Text) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Text) - n += 1 + l + sovHealthCheck(uint64(l)) - return n -} -func (m *HealthCheck_Payload_Binary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Binary != nil { - l = len(m.Binary) - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} -func (m *HealthCheck_HttpHealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.Send != nil { - l = m.Send.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.Receive != nil { - l = m.Receive.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - l = len(m.ServiceName) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - if len(m.RequestHeadersToAdd) > 0 { - for _, e := range m.RequestHeadersToAdd { - l = e.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - } - if m.UseHttp2 { - n += 2 - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - l = len(s) - n += 1 + l + sovHealthCheck(uint64(l)) - } - } - if len(m.ExpectedStatuses) > 0 { - for _, e := range m.ExpectedStatuses { - l = e.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_TcpHealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Send != nil { - l = m.Send.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - if len(m.Receive) > 0 { - for _, e := range m.Receive { - l = e.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_RedisHealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_GrpcHealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ServiceName) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_CustomHealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovHealthCheck(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheck_CustomHealthCheck_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} -func (m *HealthCheck_CustomHealthCheck_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovHealthCheck(uint64(l)) - } - return n -} - -func sovHealthCheck(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozHealthCheck(x uint64) (n int) { - return sovHealthCheck(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *HealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timeout == nil { - m.Timeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Timeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Interval == nil { - m.Interval = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Interval, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IntervalJitter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IntervalJitter == nil { - m.IntervalJitter = &types.Duration{} - } - if err := m.IntervalJitter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnhealthyThreshold", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnhealthyThreshold == nil { - m.UnhealthyThreshold = &types.UInt32Value{} - } - if err := m.UnhealthyThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthyThreshold", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HealthyThreshold == nil { - m.HealthyThreshold = &types.UInt32Value{} - } - if err := m.HealthyThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltPort", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AltPort == nil { - m.AltPort = &types.UInt32Value{} - } - if err := m.AltPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReuseConnection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReuseConnection == nil { - m.ReuseConnection = &types.BoolValue{} - } - if err := m.ReuseConnection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpHealthCheck", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &HealthCheck_HttpHealthCheck{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HealthChecker = &HealthCheck_HttpHealthCheck_{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TcpHealthCheck", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &HealthCheck_TcpHealthCheck{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HealthChecker = &HealthCheck_TcpHealthCheck_{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcHealthCheck", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &HealthCheck_GrpcHealthCheck{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HealthChecker = &HealthCheck_GrpcHealthCheck_{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoTrafficInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoTrafficInterval == nil { - m.NoTrafficInterval = &types.Duration{} - } - if err := m.NoTrafficInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomHealthCheck", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &HealthCheck_CustomHealthCheck{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HealthChecker = &HealthCheck_CustomHealthCheck_{v} - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnhealthyInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnhealthyInterval == nil { - m.UnhealthyInterval = &types.Duration{} - } - if err := m.UnhealthyInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnhealthyEdgeInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnhealthyEdgeInterval == nil { - m.UnhealthyEdgeInterval = &types.Duration{} - } - if err := m.UnhealthyEdgeInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthyEdgeInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HealthyEdgeInterval == nil { - m.HealthyEdgeInterval = &types.Duration{} - } - if err := m.HealthyEdgeInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventLogPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventLogPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntervalJitterPercent", wireType) - } - m.IntervalJitterPercent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IntervalJitterPercent |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AlwaysLogHealthCheckFailures", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AlwaysLogHealthCheckFailures = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 *HealthCheck_Payload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Payload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Payload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = &HealthCheck_Payload_Text{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Binary", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Payload = &HealthCheck_Payload_Binary{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 *HealthCheck_HttpHealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpHealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpHealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Send", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Send == nil { - m.Send = &HealthCheck_Payload{} - } - if err := m.Send.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Receive == nil { - m.Receive = &HealthCheck_Payload{} - } - if err := m.Receive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToAdd = append(m.RequestHeadersToAdd, &HeaderValueOption{}) - if err := m.RequestHeadersToAdd[len(m.RequestHeadersToAdd)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UseHttp2", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UseHttp2 = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToRemove = append(m.RequestHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpectedStatuses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExpectedStatuses = append(m.ExpectedStatuses, &_type.Int64Range{}) - if err := m.ExpectedStatuses[len(m.ExpectedStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 *HealthCheck_TcpHealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TcpHealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TcpHealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Send", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Send == nil { - m.Send = &HealthCheck_Payload{} - } - if err := m.Send.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receive = append(m.Receive, &HealthCheck_Payload{}) - if err := m.Receive[len(m.Receive)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 *HealthCheck_RedisHealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedisHealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedisHealthCheck: 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 ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 *HealthCheck_GrpcHealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GrpcHealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GrpcHealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 *HealthCheck_CustomHealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomHealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomHealthCheck: 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 ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &HealthCheck_CustomHealthCheck_Config{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHealthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHealthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &HealthCheck_CustomHealthCheck_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHealthCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHealthCheck - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHealthCheck - } - 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 skipHealthCheck(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHealthCheck - } - 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, ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHealthCheck - } - 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, ErrInvalidLengthHealthCheck - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthHealthCheck - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHealthCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHealthCheck(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthHealthCheck - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHealthCheck = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHealthCheck = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.validate.go index 465b476cc0..b9c219e52d 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/health_check.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/health_check.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,9 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" + + _type "github.com/envoyproxy/go-control-plane/envoy/type" ) // ensure the imports are used @@ -30,9 +32,14 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} + + _ = _type.CodecClientType(0) ) +// define the regex for a UUID once up-front +var _health_check_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on HealthCheck with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. @@ -49,7 +56,14 @@ func (m *HealthCheck) Validate() error { } if d := m.GetTimeout(); d != nil { - dur := *d + dur, err := ptypes.Duration(d) + if err != nil { + return HealthCheckValidationError{ + field: "Timeout", + reason: "value is not a valid duration", + cause: err, + } + } gt := time.Duration(0*time.Second + 0*time.Nanosecond) @@ -70,7 +84,14 @@ func (m *HealthCheck) Validate() error { } if d := m.GetInterval(); d != nil { - dur := *d + dur, err := ptypes.Duration(d) + if err != nil { + return HealthCheckValidationError{ + field: "Interval", + reason: "value is not a valid duration", + cause: err, + } + } gt := time.Duration(0*time.Second + 0*time.Nanosecond) @@ -83,85 +104,84 @@ func (m *HealthCheck) Validate() error { } - { - tmp := m.GetIntervalJitter() + 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 v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - } + 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 - { - tmp := m.GetUnhealthyThreshold() + if m.GetUnhealthyThreshold() == nil { + return HealthCheckValidationError{ + field: "UnhealthyThreshold", + reason: "value is required", + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetHealthyThreshold() + if m.GetHealthyThreshold() == nil { + return HealthCheckValidationError{ + field: "HealthyThreshold", + reason: "value is required", + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetAltPort() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "AltPort", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetReuseConnection() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "ReuseConnection", - reason: "embedded message failed validation", - cause: err, - } + 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 := types.DurationFromProto(d) + dur, err := ptypes.Duration(d) if err != nil { return HealthCheckValidationError{ field: "NoTrafficInterval", @@ -182,7 +202,7 @@ func (m *HealthCheck) Validate() error { } if d := m.GetUnhealthyInterval(); d != nil { - dur, err := types.DurationFromProto(d) + dur, err := ptypes.Duration(d) if err != nil { return HealthCheckValidationError{ field: "UnhealthyInterval", @@ -203,7 +223,7 @@ func (m *HealthCheck) Validate() error { } if d := m.GetUnhealthyEdgeInterval(); d != nil { - dur, err := types.DurationFromProto(d) + dur, err := ptypes.Duration(d) if err != nil { return HealthCheckValidationError{ field: "UnhealthyEdgeInterval", @@ -224,7 +244,7 @@ func (m *HealthCheck) Validate() error { } if d := m.GetHealthyEdgeInterval(); d != nil { - dur, err := types.DurationFromProto(d) + dur, err := ptypes.Duration(d) if err != nil { return HealthCheckValidationError{ field: "HealthyEdgeInterval", @@ -246,74 +266,74 @@ func (m *HealthCheck) Validate() error { // no validation rules for EventLogPath + 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 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, + } + } + } + switch m.HealthChecker.(type) { case *HealthCheck_HttpHealthCheck_: - { - tmp := m.GetHttpHealthCheck() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "HttpHealthCheck", - reason: "embedded message failed validation", - cause: err, - } + 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_: - { - tmp := m.GetTcpHealthCheck() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "TcpHealthCheck", - reason: "embedded message failed validation", - cause: err, - } + 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_: - { - tmp := m.GetGrpcHealthCheck() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "GrpcHealthCheck", - reason: "embedded message failed validation", - cause: err, - } + 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_: - { - tmp := m.GetCustomHealthCheck() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "CustomHealthCheck", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -489,32 +509,22 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { } } - { - tmp := m.GetSend() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } - { - tmp := m.GetReceive() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: "Receive", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetReceive()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheck_HttpHealthCheckValidationError{ + field: "Receive", + reason: "embedded message failed validation", + cause: err, } } } @@ -531,17 +541,12 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } + 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, } } } @@ -553,23 +558,35 @@ func (m *HealthCheck_HttpHealthCheck) Validate() error { for idx, item := range m.GetExpectedStatuses() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } + 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, } } } } + if _, ok := _type.CodecClientType_name[int32(m.GetCodecClientType())]; !ok { + return HealthCheck_HttpHealthCheckValidationError{ + field: "CodecClientType", + reason: "value must be one of the defined enum values", + } + } + + 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, + } + } + } + return nil } @@ -638,17 +655,12 @@ func (m *HealthCheck_TcpHealthCheck) Validate() error { return nil } - { - tmp := m.GetSend() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheck_TcpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -656,17 +668,12 @@ func (m *HealthCheck_TcpHealthCheck) Validate() error { for idx, item := range m.GetReceive() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(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 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, } } } @@ -893,34 +900,24 @@ func (m *HealthCheck_CustomHealthCheck) Validate() error { case *HealthCheck_CustomHealthCheck_Config: - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheck_CustomHealthCheckValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheck_CustomHealthCheckValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, } } } case *HealthCheck_CustomHealthCheck_TypedConfig: - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheck_CustomHealthCheckValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -986,3 +983,70 @@ var _ interface { 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, an error is returned. +func (m *HealthCheck_TlsOptions) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.go index cca79f93d0..4b8264fbb4 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.go @@ -1,57 +1,37 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/http_uri.proto -package core +package envoy_api_v2_core import ( fmt "fmt" - io "io" - math "math" - time "time" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Envoy external URI descriptor type HttpUri struct { - // 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 valid to be assigned 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 *time.Duration `protobuf:"bytes,3,opt,name=timeout,proto3,stdduration" json:"timeout,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + HttpUpstreamType isHttpUri_HttpUpstreamType `protobuf_oneof:"http_upstream_type"` + Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HttpUri) Reset() { *m = HttpUri{} } @@ -60,26 +40,18 @@ func (*HttpUri) ProtoMessage() {} func (*HttpUri) Descriptor() ([]byte, []int) { return fileDescriptor_1660b946db74c078, []int{0} } + func (m *HttpUri) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpUri.Unmarshal(m, b) } func (m *HttpUri) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpUri.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpUri.Marshal(b, m, deterministic) } func (m *HttpUri) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpUri.Merge(m, src) } func (m *HttpUri) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpUri.Size(m) } func (m *HttpUri) XXX_DiscardUnknown() { xxx_messageInfo_HttpUri.DiscardUnknown(m) @@ -87,10 +59,15 @@ func (m *HttpUri) XXX_DiscardUnknown() { var xxx_messageInfo_HttpUri proto.InternalMessageInfo +func (m *HttpUri) GetUri() string { + if m != nil { + return m.Uri + } + return "" +} + type isHttpUri_HttpUpstreamType interface { isHttpUri_HttpUpstreamType() - MarshalTo([]byte) (int, error) - Size() int } type HttpUri_Cluster struct { @@ -106,13 +83,6 @@ func (m *HttpUri) GetHttpUpstreamType() isHttpUri_HttpUpstreamType { return nil } -func (m *HttpUri) GetUri() string { - if m != nil { - return m.Uri - } - return "" -} - func (m *HttpUri) GetCluster() string { if x, ok := m.GetHttpUpstreamType().(*HttpUri_Cluster); ok { return x.Cluster @@ -120,64 +90,20 @@ func (m *HttpUri) GetCluster() string { return "" } -func (m *HttpUri) GetTimeout() *time.Duration { +func (m *HttpUri) GetTimeout() *duration.Duration { if m != nil { return m.Timeout } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HttpUri) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HttpUri_OneofMarshaler, _HttpUri_OneofUnmarshaler, _HttpUri_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HttpUri) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*HttpUri_Cluster)(nil), } } -func _HttpUri_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HttpUri) - // http_upstream_type - switch x := m.HttpUpstreamType.(type) { - case *HttpUri_Cluster: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Cluster) - case nil: - default: - return fmt.Errorf("HttpUri.HttpUpstreamType has unexpected type %T", x) - } - return nil -} - -func _HttpUri_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HttpUri) - switch tag { - case 2: // http_upstream_type.cluster - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HttpUpstreamType = &HttpUri_Cluster{x} - return true, err - default: - return false, nil - } -} - -func _HttpUri_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HttpUri) - // http_upstream_type - switch x := m.HttpUpstreamType.(type) { - case *HttpUri_Cluster: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Cluster))) - n += len(x.Cluster) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { proto.RegisterType((*HttpUri)(nil), "envoy.api.v2.core.HttpUri") } @@ -185,397 +111,26 @@ func init() { func init() { proto.RegisterFile("envoy/api/v2/core/http_uri.proto", fileDescriptor_1660b946db74c078) } var fileDescriptor_1660b946db74c078 = []byte{ - // 301 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4a, 0x33, 0x41, - 0x10, 0xc7, 0x33, 0xb9, 0x2f, 0x5f, 0xcc, 0x6a, 0xe3, 0x22, 0x78, 0x26, 0x70, 0x39, 0x04, 0x21, - 0xd5, 0x2e, 0x9c, 0xb5, 0xcd, 0x61, 0x91, 0x46, 0x08, 0x01, 0xeb, 0xb0, 0x49, 0xd6, 0x73, 0x21, - 0xc9, 0x2c, 0x9b, 0xd9, 0xc3, 0xbc, 0x89, 0xcf, 0xe0, 0x13, 0xa8, 0x55, 0x4a, 0x4b, 0xdf, 0x40, - 0x49, 0x97, 0xb7, 0x90, 0xbb, 0xcb, 0x35, 0xda, 0xfd, 0x99, 0xf9, 0xed, 0xf0, 0xdb, 0x3f, 0x8b, - 0xf5, 0x2a, 0xc7, 0x8d, 0x54, 0xd6, 0x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xf0, 0x69, 0x23, - 0xfe, 0x34, 0x97, 0x9e, 0x1c, 0xfe, 0x39, 0x2a, 0x44, 0x46, 0x30, 0xfd, 0x5f, 0x1a, 0x5d, 0xff, - 0x04, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x3f, 0x9d, 0x68, 0x87, 0x01, 0x00, 0x00, + // 323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xbd, 0x4e, 0x32, 0x41, + 0x14, 0x86, 0x19, 0xe0, 0x63, 0x3f, 0x47, 0x0b, 0x9d, 0x18, 0x05, 0x12, 0x71, 0xa3, 0x0d, 0xd5, + 0x4c, 0xb2, 0x5c, 0x80, 0xc9, 0xc4, 0x82, 0x92, 0x90, 0x50, 0x93, 0x01, 0x86, 0x75, 0x12, 0xd8, + 0x33, 0x99, 0x3d, 0xb3, 0x91, 0xce, 0x3b, 0xb0, 0xf5, 0x06, 0x6c, 0xbc, 0x04, 0xaf, 0xc0, 0xd6, + 0x5b, 0xb1, 0x32, 0x14, 0xc6, 0xec, 0x5f, 0x61, 0xe8, 0x4e, 0xce, 0xf3, 0x9e, 0xe4, 0xbc, 0x0f, + 0x0d, 0x75, 0x92, 0xc1, 0x4e, 0x28, 0x6b, 0x44, 0x16, 0x89, 0x25, 0x38, 0x2d, 0x1e, 0x10, 0xed, + 0xdc, 0x3b, 0xc3, 0xad, 0x03, 0x04, 0x76, 0x56, 0x24, 0xb8, 0xb2, 0x86, 0x67, 0x11, 0xcf, 0x13, + 0xfd, 0x41, 0x0c, 0x10, 0x6f, 0xb4, 0x28, 0x02, 0x0b, 0xbf, 0x16, 0x2b, 0xef, 0x14, 0x1a, 0x48, + 0xca, 0x93, 0xfe, 0xc0, 0xaf, 0xac, 0x12, 0x2a, 0x49, 0x00, 0x8b, 0x75, 0x2a, 0xb6, 0x26, 0x76, + 0x0a, 0x75, 0xc5, 0xaf, 0x0e, 0x78, 0x8a, 0x0a, 0x7d, 0x5a, 0xe1, 0xcb, 0x4c, 0x6d, 0xcc, 0x4a, + 0xa1, 0x16, 0xf5, 0x50, 0x82, 0x9b, 0x57, 0x42, 0x83, 0x31, 0xa2, 0x9d, 0x39, 0xc3, 0x7a, 0xb4, + 0xe5, 0x9d, 0xe9, 0x92, 0x90, 0x0c, 0x8f, 0x64, 0xb0, 0x97, 0x6d, 0xd7, 0x0c, 0xc9, 0x34, 0xdf, + 0xb1, 0x5b, 0x1a, 0x2c, 0x37, 0x3e, 0x45, 0xed, 0xba, 0xcd, 0x3f, 0x78, 0xdc, 0x98, 0xd6, 0x84, + 0xdd, 0xd1, 0x00, 0xcd, 0x56, 0x83, 0xc7, 0x6e, 0x2b, 0x24, 0xc3, 0xe3, 0xa8, 0xc7, 0xcb, 0x56, + 0xbc, 0x6e, 0xc5, 0xef, 0xab, 0x56, 0x92, 0xee, 0x65, 0xf0, 0x46, 0xda, 0xff, 0x49, 0xd4, 0x98, + 0xd6, 0x57, 0xb2, 0x47, 0x59, 0x69, 0xca, 0xa6, 0xe8, 0xb4, 0xda, 0xce, 0x71, 0x67, 0x35, 0x6b, + 0x7d, 0x4b, 0x22, 0x67, 0x5f, 0x2f, 0x3f, 0xcf, 0xff, 0x2e, 0xd8, 0x79, 0xa9, 0x6e, 0x09, 0xc9, + 0xda, 0xc4, 0x85, 0x3a, 0x9e, 0x8d, 0xde, 0x9f, 0x3e, 0x3e, 0x3b, 0xcd, 0x53, 0x42, 0xaf, 0x0d, + 0xf0, 0x22, 0x60, 0x1d, 0x3c, 0xee, 0xf8, 0x81, 0x66, 0x79, 0x52, 0x75, 0x9d, 0xe4, 0x0f, 0x4d, + 0xc8, 0xa2, 0x53, 0x7c, 0x36, 0xfa, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xef, 0x44, 0x45, 0xb4, + 0x01, 0x00, 0x00, } - -func (m *HttpUri) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpUri) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Uri) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHttpUri(dAtA, i, uint64(len(m.Uri))) - i += copy(dAtA[i:], m.Uri) - } - if m.HttpUpstreamType != nil { - nn1, err := m.HttpUpstreamType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.Timeout != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHttpUri(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout))) - n2, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Timeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpUri_Cluster) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x12 - i++ - i = encodeVarintHttpUri(dAtA, i, uint64(len(m.Cluster))) - i += copy(dAtA[i:], m.Cluster) - return i, nil -} -func encodeVarintHttpUri(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *HttpUri) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Uri) - if l > 0 { - n += 1 + l + sovHttpUri(uint64(l)) - } - if m.HttpUpstreamType != nil { - n += m.HttpUpstreamType.Size() - } - if m.Timeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout) - n += 1 + l + sovHttpUri(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpUri_Cluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cluster) - n += 1 + l + sovHttpUri(uint64(l)) - return n -} - -func sovHttpUri(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozHttpUri(x uint64) (n int) { - return sovHttpUri(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *HttpUri) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpUri - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpUri: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpUri: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpUri - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpUri - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpUri - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Uri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpUri - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpUri - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpUri - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HttpUpstreamType = &HttpUri_Cluster{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpUri - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpUri - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpUri - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timeout == nil { - m.Timeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Timeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttpUri(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpUri - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpUri - } - 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 skipHttpUri(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpUri - } - 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, ErrIntOverflowHttpUri - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpUri - } - 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, ErrInvalidLengthHttpUri - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpUri - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpUri - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHttpUri(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpUri - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHttpUri = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttpUri = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.validate.go index 1dd5f79f70..007a341207 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/http_uri.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/http_uri.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _http_uri_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on HttpUri with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *HttpUri) Validate() error { @@ -54,6 +57,27 @@ func (m *HttpUri) Validate() error { } } + if d := m.GetTimeout(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return HttpUriValidationError{ + field: "Timeout", + reason: "value is not a valid duration", + cause: err, + } + } + + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte { + return HttpUriValidationError{ + field: "Timeout", + reason: "value must be greater than or equal to 0s", + } + } + + } + switch m.HttpUpstreamType.(type) { case *HttpUri_Cluster: diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.go index d72afb92aa..a8496f672c 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.go @@ -1,35 +1,29 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/core/protocol.proto -package core +package envoy_api_v2_core import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - time "time" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// [#not-implemented-hide:] type TcpProtocolOptions struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -42,26 +36,18 @@ func (*TcpProtocolOptions) ProtoMessage() {} func (*TcpProtocolOptions) Descriptor() ([]byte, []int) { return fileDescriptor_d86476e078060b60, []int{0} } + func (m *TcpProtocolOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpProtocolOptions.Unmarshal(m, b) } func (m *TcpProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpProtocolOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpProtocolOptions.Marshal(b, m, deterministic) } func (m *TcpProtocolOptions) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpProtocolOptions.Merge(m, src) } func (m *TcpProtocolOptions) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpProtocolOptions.Size(m) } func (m *TcpProtocolOptions) XXX_DiscardUnknown() { xxx_messageInfo_TcpProtocolOptions.DiscardUnknown(m) @@ -69,43 +55,81 @@ func (m *TcpProtocolOptions) XXX_DiscardUnknown() { var xxx_messageInfo_TcpProtocolOptions proto.InternalMessageInfo +type UpstreamHttpProtocolOptions struct { + AutoSni bool `protobuf:"varint,1,opt,name=auto_sni,json=autoSni,proto3" json:"auto_sni,omitempty"` + AutoSanValidation bool `protobuf:"varint,2,opt,name=auto_san_validation,json=autoSanValidation,proto3" json:"auto_san_validation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpstreamHttpProtocolOptions) Reset() { *m = UpstreamHttpProtocolOptions{} } +func (m *UpstreamHttpProtocolOptions) String() string { return proto.CompactTextString(m) } +func (*UpstreamHttpProtocolOptions) ProtoMessage() {} +func (*UpstreamHttpProtocolOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_d86476e078060b60, []int{1} +} + +func (m *UpstreamHttpProtocolOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpstreamHttpProtocolOptions.Unmarshal(m, b) +} +func (m *UpstreamHttpProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpstreamHttpProtocolOptions.Marshal(b, m, deterministic) +} +func (m *UpstreamHttpProtocolOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpstreamHttpProtocolOptions.Merge(m, src) +} +func (m *UpstreamHttpProtocolOptions) XXX_Size() int { + return xxx_messageInfo_UpstreamHttpProtocolOptions.Size(m) +} +func (m *UpstreamHttpProtocolOptions) XXX_DiscardUnknown() { + xxx_messageInfo_UpstreamHttpProtocolOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_UpstreamHttpProtocolOptions proto.InternalMessageInfo + +func (m *UpstreamHttpProtocolOptions) GetAutoSni() bool { + if m != nil { + return m.AutoSni + } + return false +} + +func (m *UpstreamHttpProtocolOptions) GetAutoSanValidation() bool { + if m != nil { + return m.AutoSanValidation + } + return false +} + type HttpProtocolOptions struct { - // The idle timeout for upstream connection pool connections. The idle timeout is defined as the - // period in which there are no active requests. If not set, there is no idle timeout. When the - // idle timeout is reached the connection will be closed. Note that request based timeouts mean - // that HTTP/2 PINGs will not keep the connection alive. - IdleTimeout *time.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3,stdduration" json:"idle_timeout,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + IdleTimeout *duration.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` + MaxConnectionDuration *duration.Duration `protobuf:"bytes,3,opt,name=max_connection_duration,json=maxConnectionDuration,proto3" json:"max_connection_duration,omitempty"` + MaxHeadersCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_headers_count,json=maxHeadersCount,proto3" json:"max_headers_count,omitempty"` + MaxStreamDuration *duration.Duration `protobuf:"bytes,4,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HttpProtocolOptions) Reset() { *m = HttpProtocolOptions{} } func (m *HttpProtocolOptions) String() string { return proto.CompactTextString(m) } func (*HttpProtocolOptions) ProtoMessage() {} func (*HttpProtocolOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_d86476e078060b60, []int{1} + return fileDescriptor_d86476e078060b60, []int{2} } + func (m *HttpProtocolOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpProtocolOptions.Unmarshal(m, b) } func (m *HttpProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpProtocolOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpProtocolOptions.Marshal(b, m, deterministic) } func (m *HttpProtocolOptions) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpProtocolOptions.Merge(m, src) } func (m *HttpProtocolOptions) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpProtocolOptions.Size(m) } func (m *HttpProtocolOptions) XXX_DiscardUnknown() { xxx_messageInfo_HttpProtocolOptions.DiscardUnknown(m) @@ -113,59 +137,63 @@ func (m *HttpProtocolOptions) XXX_DiscardUnknown() { var xxx_messageInfo_HttpProtocolOptions proto.InternalMessageInfo -func (m *HttpProtocolOptions) GetIdleTimeout() *time.Duration { +func (m *HttpProtocolOptions) GetIdleTimeout() *duration.Duration { if m != nil { return m.IdleTimeout } return nil } +func (m *HttpProtocolOptions) GetMaxConnectionDuration() *duration.Duration { + if m != nil { + return m.MaxConnectionDuration + } + return nil +} + +func (m *HttpProtocolOptions) GetMaxHeadersCount() *wrappers.UInt32Value { + if m != nil { + return m.MaxHeadersCount + } + return nil +} + +func (m *HttpProtocolOptions) GetMaxStreamDuration() *duration.Duration { + if m != nil { + return m.MaxStreamDuration + } + return nil +} + type Http1ProtocolOptions struct { - // 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 *types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AllowAbsoluteUrl *wrappers.BoolValue `protobuf:"bytes,1,opt,name=allow_absolute_url,json=allowAbsoluteUrl,proto3" json:"allow_absolute_url,omitempty"` + AcceptHttp_10 bool `protobuf:"varint,2,opt,name=accept_http_10,json=acceptHttp10,proto3" json:"accept_http_10,omitempty"` + DefaultHostForHttp_10 string `protobuf:"bytes,3,opt,name=default_host_for_http_10,json=defaultHostForHttp10,proto3" json:"default_host_for_http_10,omitempty"` + HeaderKeyFormat *Http1ProtocolOptions_HeaderKeyFormat `protobuf:"bytes,4,opt,name=header_key_format,json=headerKeyFormat,proto3" json:"header_key_format,omitempty"` + EnableTrailers bool `protobuf:"varint,5,opt,name=enable_trailers,json=enableTrailers,proto3" json:"enable_trailers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Http1ProtocolOptions) Reset() { *m = Http1ProtocolOptions{} } func (m *Http1ProtocolOptions) String() string { return proto.CompactTextString(m) } func (*Http1ProtocolOptions) ProtoMessage() {} func (*Http1ProtocolOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_d86476e078060b60, []int{2} + return fileDescriptor_d86476e078060b60, []int{3} } + func (m *Http1ProtocolOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Http1ProtocolOptions.Unmarshal(m, b) } func (m *Http1ProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Http1ProtocolOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Http1ProtocolOptions.Marshal(b, m, deterministic) } func (m *Http1ProtocolOptions) XXX_Merge(src proto.Message) { xxx_messageInfo_Http1ProtocolOptions.Merge(m, src) } func (m *Http1ProtocolOptions) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Http1ProtocolOptions.Size(m) } func (m *Http1ProtocolOptions) XXX_DiscardUnknown() { xxx_messageInfo_Http1ProtocolOptions.DiscardUnknown(m) @@ -173,7 +201,7 @@ func (m *Http1ProtocolOptions) XXX_DiscardUnknown() { var xxx_messageInfo_Http1ProtocolOptions proto.InternalMessageInfo -func (m *Http1ProtocolOptions) GetAllowAbsoluteUrl() *types.BoolValue { +func (m *Http1ProtocolOptions) GetAllowAbsoluteUrl() *wrappers.BoolValue { if m != nil { return m.AllowAbsoluteUrl } @@ -194,63 +222,158 @@ func (m *Http1ProtocolOptions) GetDefaultHostForHttp_10() string { return "" } -type Http2ProtocolOptions struct { - // `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 *types.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. - MaxConcurrentStreams *types.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` - // 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 *types.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 *types.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/master/source/docs/h2_metadata.md) for more - // information. - AllowMetadata bool `protobuf:"varint,6,opt,name=allow_metadata,json=allowMetadata,proto3" json:"allow_metadata,omitempty"` +func (m *Http1ProtocolOptions) GetHeaderKeyFormat() *Http1ProtocolOptions_HeaderKeyFormat { + if m != nil { + return m.HeaderKeyFormat + } + return nil +} + +func (m *Http1ProtocolOptions) GetEnableTrailers() bool { + if m != nil { + return m.EnableTrailers + } + return false +} + +type Http1ProtocolOptions_HeaderKeyFormat struct { + // Types that are valid to be assigned to HeaderFormat: + // *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ + HeaderFormat isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat `protobuf_oneof:"header_format"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat) Reset() { *m = Http1ProtocolOptions_HeaderKeyFormat{} } +func (m *Http1ProtocolOptions_HeaderKeyFormat) String() string { return proto.CompactTextString(m) } +func (*Http1ProtocolOptions_HeaderKeyFormat) ProtoMessage() {} +func (*Http1ProtocolOptions_HeaderKeyFormat) Descriptor() ([]byte, []int) { + return fileDescriptor_d86476e078060b60, []int{3, 0} +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat.Unmarshal(m, b) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat.Marshal(b, m, deterministic) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat) XXX_Merge(src proto.Message) { + xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat.Merge(m, src) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat) XXX_Size() int { + return xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat.Size(m) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat) XXX_DiscardUnknown() { + xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat.DiscardUnknown(m) +} + +var xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat proto.InternalMessageInfo + +type isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat interface { + isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() +} + +type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ struct { + ProperCaseWords *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords `protobuf:"bytes,1,opt,name=proper_case_words,json=properCaseWords,proto3,oneof"` +} + +func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat) GetHeaderFormat() isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat { + if m != nil { + return m.HeaderFormat + } + return nil +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat) GetProperCaseWords() *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords { + if x, ok := m.GetHeaderFormat().(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_); ok { + return x.ProperCaseWords + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Http1ProtocolOptions_HeaderKeyFormat) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_)(nil), + } +} + +type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Reset() { + *m = Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords{} +} +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) String() string { + return proto.CompactTextString(m) +} +func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoMessage() {} +func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Descriptor() ([]byte, []int) { + return fileDescriptor_d86476e078060b60, []int{3, 0, 0} +} + +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Unmarshal(m, b) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Marshal(b, m, deterministic) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) XXX_Merge(src proto.Message) { + xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Merge(m, src) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) XXX_Size() int { + return xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Size(m) +} +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) XXX_DiscardUnknown() { + xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.DiscardUnknown(m) +} + +var xxx_messageInfo_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords proto.InternalMessageInfo + +type Http2ProtocolOptions struct { + HpackTableSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=hpack_table_size,json=hpackTableSize,proto3" json:"hpack_table_size,omitempty"` + MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` + InitialStreamWindowSize *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=initial_stream_window_size,json=initialStreamWindowSize,proto3" json:"initial_stream_window_size,omitempty"` + InitialConnectionWindowSize *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=initial_connection_window_size,json=initialConnectionWindowSize,proto3" json:"initial_connection_window_size,omitempty"` + AllowConnect bool `protobuf:"varint,5,opt,name=allow_connect,json=allowConnect,proto3" json:"allow_connect,omitempty"` + AllowMetadata bool `protobuf:"varint,6,opt,name=allow_metadata,json=allowMetadata,proto3" json:"allow_metadata,omitempty"` + MaxOutboundFrames *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_outbound_frames,json=maxOutboundFrames,proto3" json:"max_outbound_frames,omitempty"` + MaxOutboundControlFrames *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=max_outbound_control_frames,json=maxOutboundControlFrames,proto3" json:"max_outbound_control_frames,omitempty"` + MaxConsecutiveInboundFramesWithEmptyPayload *wrappers.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"` + MaxInboundPriorityFramesPerStream *wrappers.UInt32Value `protobuf:"bytes,10,opt,name=max_inbound_priority_frames_per_stream,json=maxInboundPriorityFramesPerStream,proto3" json:"max_inbound_priority_frames_per_stream,omitempty"` + MaxInboundWindowUpdateFramesPerDataFrameSent *wrappers.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"` + StreamErrorOnInvalidHttpMessaging bool `protobuf:"varint,12,opt,name=stream_error_on_invalid_http_messaging,json=streamErrorOnInvalidHttpMessaging,proto3" json:"stream_error_on_invalid_http_messaging,omitempty"` + CustomSettingsParameters []*Http2ProtocolOptions_SettingsParameter `protobuf:"bytes,13,rep,name=custom_settings_parameters,json=customSettingsParameters,proto3" json:"custom_settings_parameters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + func (m *Http2ProtocolOptions) Reset() { *m = Http2ProtocolOptions{} } func (m *Http2ProtocolOptions) String() string { return proto.CompactTextString(m) } func (*Http2ProtocolOptions) ProtoMessage() {} func (*Http2ProtocolOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_d86476e078060b60, []int{3} + return fileDescriptor_d86476e078060b60, []int{4} } + func (m *Http2ProtocolOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Http2ProtocolOptions.Unmarshal(m, b) } func (m *Http2ProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Http2ProtocolOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Http2ProtocolOptions.Marshal(b, m, deterministic) } func (m *Http2ProtocolOptions) XXX_Merge(src proto.Message) { xxx_messageInfo_Http2ProtocolOptions.Merge(m, src) } func (m *Http2ProtocolOptions) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Http2ProtocolOptions.Size(m) } func (m *Http2ProtocolOptions) XXX_DiscardUnknown() { xxx_messageInfo_Http2ProtocolOptions.DiscardUnknown(m) @@ -258,28 +381,28 @@ func (m *Http2ProtocolOptions) XXX_DiscardUnknown() { var xxx_messageInfo_Http2ProtocolOptions proto.InternalMessageInfo -func (m *Http2ProtocolOptions) GetHpackTableSize() *types.UInt32Value { +func (m *Http2ProtocolOptions) GetHpackTableSize() *wrappers.UInt32Value { if m != nil { return m.HpackTableSize } return nil } -func (m *Http2ProtocolOptions) GetMaxConcurrentStreams() *types.UInt32Value { +func (m *Http2ProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { if m != nil { return m.MaxConcurrentStreams } return nil } -func (m *Http2ProtocolOptions) GetInitialStreamWindowSize() *types.UInt32Value { +func (m *Http2ProtocolOptions) GetInitialStreamWindowSize() *wrappers.UInt32Value { if m != nil { return m.InitialStreamWindowSize } return nil } -func (m *Http2ProtocolOptions) GetInitialConnectionWindowSize() *types.UInt32Value { +func (m *Http2ProtocolOptions) GetInitialConnectionWindowSize() *wrappers.UInt32Value { if m != nil { return m.InitialConnectionWindowSize } @@ -300,7 +423,104 @@ func (m *Http2ProtocolOptions) GetAllowMetadata() bool { return false } -// [#not-implemented-hide:] +func (m *Http2ProtocolOptions) GetMaxOutboundFrames() *wrappers.UInt32Value { + if m != nil { + return m.MaxOutboundFrames + } + return nil +} + +func (m *Http2ProtocolOptions) GetMaxOutboundControlFrames() *wrappers.UInt32Value { + if m != nil { + return m.MaxOutboundControlFrames + } + return nil +} + +func (m *Http2ProtocolOptions) GetMaxConsecutiveInboundFramesWithEmptyPayload() *wrappers.UInt32Value { + if m != nil { + return m.MaxConsecutiveInboundFramesWithEmptyPayload + } + return nil +} + +func (m *Http2ProtocolOptions) GetMaxInboundPriorityFramesPerStream() *wrappers.UInt32Value { + if m != nil { + return m.MaxInboundPriorityFramesPerStream + } + return nil +} + +func (m *Http2ProtocolOptions) GetMaxInboundWindowUpdateFramesPerDataFrameSent() *wrappers.UInt32Value { + if m != nil { + return m.MaxInboundWindowUpdateFramesPerDataFrameSent + } + return nil +} + +func (m *Http2ProtocolOptions) GetStreamErrorOnInvalidHttpMessaging() bool { + if m != nil { + return m.StreamErrorOnInvalidHttpMessaging + } + return false +} + +func (m *Http2ProtocolOptions) GetCustomSettingsParameters() []*Http2ProtocolOptions_SettingsParameter { + if m != nil { + return m.CustomSettingsParameters + } + return nil +} + +type Http2ProtocolOptions_SettingsParameter struct { + Identifier *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Value *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Http2ProtocolOptions_SettingsParameter) Reset() { + *m = Http2ProtocolOptions_SettingsParameter{} +} +func (m *Http2ProtocolOptions_SettingsParameter) String() string { return proto.CompactTextString(m) } +func (*Http2ProtocolOptions_SettingsParameter) ProtoMessage() {} +func (*Http2ProtocolOptions_SettingsParameter) Descriptor() ([]byte, []int) { + return fileDescriptor_d86476e078060b60, []int{4, 0} +} + +func (m *Http2ProtocolOptions_SettingsParameter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Http2ProtocolOptions_SettingsParameter.Unmarshal(m, b) +} +func (m *Http2ProtocolOptions_SettingsParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Http2ProtocolOptions_SettingsParameter.Marshal(b, m, deterministic) +} +func (m *Http2ProtocolOptions_SettingsParameter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Http2ProtocolOptions_SettingsParameter.Merge(m, src) +} +func (m *Http2ProtocolOptions_SettingsParameter) XXX_Size() int { + return xxx_messageInfo_Http2ProtocolOptions_SettingsParameter.Size(m) +} +func (m *Http2ProtocolOptions_SettingsParameter) XXX_DiscardUnknown() { + xxx_messageInfo_Http2ProtocolOptions_SettingsParameter.DiscardUnknown(m) +} + +var xxx_messageInfo_Http2ProtocolOptions_SettingsParameter proto.InternalMessageInfo + +func (m *Http2ProtocolOptions_SettingsParameter) GetIdentifier() *wrappers.UInt32Value { + if m != nil { + return m.Identifier + } + return nil +} + +func (m *Http2ProtocolOptions_SettingsParameter) GetValue() *wrappers.UInt32Value { + if m != nil { + return m.Value + } + return nil +} + type GrpcProtocolOptions struct { Http2ProtocolOptions *Http2ProtocolOptions `protobuf:"bytes,1,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -312,28 +532,20 @@ func (m *GrpcProtocolOptions) Reset() { *m = GrpcProtocolOptions{} } func (m *GrpcProtocolOptions) String() string { return proto.CompactTextString(m) } func (*GrpcProtocolOptions) ProtoMessage() {} func (*GrpcProtocolOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_d86476e078060b60, []int{4} + return fileDescriptor_d86476e078060b60, []int{5} } + func (m *GrpcProtocolOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcProtocolOptions.Unmarshal(m, b) } func (m *GrpcProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcProtocolOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcProtocolOptions.Marshal(b, m, deterministic) } func (m *GrpcProtocolOptions) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcProtocolOptions.Merge(m, src) } func (m *GrpcProtocolOptions) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcProtocolOptions.Size(m) } func (m *GrpcProtocolOptions) XXX_DiscardUnknown() { xxx_messageInfo_GrpcProtocolOptions.DiscardUnknown(m) @@ -350,1270 +562,92 @@ func (m *GrpcProtocolOptions) GetHttp2ProtocolOptions() *Http2ProtocolOptions { func init() { proto.RegisterType((*TcpProtocolOptions)(nil), "envoy.api.v2.core.TcpProtocolOptions") + proto.RegisterType((*UpstreamHttpProtocolOptions)(nil), "envoy.api.v2.core.UpstreamHttpProtocolOptions") proto.RegisterType((*HttpProtocolOptions)(nil), "envoy.api.v2.core.HttpProtocolOptions") proto.RegisterType((*Http1ProtocolOptions)(nil), "envoy.api.v2.core.Http1ProtocolOptions") + proto.RegisterType((*Http1ProtocolOptions_HeaderKeyFormat)(nil), "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat") + proto.RegisterType((*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords)(nil), "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords") proto.RegisterType((*Http2ProtocolOptions)(nil), "envoy.api.v2.core.Http2ProtocolOptions") + proto.RegisterType((*Http2ProtocolOptions_SettingsParameter)(nil), "envoy.api.v2.core.Http2ProtocolOptions.SettingsParameter") proto.RegisterType((*GrpcProtocolOptions)(nil), "envoy.api.v2.core.GrpcProtocolOptions") } func init() { proto.RegisterFile("envoy/api/v2/core/protocol.proto", fileDescriptor_d86476e078060b60) } var fileDescriptor_d86476e078060b60 = []byte{ - // 593 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcd, 0x6e, 0x13, 0x3f, - 0x10, 0x97, 0xff, 0xe9, 0xbf, 0x14, 0xf7, 0x83, 0x76, 0x1b, 0xb5, 0xa1, 0xa0, 0x34, 0x0a, 0x20, - 0xa2, 0x1e, 0x76, 0xdb, 0x54, 0xe2, 0xce, 0x16, 0x95, 0x72, 0x40, 0x54, 0xdb, 0x16, 0xc4, 0x01, - 0x59, 0x8e, 0xe3, 0x26, 0x16, 0xce, 0x8e, 0xe5, 0xf5, 0x26, 0x6d, 0x9f, 0x84, 0x47, 0xe0, 0x19, - 0x38, 0x20, 0x8e, 0x1c, 0x79, 0x03, 0x50, 0x6e, 0x9c, 0x79, 0x80, 0xa0, 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0xa5, 0x64, 0xd3, 0x4b, 0x3a, 0x93, 0x57, 0x56, - 0xd0, 0xae, 0x64, 0x70, 0x75, 0xec, 0xc6, 0x20, 0x4d, 0x39, 0x2b, 0xfe, 0xb1, 0xdf, 0x1c, 0xe7, - 0xfe, 0xcd, 0xf1, 0x8e, 0x97, 0x3d, 0x98, 0xa8, 0xfe, 0xe2, 0x7a, 0x0f, 0x2f, 0xbb, 0x8b, 0xf2, - 0x9e, 0x95, 0xff, 0xfd, 0x19, 0x14, 0x4d, 0xcf, 0x08, 0x1e, 0xe0, 0x15, 0x07, 0xea, 0x71, 0x43, - 0xdb, 0xd4, 0xd0, 0xca, 0xbc, 0x45, 0x39, 0xea, 0x73, 0xdf, 0xac, 0x1b, 0xbc, 0xfe, 0x54, 0x2b, - 0x36, 0xfd, 0xcd, 0xdf, 0xe0, 0x8d, 0xe2, 0x66, 0x9a, 0x64, 0xfc, 0xb0, 0x09, 0xb8, 0x89, 0xff, - 0xf2, 0x0f, 0xc3, 0x99, 0x17, 0x1e, 0x5e, 0x77, 0x3c, 0x49, 0xb9, 0x7b, 0x4d, 0x37, 0x8e, 0xdf, - 0x0f, 0xab, 0xe8, 0xf3, 0xb0, 0x8a, 0xbe, 0x0c, 0xab, 0xe8, 0xdb, 0xb0, 0x8a, 0xf0, 0xb6, 0x00, - 0x27, 0xa9, 0x34, 0x5c, 0x5c, 0xce, 0xaa, 0xc7, 0xcb, 0x63, 0x0d, 0xfb, 0x7b, 0x8c, 0x5a, 0xf3, - 0x36, 0xda, 0xfe, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x9a, 0xd7, 0xd3, 0x8e, 0x04, 0x00, - 0x00, + // 1176 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xbf, 0x73, 0x1b, 0x45, + 0x14, 0xe6, 0xfc, 0x3b, 0xeb, 0x1f, 0xb2, 0xd6, 0x22, 0xb9, 0x28, 0x10, 0x12, 0x03, 0x89, 0xc7, + 0x30, 0xa7, 0x44, 0x61, 0x60, 0x98, 0x49, 0xc3, 0x39, 0x71, 0xec, 0x61, 0x32, 0x51, 0xce, 0x76, + 0x52, 0x31, 0x3b, 0xeb, 0xbb, 0x95, 0xb4, 0xe4, 0x6e, 0xf7, 0x66, 0x77, 0x4f, 0xb2, 0x52, 0xb9, + 0xa0, 0xa2, 0x61, 0xe8, 0xf8, 0x03, 0x68, 0x28, 0x69, 0xa9, 0x29, 0x68, 0xf9, 0x57, 0xa8, 0x18, + 0x17, 0x88, 0xd9, 0x1f, 0xe7, 0x28, 0x52, 0x20, 0x4a, 0x2a, 0xeb, 0xde, 0x7b, 0xdf, 0xf7, 0xbd, + 0xfd, 0xee, 0xed, 0x3b, 0x83, 0x6b, 0x84, 0xf5, 0xf8, 0xa0, 0x81, 0x73, 0xda, 0xe8, 0x35, 0x1b, + 0x31, 0x17, 0xa4, 0x91, 0x0b, 0xae, 0x78, 0xcc, 0xd3, 0xc0, 0xfc, 0x80, 0x55, 0x53, 0x11, 0xe0, + 0x9c, 0x06, 0xbd, 0x66, 0xa0, 0x2b, 0xea, 0x57, 0x3b, 0x9c, 0x77, 0x52, 0x57, 0x79, 0x5c, 0xb4, + 0x1b, 0x49, 0x21, 0xb0, 0xa2, 0x9c, 0x59, 0xc8, 0x64, 0xbe, 0x2f, 0x70, 0x9e, 0x13, 0x21, 0xcb, + 0x7c, 0x91, 0xe4, 0xb8, 0x81, 0x19, 0xe3, 0xca, 0xc0, 0x64, 0x23, 0xa3, 0x1d, 0x81, 0x15, 0x71, + 0xf9, 0xf7, 0x27, 0xf2, 0x52, 0x61, 0x55, 0x94, 0xf0, 0x4b, 0x3d, 0x9c, 0xd2, 0x04, 0x2b, 0xd2, + 0x28, 0x7f, 0xd8, 0xc4, 0x66, 0x0d, 0xc0, 0xc3, 0x38, 0x6f, 0xb9, 0xfe, 0x1f, 0xe5, 0x06, 0xb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e7, 0x87, 0xf9, 0x8b, + 0xb0, 0x66, 0x59, 0x62, 0xce, 0xda, 0xb4, 0x63, 0x59, 0x7a, 0x77, 0x7e, 0x3b, 0xfd, 0xe3, 0xcf, + 0x85, 0x99, 0x75, 0x0f, 0x7c, 0x40, 0xb9, 0x95, 0xc9, 0x05, 0x3f, 0x19, 0x4c, 0x2a, 0x86, 0xab, + 0x25, 0xaf, 0xf9, 0xdb, 0xf2, 0x8e, 0x17, 0x4c, 0xbb, 0x77, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, + 0x33, 0xd0, 0xb3, 0x67, 0x19, 0x0b, 0x00, 0x00, } - -func (this *TcpProtocolOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TcpProtocolOptions) - if !ok { - that2, ok := that.(TcpProtocolOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HttpProtocolOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpProtocolOptions) - if !ok { - that2, ok := that.(HttpProtocolOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.IdleTimeout != nil && that1.IdleTimeout != nil { - if *this.IdleTimeout != *that1.IdleTimeout { - return false - } - } else if this.IdleTimeout != nil { - return false - } else if that1.IdleTimeout != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Http1ProtocolOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Http1ProtocolOptions) - if !ok { - that2, ok := that.(Http1ProtocolOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.AllowAbsoluteUrl.Equal(that1.AllowAbsoluteUrl) { - return false - } - if this.AcceptHttp_10 != that1.AcceptHttp_10 { - return false - } - if this.DefaultHostForHttp_10 != that1.DefaultHostForHttp_10 { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Http2ProtocolOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Http2ProtocolOptions) - if !ok { - that2, ok := that.(Http2ProtocolOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.HpackTableSize.Equal(that1.HpackTableSize) { - return false - } - if !this.MaxConcurrentStreams.Equal(that1.MaxConcurrentStreams) { - return false - } - if !this.InitialStreamWindowSize.Equal(that1.InitialStreamWindowSize) { - return false - } - if !this.InitialConnectionWindowSize.Equal(that1.InitialConnectionWindowSize) { - return false - } - if this.AllowConnect != that1.AllowConnect { - return false - } - if this.AllowMetadata != that1.AllowMetadata { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *GrpcProtocolOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GrpcProtocolOptions) - if !ok { - that2, ok := that.(GrpcProtocolOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Http2ProtocolOptions.Equal(that1.Http2ProtocolOptions) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *TcpProtocolOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpProtocolOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpProtocolOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpProtocolOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.IdleTimeout != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout))) - n1, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.IdleTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Http1ProtocolOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Http1ProtocolOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.AllowAbsoluteUrl != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.AllowAbsoluteUrl.Size())) - n2, err := m.AllowAbsoluteUrl.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.AcceptHttp_10 { - dAtA[i] = 0x10 - i++ - if m.AcceptHttp_10 { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.DefaultHostForHttp_10) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.DefaultHostForHttp_10))) - i += copy(dAtA[i:], m.DefaultHostForHttp_10) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Http2ProtocolOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Http2ProtocolOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.HpackTableSize != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.HpackTableSize.Size())) - n3, err := m.HpackTableSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.MaxConcurrentStreams != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.MaxConcurrentStreams.Size())) - n4, err := m.MaxConcurrentStreams.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.InitialStreamWindowSize != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.InitialStreamWindowSize.Size())) - n5, err := m.InitialStreamWindowSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.InitialConnectionWindowSize != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.InitialConnectionWindowSize.Size())) - n6, err := m.InitialConnectionWindowSize.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.AllowConnect { - dAtA[i] = 0x28 - i++ - if m.AllowConnect { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.AllowMetadata { - dAtA[i] = 0x30 - i++ - if m.AllowMetadata { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcProtocolOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcProtocolOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Http2ProtocolOptions != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.Http2ProtocolOptions.Size())) - n7, err := m.Http2ProtocolOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintProtocol(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *TcpProtocolOptions) 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 *HttpProtocolOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdleTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout) - n += 1 + l + sovProtocol(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Http1ProtocolOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AllowAbsoluteUrl != nil { - l = m.AllowAbsoluteUrl.Size() - n += 1 + l + sovProtocol(uint64(l)) - } - if m.AcceptHttp_10 { - n += 2 - } - l = len(m.DefaultHostForHttp_10) - if l > 0 { - n += 1 + l + sovProtocol(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Http2ProtocolOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HpackTableSize != nil { - l = m.HpackTableSize.Size() - n += 1 + l + sovProtocol(uint64(l)) - } - if m.MaxConcurrentStreams != nil { - l = m.MaxConcurrentStreams.Size() - n += 1 + l + sovProtocol(uint64(l)) - } - if m.InitialStreamWindowSize != nil { - l = m.InitialStreamWindowSize.Size() - n += 1 + l + sovProtocol(uint64(l)) - } - if m.InitialConnectionWindowSize != nil { - l = m.InitialConnectionWindowSize.Size() - n += 1 + l + sovProtocol(uint64(l)) - } - if m.AllowConnect { - n += 2 - } - if m.AllowMetadata { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcProtocolOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Http2ProtocolOptions != nil { - l = m.Http2ProtocolOptions.Size() - n += 1 + l + sovProtocol(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovProtocol(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProtocol(x uint64) (n int) { - return sovProtocol(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TcpProtocolOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TcpProtocolOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TcpProtocolOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipProtocol(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProtocol - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProtocol - } - 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 *HttpProtocolOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpProtocolOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpProtocolOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdleTimeout == nil { - m.IdleTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.IdleTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProtocol(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProtocol - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProtocol - } - 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 *Http1ProtocolOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Http1ProtocolOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Http1ProtocolOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowAbsoluteUrl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AllowAbsoluteUrl == nil { - m.AllowAbsoluteUrl = &types.BoolValue{} - } - if err := m.AllowAbsoluteUrl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptHttp_10", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AcceptHttp_10 = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultHostForHttp_10", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultHostForHttp_10 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProtocol(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProtocol - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProtocol - } - 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 *Http2ProtocolOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Http2ProtocolOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Http2ProtocolOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HpackTableSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HpackTableSize == nil { - m.HpackTableSize = &types.UInt32Value{} - } - if err := m.HpackTableSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxConcurrentStreams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxConcurrentStreams == nil { - m.MaxConcurrentStreams = &types.UInt32Value{} - } - if err := m.MaxConcurrentStreams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialStreamWindowSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InitialStreamWindowSize == nil { - m.InitialStreamWindowSize = &types.UInt32Value{} - } - if err := m.InitialStreamWindowSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialConnectionWindowSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InitialConnectionWindowSize == nil { - m.InitialConnectionWindowSize = &types.UInt32Value{} - } - if err := m.InitialConnectionWindowSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowConnect", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowConnect = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowMetadata", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowMetadata = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipProtocol(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProtocol - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProtocol - } - 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 *GrpcProtocolOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GrpcProtocolOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GrpcProtocolOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http2ProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtocol - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Http2ProtocolOptions == nil { - m.Http2ProtocolOptions = &Http2ProtocolOptions{} - } - if err := m.Http2ProtocolOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProtocol(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProtocol - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProtocol - } - 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 skipProtocol(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProtocol - } - 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, ErrIntOverflowProtocol - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProtocol - } - 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, ErrInvalidLengthProtocol - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthProtocol - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProtocol - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProtocol(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthProtocol - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthProtocol = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProtocol = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.validate.go index ea715ab841..7731c2cdf9 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/protocol.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/core/protocol.proto -package core +package envoy_api_v2_core import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _protocol_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on TcpProtocolOptions with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -100,6 +103,78 @@ var _ interface { ErrorName() string } = TcpProtocolOptionsValidationError{} +// Validate checks the field values on UpstreamHttpProtocolOptions with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *UpstreamHttpProtocolOptions) Validate() error { + if m == nil { + return nil + } + + // no validation rules for AutoSni + + // no validation rules for AutoSanValidation + + return nil +} + +// 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{} + // Validate checks the field values on HttpProtocolOptions with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -108,17 +183,43 @@ func (m *HttpProtocolOptions) Validate() error { return nil } - { - tmp := m.GetIdleTimeout() + 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 v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + 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 err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } + if wrapper := m.GetMaxHeadersCount(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return HttpProtocolOptionsValidationError{ + field: "MaxHeadersCount", + reason: "value must be greater than or equal to 1", + } + } + + } + + 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, } } } @@ -190,17 +291,12 @@ func (m *Http1ProtocolOptions) Validate() error { return nil } - { - tmp := m.GetAllowAbsoluteUrl() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "AllowAbsoluteUrl", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -209,6 +305,18 @@ func (m *Http1ProtocolOptions) Validate() error { // no validation rules for DefaultHostForHttp_10 + 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 + return nil } @@ -276,17 +384,12 @@ func (m *Http2ProtocolOptions) Validate() error { return nil } - { - tmp := m.GetHpackTableSize() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "HpackTableSize", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -328,6 +431,76 @@ func (m *Http2ProtocolOptions) Validate() error { // no validation rules for AllowMetadata + if wrapper := m.GetMaxOutboundFrames(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return Http2ProtocolOptionsValidationError{ + field: "MaxOutboundFrames", + reason: "value must be greater than or equal to 1", + } + } + + } + + if wrapper := m.GetMaxOutboundControlFrames(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return Http2ProtocolOptionsValidationError{ + field: "MaxOutboundControlFrames", + reason: "value must be greater than or equal to 1", + } + } + + } + + 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 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 { + return Http2ProtocolOptionsValidationError{ + field: "MaxInboundWindowUpdateFramesPerDataFrameSent", + reason: "value must be greater than or equal to 1", + } + } + + } + + // no validation rules for StreamErrorOnInvalidHttpMessaging + + for idx, item := range m.GetCustomSettingsParameters() { + _, _ = idx, item + + 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, + } + } + } + + } + return nil } @@ -395,17 +568,12 @@ func (m *GrpcProtocolOptions) Validate() error { return nil } - { - tmp := m.GetHttp2ProtocolOptions() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return GrpcProtocolOptionsValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -468,3 +636,270 @@ var _ interface { Cause() error ErrorName() string } = GrpcProtocolOptionsValidationError{} + +// Validate checks the field values on Http1ProtocolOptions_HeaderKeyFormat +// with the rules defined in the proto definition for this message. If any +// rules are violated, an error is returned. +func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { + if m == nil { + return nil + } + + switch m.HeaderFormat.(type) { + + case *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_: + + 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, + } + } + } + + default: + return Http1ProtocolOptions_HeaderKeyFormatValidationError{ + field: "HeaderFormat", + reason: "value is required", + } + + } + + return nil +} + +// 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, an +// error is returned. +func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an error is returned. +func (m *Http2ProtocolOptions_SettingsParameter) Validate() error { + if m == nil { + return nil + } + + if wrapper := m.GetIdentifier(); wrapper != nil { + + if val := wrapper.GetValue(); val < 1 || val > 65536 { + return Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Identifier", + reason: "value must be inside range [1, 65536]", + } + } + + } else { + return Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Identifier", + reason: "value is required and must not be nil.", + } + } + + if m.GetValue() == nil { + return Http2ProtocolOptions_SettingsParameterValidationError{ + field: "Value", + reason: "value is required", + } + } + + 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, + } + } + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.go new file mode 100644 index 0000000000..b8524819f1 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/core/socket_option.proto + +package envoy_api_v2_core + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type SocketOption_SocketState int32 + +const ( + SocketOption_STATE_PREBIND SocketOption_SocketState = 0 + SocketOption_STATE_BOUND SocketOption_SocketState = 1 + SocketOption_STATE_LISTENING SocketOption_SocketState = 2 +) + +var SocketOption_SocketState_name = map[int32]string{ + 0: "STATE_PREBIND", + 1: "STATE_BOUND", + 2: "STATE_LISTENING", +} + +var SocketOption_SocketState_value = map[string]int32{ + "STATE_PREBIND": 0, + "STATE_BOUND": 1, + "STATE_LISTENING": 2, +} + +func (x SocketOption_SocketState) String() string { + return proto.EnumName(SocketOption_SocketState_name, int32(x)) +} + +func (SocketOption_SocketState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_188daec7f82db149, []int{0, 0} +} + +type SocketOption struct { + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` + Name int64 `protobuf:"varint,3,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to Value: + // *SocketOption_IntValue + // *SocketOption_BufValue + Value isSocketOption_Value `protobuf_oneof:"value"` + State SocketOption_SocketState `protobuf:"varint,6,opt,name=state,proto3,enum=envoy.api.v2.core.SocketOption_SocketState" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SocketOption) Reset() { *m = SocketOption{} } +func (m *SocketOption) String() string { return proto.CompactTextString(m) } +func (*SocketOption) ProtoMessage() {} +func (*SocketOption) Descriptor() ([]byte, []int) { + return fileDescriptor_188daec7f82db149, []int{0} +} + +func (m *SocketOption) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SocketOption.Unmarshal(m, b) +} +func (m *SocketOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SocketOption.Marshal(b, m, deterministic) +} +func (m *SocketOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_SocketOption.Merge(m, src) +} +func (m *SocketOption) XXX_Size() int { + return xxx_messageInfo_SocketOption.Size(m) +} +func (m *SocketOption) XXX_DiscardUnknown() { + xxx_messageInfo_SocketOption.DiscardUnknown(m) +} + +var xxx_messageInfo_SocketOption proto.InternalMessageInfo + +func (m *SocketOption) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *SocketOption) GetLevel() int64 { + if m != nil { + return m.Level + } + return 0 +} + +func (m *SocketOption) GetName() int64 { + if m != nil { + return m.Name + } + return 0 +} + +type isSocketOption_Value interface { + isSocketOption_Value() +} + +type SocketOption_IntValue struct { + IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type SocketOption_BufValue struct { + BufValue []byte `protobuf:"bytes,5,opt,name=buf_value,json=bufValue,proto3,oneof"` +} + +func (*SocketOption_IntValue) isSocketOption_Value() {} + +func (*SocketOption_BufValue) isSocketOption_Value() {} + +func (m *SocketOption) GetValue() isSocketOption_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *SocketOption) GetIntValue() int64 { + if x, ok := m.GetValue().(*SocketOption_IntValue); ok { + return x.IntValue + } + return 0 +} + +func (m *SocketOption) GetBufValue() []byte { + if x, ok := m.GetValue().(*SocketOption_BufValue); ok { + return x.BufValue + } + return nil +} + +func (m *SocketOption) GetState() SocketOption_SocketState { + if m != nil { + return m.State + } + return SocketOption_STATE_PREBIND +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SocketOption) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SocketOption_IntValue)(nil), + (*SocketOption_BufValue)(nil), + } +} + +func init() { + proto.RegisterEnum("envoy.api.v2.core.SocketOption_SocketState", SocketOption_SocketState_name, SocketOption_SocketState_value) + proto.RegisterType((*SocketOption)(nil), "envoy.api.v2.core.SocketOption") +} + +func init() { + proto.RegisterFile("envoy/api/v2/core/socket_option.proto", fileDescriptor_188daec7f82db149) +} + +var fileDescriptor_188daec7f82db149 = []byte{ + // 392 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xd1, 0xca, 0xd3, 0x30, + 0x14, 0xc7, 0xbf, 0x74, 0x5f, 0xc7, 0xb7, 0x6c, 0xba, 0x2e, 0x0e, 0x2d, 0x83, 0x69, 0x19, 0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or/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.validate.go new file mode 100644 index 0000000000..66304fd589 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/core/socket_option.pb.validate.go @@ -0,0 +1,131 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/core/socket_option.proto + +package envoy_api_v2_core + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _socket_option_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on SocketOption with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *SocketOption) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Description + + // no validation rules for Level + + // no validation rules for Name + + if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { + return SocketOptionValidationError{ + field: "State", + reason: "value must be one of the defined enum values", + } + } + + switch m.Value.(type) { + + case *SocketOption_IntValue: + // no validation rules for IntValue + + case *SocketOption_BufValue: + // no validation rules for BufValue + + default: + return SocketOptionValidationError{ + field: "Value", + reason: "value is required", + } + + } + + return nil +} + +// 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{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go index 6ccec42493..98b21034fe 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go @@ -1,21 +1,16 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/discovery.proto -package v2 +package envoy_api_v2 import ( - bytes "bytes" fmt "fmt" - io "io" - math "math" - - rpc "github.com/gogo/googleapis/google/rpc" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + status "google.golang.org/genproto/googleapis/rpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,46 +22,18 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. type DiscoveryRequest struct { - // 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 *core.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 expect empty resource_names, since this is global - // discovery for the Envoy instance. 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"` - // 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 if no nonce is available, e.g. at startup or for non-stream - // xDS implementations. - 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 *rpc.Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + Node *core.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` + ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` + TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` + ErrorDetail *status.Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DiscoveryRequest) Reset() { *m = DiscoveryRequest{} } @@ -75,22 +42,18 @@ func (*DiscoveryRequest) ProtoMessage() {} func (*DiscoveryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2c7365e287e5c035, []int{0} } + func (m *DiscoveryRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DiscoveryRequest.Unmarshal(m, b) } func (m *DiscoveryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_DiscoveryRequest.Marshal(b, m, deterministic) } func (m *DiscoveryRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_DiscoveryRequest.Merge(m, src) } func (m *DiscoveryRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DiscoveryRequest.Size(m) } func (m *DiscoveryRequest) XXX_DiscardUnknown() { xxx_messageInfo_DiscoveryRequest.DiscardUnknown(m) @@ -133,7 +96,7 @@ func (m *DiscoveryRequest) GetResponseNonce() string { return "" } -func (m *DiscoveryRequest) GetErrorDetail() *rpc.Status { +func (m *DiscoveryRequest) GetErrorDetail() *status.Status { if m != nil { return m.ErrorDetail } @@ -141,40 +104,11 @@ func (m *DiscoveryRequest) GetErrorDetail() *rpc.Status { } type DiscoveryResponse struct { - // 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 []types.Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources"` - // [#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. This must be consistent with the type_url in the - // Any messages for resources if resources is non-empty. This effectively - // identifies the xDS API when muxing over ADS. - 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"` - // [#not-implemented-hide:] - // The control plane instance that sent the response. + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + Resources []*any.Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` + Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"` + TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` ControlPlane *core.ControlPlane `protobuf:"bytes,6,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -187,22 +121,18 @@ func (*DiscoveryResponse) ProtoMessage() {} func (*DiscoveryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2c7365e287e5c035, []int{1} } + func (m *DiscoveryResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DiscoveryResponse.Unmarshal(m, b) } func (m *DiscoveryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_DiscoveryResponse.Marshal(b, m, deterministic) } func (m *DiscoveryResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_DiscoveryResponse.Merge(m, src) } func (m *DiscoveryResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DiscoveryResponse.Size(m) } func (m *DiscoveryResponse) XXX_DiscardUnknown() { xxx_messageInfo_DiscoveryResponse.DiscardUnknown(m) @@ -217,7 +147,7 @@ func (m *DiscoveryResponse) GetVersionInfo() string { return "" } -func (m *DiscoveryResponse) GetResources() []types.Any { +func (m *DiscoveryResponse) GetResources() []*any.Any { if m != nil { return m.Resources } @@ -252,76 +182,17 @@ func (m *DiscoveryResponse) GetControlPlane() *core.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 can be sent in 3 situations: -// 1. Initial message in a xDS bidirectional gRPC stream. -// 2. As a ACK or NACK response to a previous DeltaDiscoveryResponse. -// In this case the response_nonce is set to the nonce value in the Response. -// ACK or NACK is determined by the absence or presence of error_detail. -// 3. Spontaneous DeltaDiscoveryRequest from the client. -// This can be done to dynamically add or remove elements from the tracked -// resource_names set. In this case response_nonce must be omitted. type DeltaDiscoveryRequest struct { - // The node making the request. - Node *core.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 is implicit - // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is - // required for ADS. - 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 in 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. - // The xDS server must send updates for all tracked resources but can also - // send updates for resources the client has not subscribed to. This behavior - // is similar to state-of-the-world xDS. - // These two fields can be set for all types of DeltaDiscoveryRequests - // (initial, ACK/NACK or spontaneous). - // - // 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"` - // This map must be populated when the DeltaDiscoveryRequest is the - // first in a stream (assuming there are any resources - this field's purpose is to enable - // a session to continue in a reconnected gRPC stream, and so will not be used in the very - // first stream of a session). The keys are the resources names of the xDS resources - // known to the xDS client. The values in the map are the associated resource - // level version info. - 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 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 *rpc.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + ResourceNamesSubscribe []string `protobuf:"bytes,3,rep,name=resource_names_subscribe,json=resourceNamesSubscribe,proto3" json:"resource_names_subscribe,omitempty"` + ResourceNamesUnsubscribe []string `protobuf:"bytes,4,rep,name=resource_names_unsubscribe,json=resourceNamesUnsubscribe,proto3" json:"resource_names_unsubscribe,omitempty"` + 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"` + ResponseNonce string `protobuf:"bytes,6,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` + ErrorDetail *status.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DeltaDiscoveryRequest) Reset() { *m = DeltaDiscoveryRequest{} } @@ -330,22 +201,18 @@ func (*DeltaDiscoveryRequest) ProtoMessage() {} func (*DeltaDiscoveryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2c7365e287e5c035, []int{2} } + func (m *DeltaDiscoveryRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DeltaDiscoveryRequest.Unmarshal(m, b) } func (m *DeltaDiscoveryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_DeltaDiscoveryRequest.Marshal(b, m, deterministic) } func (m *DeltaDiscoveryRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_DeltaDiscoveryRequest.Merge(m, src) } func (m *DeltaDiscoveryRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DeltaDiscoveryRequest.Size(m) } func (m *DeltaDiscoveryRequest) XXX_DiscardUnknown() { xxx_messageInfo_DeltaDiscoveryRequest.DiscardUnknown(m) @@ -395,7 +262,7 @@ func (m *DeltaDiscoveryRequest) GetResponseNonce() string { return "" } -func (m *DeltaDiscoveryRequest) GetErrorDetail() *rpc.Status { +func (m *DeltaDiscoveryRequest) GetErrorDetail() *status.Status { if m != nil { return m.ErrorDetail } @@ -403,20 +270,14 @@ func (m *DeltaDiscoveryRequest) GetErrorDetail() *rpc.Status { } type DeltaDiscoveryResponse struct { - // 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 that match the type url - // in the DeltaDiscoveryRequest. - Resources []Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources"` - // 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"` - // The nonce provides a way for DeltaDiscoveryRequests to uniquely - // reference a DeltaDiscoveryResponse. The nonce is required. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` + Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` + TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + RemovedResources []string `protobuf:"bytes,6,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"` + Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DeltaDiscoveryResponse) Reset() { *m = DeltaDiscoveryResponse{} } @@ -425,22 +286,18 @@ func (*DeltaDiscoveryResponse) ProtoMessage() {} func (*DeltaDiscoveryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2c7365e287e5c035, []int{3} } + func (m *DeltaDiscoveryResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DeltaDiscoveryResponse.Unmarshal(m, b) } func (m *DeltaDiscoveryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_DeltaDiscoveryResponse.Marshal(b, m, deterministic) } func (m *DeltaDiscoveryResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_DeltaDiscoveryResponse.Merge(m, src) } func (m *DeltaDiscoveryResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DeltaDiscoveryResponse.Size(m) } func (m *DeltaDiscoveryResponse) XXX_DiscardUnknown() { xxx_messageInfo_DeltaDiscoveryResponse.DiscardUnknown(m) @@ -455,13 +312,20 @@ func (m *DeltaDiscoveryResponse) GetSystemVersionInfo() string { return "" } -func (m *DeltaDiscoveryResponse) GetResources() []Resource { +func (m *DeltaDiscoveryResponse) GetResources() []*Resource { if m != nil { return m.Resources } return nil } +func (m *DeltaDiscoveryResponse) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + func (m *DeltaDiscoveryResponse) GetRemovedResources() []string { if m != nil { return m.RemovedResources @@ -477,19 +341,13 @@ func (m *DeltaDiscoveryResponse) GetNonce() string { } type Resource struct { - // The resource's name, to distinguish it from others of the same type of resource. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // [#not-implemented-hide:] - // 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 *types.Any `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Aliases []string `protobuf:"bytes,4,rep,name=aliases,proto3" json:"aliases,omitempty"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Resource *any.Any `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Resource) Reset() { *m = Resource{} } @@ -498,22 +356,18 @@ func (*Resource) ProtoMessage() {} func (*Resource) Descriptor() ([]byte, []int) { return fileDescriptor_2c7365e287e5c035, []int{4} } + func (m *Resource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Resource.Unmarshal(m, b) } func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_Resource.Marshal(b, m, deterministic) } func (m *Resource) XXX_Merge(src proto.Message) { xxx_messageInfo_Resource.Merge(m, src) } func (m *Resource) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Resource.Size(m) } func (m *Resource) XXX_DiscardUnknown() { xxx_messageInfo_Resource.DiscardUnknown(m) @@ -542,7 +396,7 @@ func (m *Resource) GetVersion() string { return "" } -func (m *Resource) GetResource() *types.Any { +func (m *Resource) GetResource() *any.Any { if m != nil { return m.Resource } @@ -561,2221 +415,50 @@ func init() { func init() { proto.RegisterFile("envoy/api/v2/discovery.proto", fileDescriptor_2c7365e287e5c035) } var fileDescriptor_2c7365e287e5c035 = []byte{ - // 701 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x6b, 0xdb, 0x4c, - 0x10, 0xfd, 0xd6, 0x76, 0x1c, 0x7b, 0xed, 0x84, 0x64, 0xbf, 0x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, 0x5b, - 0xc0, 0x0d, 0x8f, 0x61, 0xec, 0xcc, 0x39, 0xaa, 0x6a, 0xc6, 0x5b, 0x3a, 0x61, 0xcf, 0xc0, 0x4b, - 0x37, 0xa2, 0xf7, 0x1d, 0xe1, 0x5a, 0x8e, 0x21, 0x04, 0x57, 0x52, 0xcf, 0xa8, 0x2d, 0xab, 0xdb, - 0xea, 0x4c, 0x0c, 0xbc, 0x4e, 0x7d, 0x8f, 0x4a, 0x90, 0xda, 0x3d, 0x79, 0x98, 0x66, 0x74, 0x8b, - 0xba, 0xbb, 0x3c, 0x24, 0xcf, 0x71, 0x2d, 0xaf, 0x47, 0xff, 0xf3, 0x96, 0x2e, 0xba, 0x3d, 0x43, - 0x9d, 0xbc, 0xff, 0x31, 0xed, 0xa0, 0xdb, 0x69, 0x07, 0xfd, 0x9a, 0x76, 0xd0, 0xef, 0x69, 0x07, - 0xfd, 0x9d, 0x76, 0x10, 0x6e, 0x7b, 0x3c, 0x93, 0x22, 0x10, 0xfc, 0x4b, 0x52, 0x50, 0xe5, 0x64, - 0x73, 0x26, 0xfd, 0x79, 0x4a, 0x79, 0x8e, 0x3e, 0x96, 0xe2, 0xc1, 0xa8, 0xaa, 0xf8, 0x5f, 0xfc, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x29, 0x62, 0x8b, 0x23, 0x3e, 0x06, 0x00, 0x00, + // 720 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x95, 0xf3, 0xd5, 0x64, 0x92, 0x56, 0xe9, 0xbc, 0xbe, 0xd4, 0x8d, 0xfa, 0x1e, 0x21, 0x12, + 0x52, 0xa4, 0x4a, 0x36, 0x4a, 0x41, 0xaa, 0x10, 0x0b, 0x28, 0x61, 0x51, 0x16, 0x55, 0xe5, 0xaa, + 0x15, 0x3b, 0x6b, 0xe2, 0x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5, 0x09, 0x67, 0x51, 0x67, 0xe5, 0x9a, 0x0c, 0x3f, + 0x19, 0xa8, 0x99, 0x63, 0x30, 0x46, 0xb5, 0xd4, 0x48, 0x6a, 0xf5, 0x5a, 0x8e, 0xfa, 0xc6, 0x26, + 0xda, 0x20, 0x3e, 0x25, 0x12, 0xa4, 0xb6, 0x54, 0x1e, 0xa6, 0x19, 0xcd, 0x5b, 0x53, 0xce, 0x43, + 0xfc, 0x10, 0x35, 0xf3, 0x7e, 0xf4, 0x4f, 0xe0, 0xea, 0xbd, 0x5f, 0xa0, 0x8e, 0x5f, 0xff, 0xfc, + 0xf2, 0xfb, 0x73, 0x7d, 0x1f, 0xf7, 0xb3, 0x71, 0x48, 0x10, 0x31, 0xf5, 0xc0, 0x5a, 0xfe, 0x5d, + 0xc4, 0x87, 0x5f, 0x3f, 0x7c, 0xfb, 0xde, 0xa8, 0x74, 0x0d, 0xd4, 0xa7, 0x3c, 0x9b, 0x5a, 0x20, + 0xf8, 0xbb, 0xa4, 0x34, 0xc0, 0xe3, 0xad, 0x85, 0x4a, 0x67, 0xe9, 0x43, 0x67, 0xc6, 0xb4, 0xa1, + 0x5e, 0x3c, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x0b, 0x0b, 0xc6, 0x88, 0x06, 0x00, 0x00, } - -func (this *DiscoveryRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DiscoveryRequest) - if !ok { - that2, ok := that.(DiscoveryRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.VersionInfo != that1.VersionInfo { - return false - } - if !this.Node.Equal(that1.Node) { - return false - } - if len(this.ResourceNames) != len(that1.ResourceNames) { - return false - } - for i := range this.ResourceNames { - if this.ResourceNames[i] != that1.ResourceNames[i] { - return false - } - } - if this.TypeUrl != that1.TypeUrl { - return false - } - if this.ResponseNonce != that1.ResponseNonce { - return false - } - if !this.ErrorDetail.Equal(that1.ErrorDetail) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DiscoveryResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DiscoveryResponse) - if !ok { - that2, ok := that.(DiscoveryResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.VersionInfo != that1.VersionInfo { - return false - } - if len(this.Resources) != len(that1.Resources) { - return false - } - for i := range this.Resources { - if !this.Resources[i].Equal(&that1.Resources[i]) { - return false - } - } - if this.Canary != that1.Canary { - return false - } - if this.TypeUrl != that1.TypeUrl { - return false - } - if this.Nonce != that1.Nonce { - return false - } - if !this.ControlPlane.Equal(that1.ControlPlane) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeltaDiscoveryRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DeltaDiscoveryRequest) - if !ok { - that2, ok := that.(DeltaDiscoveryRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Node.Equal(that1.Node) { - return false - } - if this.TypeUrl != that1.TypeUrl { - return false - } - if len(this.ResourceNamesSubscribe) != len(that1.ResourceNamesSubscribe) { - return false - } - for i := range this.ResourceNamesSubscribe { - if this.ResourceNamesSubscribe[i] != that1.ResourceNamesSubscribe[i] { - return false - } - } - if len(this.ResourceNamesUnsubscribe) != len(that1.ResourceNamesUnsubscribe) { - return false - } - for i := range this.ResourceNamesUnsubscribe { - if this.ResourceNamesUnsubscribe[i] != that1.ResourceNamesUnsubscribe[i] { - return false - } - } - if len(this.InitialResourceVersions) != len(that1.InitialResourceVersions) { - return false - } - for i := range this.InitialResourceVersions { - if this.InitialResourceVersions[i] != that1.InitialResourceVersions[i] { - return false - } - } - if this.ResponseNonce != that1.ResponseNonce { - return false - } - if !this.ErrorDetail.Equal(that1.ErrorDetail) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DeltaDiscoveryResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DeltaDiscoveryResponse) - if !ok { - that2, ok := that.(DeltaDiscoveryResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SystemVersionInfo != that1.SystemVersionInfo { - return false - } - if len(this.Resources) != len(that1.Resources) { - return false - } - for i := range this.Resources { - if !this.Resources[i].Equal(&that1.Resources[i]) { - return false - } - } - if len(this.RemovedResources) != len(that1.RemovedResources) { - return false - } - for i := range this.RemovedResources { - if this.RemovedResources[i] != that1.RemovedResources[i] { - return false - } - } - if this.Nonce != that1.Nonce { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Resource) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Resource) - if !ok { - that2, ok := that.(Resource) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Aliases) != len(that1.Aliases) { - return false - } - for i := range this.Aliases { - if this.Aliases[i] != that1.Aliases[i] { - return false - } - } - if this.Version != that1.Version { - return false - } - if !this.Resource.Equal(that1.Resource) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *DiscoveryRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DiscoveryRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.VersionInfo) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.VersionInfo))) - i += copy(dAtA[i:], m.VersionInfo) - } - if m.Node != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(m.Node.Size())) - n1, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.ResourceNames) > 0 { - for _, s := range m.ResourceNames { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.TypeUrl) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.TypeUrl))) - i += copy(dAtA[i:], m.TypeUrl) - } - if len(m.ResponseNonce) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.ResponseNonce))) - i += copy(dAtA[i:], m.ResponseNonce) - } - if m.ErrorDetail != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(m.ErrorDetail.Size())) - n2, err := m.ErrorDetail.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DiscoveryResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DiscoveryResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.VersionInfo) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.VersionInfo))) - i += copy(dAtA[i:], m.VersionInfo) - } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Canary { - dAtA[i] = 0x18 - i++ - if m.Canary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.TypeUrl) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.TypeUrl))) - i += copy(dAtA[i:], m.TypeUrl) - } - if len(m.Nonce) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.Nonce))) - i += copy(dAtA[i:], m.Nonce) - } - if m.ControlPlane != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(m.ControlPlane.Size())) - n3, err := m.ControlPlane.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeltaDiscoveryRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeltaDiscoveryRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Node != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(m.Node.Size())) - n4, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if len(m.TypeUrl) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.TypeUrl))) - i += copy(dAtA[i:], m.TypeUrl) - } - if len(m.ResourceNamesSubscribe) > 0 { - for _, s := range m.ResourceNamesSubscribe { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ResourceNamesUnsubscribe) > 0 { - for _, s := range m.ResourceNamesUnsubscribe { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.InitialResourceVersions) > 0 { - keysForInitialResourceVersions := make([]string, 0, len(m.InitialResourceVersions)) - for k, _ := range m.InitialResourceVersions { - keysForInitialResourceVersions = append(keysForInitialResourceVersions, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForInitialResourceVersions) - for _, k := range keysForInitialResourceVersions { - dAtA[i] = 0x2a - i++ - v := m.InitialResourceVersions[string(k)] - mapSize := 1 + len(k) + sovDiscovery(uint64(len(k))) + 1 + len(v) + sovDiscovery(uint64(len(v))) - i = encodeVarintDiscovery(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if len(m.ResponseNonce) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.ResponseNonce))) - i += copy(dAtA[i:], m.ResponseNonce) - } - if m.ErrorDetail != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(m.ErrorDetail.Size())) - n5, err := m.ErrorDetail.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeltaDiscoveryResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeltaDiscoveryResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.SystemVersionInfo) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.SystemVersionInfo))) - i += copy(dAtA[i:], m.SystemVersionInfo) - } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Nonce) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.Nonce))) - i += copy(dAtA[i:], m.Nonce) - } - if len(m.RemovedResources) > 0 { - for _, s := range m.RemovedResources { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Resource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resource) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Version) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.Version))) - i += copy(dAtA[i:], m.Version) - } - if m.Resource != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(m.Resource.Size())) - n6, err := m.Resource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if len(m.Name) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintDiscovery(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Aliases) > 0 { - for _, s := range m.Aliases { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintDiscovery(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *DiscoveryRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.VersionInfo) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - if len(m.ResourceNames) > 0 { - for _, s := range m.ResourceNames { - l = len(s) - n += 1 + l + sovDiscovery(uint64(l)) - } - } - l = len(m.TypeUrl) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - l = len(m.ResponseNonce) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.ErrorDetail != nil { - l = m.ErrorDetail.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DiscoveryResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.VersionInfo) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - } - if m.Canary { - n += 2 - } - l = len(m.TypeUrl) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.ControlPlane != nil { - l = m.ControlPlane.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeltaDiscoveryRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - l = len(m.TypeUrl) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if len(m.ResourceNamesSubscribe) > 0 { - for _, s := range m.ResourceNamesSubscribe { - l = len(s) - n += 1 + l + sovDiscovery(uint64(l)) - } - } - if len(m.ResourceNamesUnsubscribe) > 0 { - for _, s := range m.ResourceNamesUnsubscribe { - l = len(s) - n += 1 + l + sovDiscovery(uint64(l)) - } - } - if len(m.InitialResourceVersions) > 0 { - for k, v := range m.InitialResourceVersions { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovDiscovery(uint64(len(k))) + 1 + len(v) + sovDiscovery(uint64(len(v))) - n += mapEntrySize + 1 + sovDiscovery(uint64(mapEntrySize)) - } - } - l = len(m.ResponseNonce) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.ErrorDetail != nil { - l = m.ErrorDetail.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeltaDiscoveryResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SystemVersionInfo) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if len(m.RemovedResources) > 0 { - for _, s := range m.RemovedResources { - l = len(s) - n += 1 + l + sovDiscovery(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Resource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovDiscovery(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovDiscovery(uint64(l)) - } - if len(m.Aliases) > 0 { - for _, s := range m.Aliases { - l = len(s) - n += 1 + l + sovDiscovery(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDiscovery(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozDiscovery(x uint64) (n int) { - return sovDiscovery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DiscoveryRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VersionInfo = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Node == nil { - m.Node = &core.Node{} - } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - 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 ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseNonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseNonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorDetail", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ErrorDetail == nil { - m.ErrorDetail = &rpc.Status{} - } - if err := m.ErrorDetail.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDiscovery(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDiscovery - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDiscovery - } - 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 *DiscoveryResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VersionInfo = 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 ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, types.Any{}) - if err := m.Resources[len(m.Resources)-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 Canary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Canary = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControlPlane", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ControlPlane == nil { - m.ControlPlane = &core.ControlPlane{} - } - if err := m.ControlPlane.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDiscovery(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDiscovery - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDiscovery - } - 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 *DeltaDiscoveryRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeltaDiscoveryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeltaDiscoveryRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Node == nil { - m.Node = &core.Node{} - } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNamesSubscribe", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceNamesSubscribe = append(m.ResourceNamesSubscribe, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNamesUnsubscribe", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceNamesUnsubscribe = append(m.ResourceNamesUnsubscribe, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialResourceVersions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InitialResourceVersions == nil { - m.InitialResourceVersions = 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 ErrIntOverflowDiscovery - } - 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 ErrIntOverflowDiscovery - } - 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 ErrInvalidLengthDiscovery - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthDiscovery - } - 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 ErrIntOverflowDiscovery - } - 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 ErrInvalidLengthDiscovery - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthDiscovery - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipDiscovery(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDiscovery - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.InitialResourceVersions[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseNonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseNonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorDetail", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ErrorDetail == nil { - m.ErrorDetail = &rpc.Status{} - } - if err := m.ErrorDetail.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDiscovery(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDiscovery - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDiscovery - } - 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 *DeltaDiscoveryResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeltaDiscoveryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeltaDiscoveryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SystemVersionInfo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SystemVersionInfo = 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 ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, Resource{}) - if err := m.Resources[len(m.Resources)-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 Nonce", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedResources", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RemovedResources = append(m.RemovedResources, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDiscovery(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDiscovery - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDiscovery - } - 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 *Resource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: 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 ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - 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 Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &types.Any{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDiscovery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDiscovery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDiscovery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDiscovery(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDiscovery - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDiscovery - } - 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 skipDiscovery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDiscovery - } - 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, ErrIntOverflowDiscovery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDiscovery - } - 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, ErrInvalidLengthDiscovery - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthDiscovery - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDiscovery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDiscovery(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthDiscovery - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthDiscovery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDiscovery = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go index ad077e7b0c..48ff383dd3 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/discovery.proto -package v2 +package envoy_api_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _discovery_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on DiscoveryRequest with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -43,17 +46,12 @@ func (m *DiscoveryRequest) Validate() error { // no validation rules for VersionInfo - { - tmp := m.GetNode() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -62,17 +60,12 @@ func (m *DiscoveryRequest) Validate() error { // no validation rules for ResponseNonce - { - tmp := m.GetErrorDetail() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -147,17 +140,12 @@ func (m *DiscoveryResponse) Validate() error { for idx, item := range m.GetResources() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(&tmp).(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, - } + 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, } } } @@ -170,17 +158,12 @@ func (m *DiscoveryResponse) Validate() error { // no validation rules for Nonce - { - tmp := m.GetControlPlane() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -252,17 +235,12 @@ func (m *DeltaDiscoveryRequest) Validate() error { return nil } - { - tmp := m.GetNode() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -273,17 +251,12 @@ func (m *DeltaDiscoveryRequest) Validate() error { // no validation rules for ResponseNonce - { - tmp := m.GetErrorDetail() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } @@ -360,23 +333,20 @@ func (m *DeltaDiscoveryResponse) Validate() error { for idx, item := range m.GetResources() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(&tmp).(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, - } + 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 + // no validation rules for Nonce return nil @@ -449,17 +419,12 @@ func (m *Resource) Validate() error { // no validation rules for Version - { - tmp := m.GetResource() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } + 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, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go index 395b007fc2..27c735620f 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go @@ -1,25 +1,22 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/eds.proto -package v2 +package envoy_api_v2 import ( - bytes "bytes" context "context" fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/googleapis/google/api" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/golang/protobuf/ptypes/wrappers" + _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" - - endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" - _type "github.com/envoyproxy/go-control-plane/envoy/type" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -31,414 +28,73 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -type ClusterLoadAssignment struct { - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - // List of endpoints to load balance to. - Endpoints []endpoint.LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints"` - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - NamedEndpoints map[string]*endpoint.Endpoint `protobuf:"bytes,5,rep,name=named_endpoints,json=namedEndpoints,proto3" json:"named_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Load balancing policy settings. - Policy *ClusterLoadAssignment_Policy `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type EdsDummy struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ClusterLoadAssignment) Reset() { *m = ClusterLoadAssignment{} } -func (m *ClusterLoadAssignment) String() string { return proto.CompactTextString(m) } -func (*ClusterLoadAssignment) ProtoMessage() {} -func (*ClusterLoadAssignment) Descriptor() ([]byte, []int) { +func (m *EdsDummy) Reset() { *m = EdsDummy{} } +func (m *EdsDummy) String() string { return proto.CompactTextString(m) } +func (*EdsDummy) ProtoMessage() {} +func (*EdsDummy) Descriptor() ([]byte, []int) { return fileDescriptor_3c8760f38742c17f, []int{0} } -func (m *ClusterLoadAssignment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (m *EdsDummy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EdsDummy.Unmarshal(m, b) } -func (m *ClusterLoadAssignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *EdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EdsDummy.Marshal(b, m, deterministic) } -func (m *ClusterLoadAssignment) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterLoadAssignment.Merge(m, src) +func (m *EdsDummy) XXX_Merge(src proto.Message) { + xxx_messageInfo_EdsDummy.Merge(m, src) } -func (m *ClusterLoadAssignment) XXX_Size() int { - return m.Size() +func (m *EdsDummy) XXX_Size() int { + return xxx_messageInfo_EdsDummy.Size(m) } -func (m *ClusterLoadAssignment) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterLoadAssignment.DiscardUnknown(m) +func (m *EdsDummy) XXX_DiscardUnknown() { + xxx_messageInfo_EdsDummy.DiscardUnknown(m) } -var xxx_messageInfo_ClusterLoadAssignment proto.InternalMessageInfo - -func (m *ClusterLoadAssignment) GetClusterName() string { - if m != nil { - return m.ClusterName - } - return "" -} - -func (m *ClusterLoadAssignment) GetEndpoints() []endpoint.LocalityLbEndpoints { - if m != nil { - return m.Endpoints - } - return nil -} - -func (m *ClusterLoadAssignment) GetNamedEndpoints() map[string]*endpoint.Endpoint { - if m != nil { - return m.NamedEndpoints - } - return nil -} - -func (m *ClusterLoadAssignment) GetPolicy() *ClusterLoadAssignment_Policy { - if m != nil { - return m.Policy - } - return nil -} - -// Load balancing policy settings. -type ClusterLoadAssignment_Policy struct { - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - DropOverloads []*ClusterLoadAssignment_Policy_DropOverload `protobuf:"bytes,2,rep,name=drop_overloads,json=dropOverloads,proto3" json:"drop_overloads,omitempty"` - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the percentage of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - OverprovisioningFactor *types.UInt32Value `protobuf:"bytes,3,opt,name=overprovisioning_factor,json=overprovisioningFactor,proto3" json:"overprovisioning_factor,omitempty"` - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - EndpointStaleAfter *types.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterLoadAssignment_Policy) Reset() { *m = ClusterLoadAssignment_Policy{} } -func (m *ClusterLoadAssignment_Policy) String() string { return proto.CompactTextString(m) } -func (*ClusterLoadAssignment_Policy) ProtoMessage() {} -func (*ClusterLoadAssignment_Policy) Descriptor() ([]byte, []int) { - return fileDescriptor_3c8760f38742c17f, []int{0, 1} -} -func (m *ClusterLoadAssignment_Policy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterLoadAssignment_Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterLoadAssignment_Policy) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterLoadAssignment_Policy.Merge(m, src) -} -func (m *ClusterLoadAssignment_Policy) XXX_Size() int { - return m.Size() -} -func (m *ClusterLoadAssignment_Policy) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterLoadAssignment_Policy.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterLoadAssignment_Policy proto.InternalMessageInfo - -func (m *ClusterLoadAssignment_Policy) GetDropOverloads() []*ClusterLoadAssignment_Policy_DropOverload { - if m != nil { - return m.DropOverloads - } - return nil -} - -func (m *ClusterLoadAssignment_Policy) GetOverprovisioningFactor() *types.UInt32Value { - if m != nil { - return m.OverprovisioningFactor - } - return nil -} - -func (m *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *types.Duration { - if m != nil { - return m.EndpointStaleAfter - } - return nil -} - -type ClusterLoadAssignment_Policy_DropOverload struct { - // Identifier for the policy specifying the drop. - Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` - // Percentage of traffic that should be dropped for the category. - DropPercentage *_type.FractionalPercent `protobuf:"bytes,2,opt,name=drop_percentage,json=dropPercentage,proto3" json:"drop_percentage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterLoadAssignment_Policy_DropOverload) Reset() { - *m = ClusterLoadAssignment_Policy_DropOverload{} -} -func (m *ClusterLoadAssignment_Policy_DropOverload) String() string { return proto.CompactTextString(m) } -func (*ClusterLoadAssignment_Policy_DropOverload) ProtoMessage() {} -func (*ClusterLoadAssignment_Policy_DropOverload) Descriptor() ([]byte, []int) { - return fileDescriptor_3c8760f38742c17f, []int{0, 1, 0} -} -func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Merge(m, src) -} -func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Size() int { - return m.Size() -} -func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload proto.InternalMessageInfo - -func (m *ClusterLoadAssignment_Policy_DropOverload) GetCategory() string { - if m != nil { - return m.Category - } - return "" -} - -func (m *ClusterLoadAssignment_Policy_DropOverload) GetDropPercentage() *_type.FractionalPercent { - if m != nil { - return m.DropPercentage - } - return nil -} +var xxx_messageInfo_EdsDummy proto.InternalMessageInfo func init() { - proto.RegisterType((*ClusterLoadAssignment)(nil), "envoy.api.v2.ClusterLoadAssignment") - proto.RegisterMapType((map[string]*endpoint.Endpoint)(nil), "envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry") - proto.RegisterType((*ClusterLoadAssignment_Policy)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy") - proto.RegisterType((*ClusterLoadAssignment_Policy_DropOverload)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload") + proto.RegisterType((*EdsDummy)(nil), "envoy.api.v2.EdsDummy") } func init() { proto.RegisterFile("envoy/api/v2/eds.proto", fileDescriptor_3c8760f38742c17f) } var fileDescriptor_3c8760f38742c17f = []byte{ - // 706 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x33, 0x9b, 0x34, 0xa6, 0xd3, 0xd8, 0x96, 0xb5, 0xb6, 0x71, 0x89, 0x69, 0x08, 0x0a, - 0x25, 0xc8, 0x46, 0x52, 0xa4, 0xd2, 0x8b, 0x34, 0xb6, 0x01, 0xa5, 0xd4, 0xb0, 0x45, 0xd1, 0x8b, - 0x71, 0xb2, 0x3b, 0x5d, 0x07, 0x37, 0x33, 0xe3, 0xec, 0x64, 0x75, 0x0f, 0x5e, 0x3c, 0x79, 0xf7, - 0x9f, 0x90, 0xfe, 0x09, 0x9e, 0x3c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0x6b, 0xe0, 0x26, 0xd0, 0x27, 0x70, 0xbe, 0x8f, - 0xa5, 0xfd, 0xfc, 0x3f, 0x82, 0x5b, 0x6f, 0xbf, 0xfe, 0x7c, 0xaf, 0xd5, 0x5b, 0x2b, 0xb9, 0x27, - 0x70, 0x33, 0xbb, 0x8e, 0x9b, 0xa0, 0xdd, 0xbb, 0xf3, 0x61, 0xda, 0x00, 0x47, 0xd3, 0x06, 0xf8, - 0x32, 0x6d, 0x80, 0x6f, 0xd3, 0x06, 0xf8, 0x31, 0x6d, 0x00, 0x68, 0x10, 0x16, 0xc3, 0xb9, 0x60, - 0xaf, 0xc3, 0x5c, 0x9d, 0x5e, 0x65, 0xc7, 0xf1, 0x07, 0x6a, 0xb8, 0x03, 0xf0, 0x0e, 0x80, 0x51, - 0x39, 0x1a, 0xf4, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x16, 0xd1, 0x36, 0x97, 0x05, - 0x00, 0x00, -} - -func (this *ClusterLoadAssignment) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClusterLoadAssignment) - if !ok { - that2, ok := that.(ClusterLoadAssignment) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ClusterName != that1.ClusterName { - return false - } - if len(this.Endpoints) != len(that1.Endpoints) { - return false - } - for i := range this.Endpoints { - if !this.Endpoints[i].Equal(&that1.Endpoints[i]) { - return false - } - } - if len(this.NamedEndpoints) != len(that1.NamedEndpoints) { - return false - } - for i := range this.NamedEndpoints { - if !this.NamedEndpoints[i].Equal(that1.NamedEndpoints[i]) { - return false - } - } - if !this.Policy.Equal(that1.Policy) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ClusterLoadAssignment_Policy) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClusterLoadAssignment_Policy) - if !ok { - that2, ok := that.(ClusterLoadAssignment_Policy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.DropOverloads) != len(that1.DropOverloads) { - return false - } - for i := range this.DropOverloads { - if !this.DropOverloads[i].Equal(that1.DropOverloads[i]) { - return false - } - } - if !this.OverprovisioningFactor.Equal(that1.OverprovisioningFactor) { - return false - } - if !this.EndpointStaleAfter.Equal(that1.EndpointStaleAfter) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ClusterLoadAssignment_Policy_DropOverload) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClusterLoadAssignment_Policy_DropOverload) - if !ok { - that2, ok := that.(ClusterLoadAssignment_Policy_DropOverload) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Category != that1.Category { - return false - } - if !this.DropPercentage.Equal(that1.DropPercentage) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + // 406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xbd, 0xee, 0xd2, 0x50, + 0x18, 0xc6, 0x2d, 0x44, 0x24, 0x27, 0x06, 0x4d, 0x07, 0x91, 0x82, 0x68, 0x2a, 0x03, 0x61, 0x68, + 0x0d, 0x6c, 0x6c, 0x22, 0x38, 0x39, 0x10, 0x71, 0x70, 0x3d, 0xf4, 0xbc, 0xd6, 0x93, 0xb4, 0xe7, + 0x1c, 0xcf, 0x47, 0xb5, 0x71, 0x21, 0x4e, 0xc6, 0xc5, 0xc1, 0xc4, 0x78, 0x01, 0x5e, 0x85, 0x57, + 0xe0, 0x6a, 0xbc, 0x05, 0xaf, 0x40, 0x77, 0x63, 0x68, 0x7b, 0xc0, 0x4a, 0x70, 0xfa, 0x6f, 0x6d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e7, 0xb8, 0x18, 0x75, 0x96, 0x90, 0x68, 0x7c, 0x34, 0xbe, + 0xfb, 0xcf, 0xe0, 0x9e, 0x9e, 0xb8, 0x8f, 0xfe, 0x2f, 0xaa, 0xad, 0x78, 0x8d, 0x3a, 0x0f, 0x41, + 0x47, 0xcf, 0x2f, 0xf0, 0xf6, 0xf1, 0x9b, 0xef, 0x3f, 0x3e, 0x34, 0x7a, 0x7e, 0xb7, 0xf6, 0x2b, + 0xcd, 0x6d, 0xbc, 0xaa, 0xc0, 0xcd, 0xb9, 0x33, 0xf1, 0x26, 0xef, 0x3e, 0x7f, 0xfc, 0x75, 0x65, + 0x84, 0xfc, 0x9a, 0xe3, 0x83, 0xc4, 0x28, 0x0d, 0xf2, 0x11, 0xc7, 0xe4, 0xbe, 0x52, 0x34, 0x66, + 0x29, 0x30, 0xbd, 0x78, 0xf2, 0xf3, 0xd3, 0xef, 0xf7, 0x97, 0xfb, 0x6e, 0xaf, 0xd4, 0xaa, 0x32, + 0xfc, 0xe0, 0x50, 0x5a, 0x36, 0xfb, 0xb2, 0xfb, 0xfa, 0xad, 0xd5, 0xb8, 0xee, 0x20, 0x8f, 0xf2, + 0xf2, 0x46, 0x21, 0xf9, 0xab, 0xbc, 0x76, 0xee, 0x62, 0xdf, 0xe9, 0x7a, 0xdf, 0xef, 0xda, 0x79, + 0xeb, 0x38, 0xeb, 0xf6, 0xb6, 0x55, 0xb4, 0x3d, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0x60, 0xd9, + 0x88, 0xd0, 0x28, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -453,9 +109,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type EndpointDiscoveryServiceClient interface { - // The resource_names field in DiscoveryRequest specifies a list of clusters - // to subscribe to updates for. StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) + DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) FetchEndpoints(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) } @@ -498,6 +153,37 @@ func (x *endpointDiscoveryServiceStreamEndpointsClient) Recv() (*DiscoveryRespon return m, nil } +func (c *endpointDiscoveryServiceClient) DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) { + stream, err := c.cc.NewStream(ctx, &_EndpointDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.EndpointDiscoveryService/DeltaEndpoints", opts...) + if err != nil { + return nil, err + } + x := &endpointDiscoveryServiceDeltaEndpointsClient{stream} + return x, nil +} + +type EndpointDiscoveryService_DeltaEndpointsClient interface { + Send(*DeltaDiscoveryRequest) error + Recv() (*DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type endpointDiscoveryServiceDeltaEndpointsClient struct { + grpc.ClientStream +} + +func (x *endpointDiscoveryServiceDeltaEndpointsClient) Send(m *DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *endpointDiscoveryServiceDeltaEndpointsClient) Recv() (*DeltaDiscoveryResponse, error) { + m := new(DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *endpointDiscoveryServiceClient) FetchEndpoints(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { out := new(DiscoveryResponse) err := c.cc.Invoke(ctx, "/envoy.api.v2.EndpointDiscoveryService/FetchEndpoints", in, out, opts...) @@ -509,12 +195,25 @@ func (c *endpointDiscoveryServiceClient) FetchEndpoints(ctx context.Context, in // EndpointDiscoveryServiceServer is the server API for EndpointDiscoveryService service. type EndpointDiscoveryServiceServer interface { - // The resource_names field in DiscoveryRequest specifies a list of clusters - // to subscribe to updates for. StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error + DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error FetchEndpoints(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) } +// UnimplementedEndpointDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedEndpointDiscoveryServiceServer struct { +} + +func (*UnimplementedEndpointDiscoveryServiceServer) StreamEndpoints(srv EndpointDiscoveryService_StreamEndpointsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamEndpoints not implemented") +} +func (*UnimplementedEndpointDiscoveryServiceServer) DeltaEndpoints(srv EndpointDiscoveryService_DeltaEndpointsServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaEndpoints not implemented") +} +func (*UnimplementedEndpointDiscoveryServiceServer) FetchEndpoints(ctx context.Context, req *DiscoveryRequest) (*DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchEndpoints not implemented") +} + func RegisterEndpointDiscoveryServiceServer(s *grpc.Server, srv EndpointDiscoveryServiceServer) { s.RegisterService(&_EndpointDiscoveryService_serviceDesc, srv) } @@ -545,6 +244,32 @@ func (x *endpointDiscoveryServiceStreamEndpointsServer) Recv() (*DiscoveryReques return m, nil } +func _EndpointDiscoveryService_DeltaEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(EndpointDiscoveryServiceServer).DeltaEndpoints(&endpointDiscoveryServiceDeltaEndpointsServer{stream}) +} + +type EndpointDiscoveryService_DeltaEndpointsServer interface { + Send(*DeltaDiscoveryResponse) error + Recv() (*DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type endpointDiscoveryServiceDeltaEndpointsServer struct { + grpc.ServerStream +} + +func (x *endpointDiscoveryServiceDeltaEndpointsServer) Send(m *DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *endpointDiscoveryServiceDeltaEndpointsServer) Recv() (*DeltaDiscoveryRequest, error) { + m := new(DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _EndpointDiscoveryService_FetchEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DiscoveryRequest) if err := dec(in); err != nil { @@ -579,963 +304,12 @@ var _EndpointDiscoveryService_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, ClientStreams: true, }, + { + StreamName: "DeltaEndpoints", + Handler: _EndpointDiscoveryService_DeltaEndpoints_Handler, + ServerStreams: true, + ClientStreams: true, + }, }, Metadata: "envoy/api/v2/eds.proto", } - -func (m *ClusterLoadAssignment) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterLoadAssignment) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ClusterName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintEds(dAtA, i, uint64(len(m.ClusterName))) - i += copy(dAtA[i:], m.ClusterName) - } - if len(m.Endpoints) > 0 { - for _, msg := range m.Endpoints { - dAtA[i] = 0x12 - i++ - i = encodeVarintEds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Policy != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintEds(dAtA, i, uint64(m.Policy.Size())) - n1, err := m.Policy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.NamedEndpoints) > 0 { - keysForNamedEndpoints := make([]string, 0, len(m.NamedEndpoints)) - for k, _ := range m.NamedEndpoints { - keysForNamedEndpoints = append(keysForNamedEndpoints, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForNamedEndpoints) - for _, k := range keysForNamedEndpoints { - dAtA[i] = 0x2a - i++ - v := m.NamedEndpoints[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovEds(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovEds(uint64(len(k))) + msgSize - i = encodeVarintEds(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintEds(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintEds(dAtA, i, uint64(v.Size())) - n2, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ClusterLoadAssignment_Policy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterLoadAssignment_Policy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DropOverloads) > 0 { - for _, msg := range m.DropOverloads { - dAtA[i] = 0x12 - i++ - i = encodeVarintEds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.OverprovisioningFactor != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintEds(dAtA, i, uint64(m.OverprovisioningFactor.Size())) - n3, err := m.OverprovisioningFactor.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.EndpointStaleAfter != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintEds(dAtA, i, uint64(m.EndpointStaleAfter.Size())) - n4, err := m.EndpointStaleAfter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ClusterLoadAssignment_Policy_DropOverload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterLoadAssignment_Policy_DropOverload) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Category) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintEds(dAtA, i, uint64(len(m.Category))) - i += copy(dAtA[i:], m.Category) - } - if m.DropPercentage != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintEds(dAtA, i, uint64(m.DropPercentage.Size())) - n5, err := m.DropPercentage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintEds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ClusterLoadAssignment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClusterName) - if l > 0 { - n += 1 + l + sovEds(uint64(l)) - } - if len(m.Endpoints) > 0 { - for _, e := range m.Endpoints { - l = e.Size() - n += 1 + l + sovEds(uint64(l)) - } - } - if m.Policy != nil { - l = m.Policy.Size() - n += 1 + l + sovEds(uint64(l)) - } - if len(m.NamedEndpoints) > 0 { - for k, v := range m.NamedEndpoints { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovEds(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovEds(uint64(len(k))) + l - n += mapEntrySize + 1 + sovEds(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterLoadAssignment_Policy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DropOverloads) > 0 { - for _, e := range m.DropOverloads { - l = e.Size() - n += 1 + l + sovEds(uint64(l)) - } - } - if m.OverprovisioningFactor != nil { - l = m.OverprovisioningFactor.Size() - n += 1 + l + sovEds(uint64(l)) - } - if m.EndpointStaleAfter != nil { - l = m.EndpointStaleAfter.Size() - n += 1 + l + sovEds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterLoadAssignment_Policy_DropOverload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Category) - if l > 0 { - n += 1 + l + sovEds(uint64(l)) - } - if m.DropPercentage != nil { - l = m.DropPercentage.Size() - n += 1 + l + sovEds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozEds(x uint64) (n int) { - return sovEds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ClusterLoadAssignment) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterLoadAssignment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterLoadAssignment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterName = string(dAtA[iNdEx:postIndex]) - 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 ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoints = append(m.Endpoints, endpoint.LocalityLbEndpoints{}) - if err := m.Endpoints[len(m.Endpoints)-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 Policy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Policy == nil { - m.Policy = &ClusterLoadAssignment_Policy{} - } - if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NamedEndpoints == nil { - m.NamedEndpoints = make(map[string]*endpoint.Endpoint) - } - var mapkey string - var mapvalue *endpoint.Endpoint - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - 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 ErrIntOverflowEds - } - 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 ErrInvalidLengthEds - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthEds - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthEds - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthEds - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &endpoint.Endpoint{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipEds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEds - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NamedEndpoints[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEds - } - 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 *ClusterLoadAssignment_Policy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Policy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DropOverloads", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DropOverloads = append(m.DropOverloads, &ClusterLoadAssignment_Policy_DropOverload{}) - if err := m.DropOverloads[len(m.DropOverloads)-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 OverprovisioningFactor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OverprovisioningFactor == nil { - m.OverprovisioningFactor = &types.UInt32Value{} - } - if err := m.OverprovisioningFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndpointStaleAfter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EndpointStaleAfter == nil { - m.EndpointStaleAfter = &types.Duration{} - } - if err := m.EndpointStaleAfter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEds - } - 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 *ClusterLoadAssignment_Policy_DropOverload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DropOverload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DropOverload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Category = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DropPercentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DropPercentage == nil { - m.DropPercentage = &_type.FractionalPercent{} - } - if err := m.DropPercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEds - } - 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 skipEds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEds - } - 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, ErrIntOverflowEds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEds - } - 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, ErrInvalidLengthEds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthEds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthEds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthEds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go index 0ce91d68e8..005f09b519 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/eds.proto -package v2 +package envoy_api_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,277 +30,25 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on ClusterLoadAssignment with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClusterLoadAssignment) Validate() error { - if m == nil { - return nil - } +// define the regex for a UUID once up-front +var _eds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") - if len(m.GetClusterName()) < 1 { - return ClusterLoadAssignmentValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 bytes", - } - } - - for idx, item := range m.GetEndpoints() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - // no validation rules for NamedEndpoints - - { - tmp := m.GetPolicy() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: "Policy", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// ClusterLoadAssignmentValidationError is the validation error returned by -// ClusterLoadAssignment.Validate if the designated constraints aren't met. -type ClusterLoadAssignmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterLoadAssignmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterLoadAssignmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterLoadAssignmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterLoadAssignmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterLoadAssignmentValidationError) ErrorName() string { - return "ClusterLoadAssignmentValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterLoadAssignmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterLoadAssignment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterLoadAssignmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterLoadAssignmentValidationError{} - -// Validate checks the field values on ClusterLoadAssignment_Policy with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *ClusterLoadAssignment_Policy) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetDropOverloads() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterLoadAssignment_PolicyValidationError{ - field: fmt.Sprintf("DropOverloads[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - if wrapper := m.GetOverprovisioningFactor(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - return ClusterLoadAssignment_PolicyValidationError{ - field: "OverprovisioningFactor", - reason: "value must be greater than 0", - } - } - - } - - if d := m.GetEndpointStaleAfter(); d != nil { - dur, err := types.DurationFromProto(d) - if err != nil { - return ClusterLoadAssignment_PolicyValidationError{ - field: "EndpointStaleAfter", - reason: "value is not a valid duration", - cause: err, - } - } - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return ClusterLoadAssignment_PolicyValidationError{ - field: "EndpointStaleAfter", - reason: "value must be greater than 0s", - } - } - - } - - return nil -} - -// ClusterLoadAssignment_PolicyValidationError is the validation error returned -// by ClusterLoadAssignment_Policy.Validate if the designated constraints -// aren't met. -type ClusterLoadAssignment_PolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterLoadAssignment_PolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterLoadAssignment_PolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterLoadAssignment_PolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterLoadAssignment_PolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterLoadAssignment_PolicyValidationError) ErrorName() string { - return "ClusterLoadAssignment_PolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterLoadAssignment_PolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterLoadAssignment_Policy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterLoadAssignment_PolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterLoadAssignment_PolicyValidationError{} - -// Validate checks the field values on -// ClusterLoadAssignment_Policy_DropOverload with the rules defined in the +// Validate checks the field values on EdsDummy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. -func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { +func (m *EdsDummy) Validate() error { if m == nil { return nil } - if len(m.GetCategory()) < 1 { - return ClusterLoadAssignment_Policy_DropOverloadValidationError{ - field: "Category", - reason: "value length must be at least 1 bytes", - } - } - - { - tmp := m.GetDropPercentage() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterLoadAssignment_Policy_DropOverloadValidationError{ - field: "DropPercentage", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - return nil } -// ClusterLoadAssignment_Policy_DropOverloadValidationError is the validation -// error returned by ClusterLoadAssignment_Policy_DropOverload.Validate if the -// designated constraints aren't met. -type ClusterLoadAssignment_Policy_DropOverloadValidationError struct { +// EdsDummyValidationError is the validation error returned by +// EdsDummy.Validate if the designated constraints aren't met. +type EdsDummyValidationError struct { field string reason string cause error @@ -308,24 +56,22 @@ type ClusterLoadAssignment_Policy_DropOverloadValidationError struct { } // Field function returns field value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Field() string { return e.field } +func (e EdsDummyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Reason() string { return e.reason } +func (e EdsDummyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Cause() error { return e.cause } +func (e EdsDummyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Key() bool { return e.key } +func (e EdsDummyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) ErrorName() string { - return "ClusterLoadAssignment_Policy_DropOverloadValidationError" -} +func (e EdsDummyValidationError) ErrorName() string { return "EdsDummyValidationError" } // Error satisfies the builtin error interface -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Error() string { +func (e EdsDummyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -337,14 +83,14 @@ func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Error() string } return fmt.Sprintf( - "invalid %sClusterLoadAssignment_Policy_DropOverload.%s: %s%s", + "invalid %sEdsDummy.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ClusterLoadAssignment_Policy_DropOverloadValidationError{} +var _ error = EdsDummyValidationError{} var _ interface { Field() string @@ -352,4 +98,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ClusterLoadAssignment_Policy_DropOverloadValidationError{} +} = EdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go new file mode 100644 index 0000000000..1d29e66f64 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go @@ -0,0 +1,258 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/endpoint.proto + +package envoy_api_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + _ "google.golang.org/genproto/googleapis/api/annotations" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type ClusterLoadAssignment struct { + ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + Endpoints []*endpoint.LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` + NamedEndpoints map[string]*endpoint.Endpoint `protobuf:"bytes,5,rep,name=named_endpoints,json=namedEndpoints,proto3" json:"named_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Policy *ClusterLoadAssignment_Policy `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClusterLoadAssignment) Reset() { *m = ClusterLoadAssignment{} } +func (m *ClusterLoadAssignment) String() string { return proto.CompactTextString(m) } +func (*ClusterLoadAssignment) ProtoMessage() {} +func (*ClusterLoadAssignment) Descriptor() ([]byte, []int) { + return fileDescriptor_8dd3a9d301e6758b, []int{0} +} + +func (m *ClusterLoadAssignment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClusterLoadAssignment.Unmarshal(m, b) +} +func (m *ClusterLoadAssignment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClusterLoadAssignment.Marshal(b, m, deterministic) +} +func (m *ClusterLoadAssignment) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterLoadAssignment.Merge(m, src) +} +func (m *ClusterLoadAssignment) XXX_Size() int { + return xxx_messageInfo_ClusterLoadAssignment.Size(m) +} +func (m *ClusterLoadAssignment) XXX_DiscardUnknown() { + xxx_messageInfo_ClusterLoadAssignment.DiscardUnknown(m) +} + +var xxx_messageInfo_ClusterLoadAssignment proto.InternalMessageInfo + +func (m *ClusterLoadAssignment) GetClusterName() string { + if m != nil { + return m.ClusterName + } + return "" +} + +func (m *ClusterLoadAssignment) GetEndpoints() []*endpoint.LocalityLbEndpoints { + if m != nil { + return m.Endpoints + } + return nil +} + +func (m *ClusterLoadAssignment) GetNamedEndpoints() map[string]*endpoint.Endpoint { + if m != nil { + return m.NamedEndpoints + } + return nil +} + +func (m *ClusterLoadAssignment) GetPolicy() *ClusterLoadAssignment_Policy { + if m != nil { + return m.Policy + } + return nil +} + +type ClusterLoadAssignment_Policy struct { + DropOverloads []*ClusterLoadAssignment_Policy_DropOverload `protobuf:"bytes,2,rep,name=drop_overloads,json=dropOverloads,proto3" json:"drop_overloads,omitempty"` + OverprovisioningFactor *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=overprovisioning_factor,json=overprovisioningFactor,proto3" json:"overprovisioning_factor,omitempty"` + EndpointStaleAfter *duration.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,omitempty"` + DisableOverprovisioning bool `protobuf:"varint,5,opt,name=disable_overprovisioning,json=disableOverprovisioning,proto3" json:"disable_overprovisioning,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClusterLoadAssignment_Policy) Reset() { *m = ClusterLoadAssignment_Policy{} } +func (m *ClusterLoadAssignment_Policy) String() string { return proto.CompactTextString(m) } +func (*ClusterLoadAssignment_Policy) ProtoMessage() {} +func (*ClusterLoadAssignment_Policy) Descriptor() ([]byte, []int) { + return fileDescriptor_8dd3a9d301e6758b, []int{0, 0} +} + +func (m *ClusterLoadAssignment_Policy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClusterLoadAssignment_Policy.Unmarshal(m, b) +} +func (m *ClusterLoadAssignment_Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClusterLoadAssignment_Policy.Marshal(b, m, deterministic) +} +func (m *ClusterLoadAssignment_Policy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterLoadAssignment_Policy.Merge(m, src) +} +func (m *ClusterLoadAssignment_Policy) XXX_Size() int { + return xxx_messageInfo_ClusterLoadAssignment_Policy.Size(m) +} +func (m *ClusterLoadAssignment_Policy) XXX_DiscardUnknown() { + xxx_messageInfo_ClusterLoadAssignment_Policy.DiscardUnknown(m) +} + +var xxx_messageInfo_ClusterLoadAssignment_Policy proto.InternalMessageInfo + +func (m *ClusterLoadAssignment_Policy) GetDropOverloads() []*ClusterLoadAssignment_Policy_DropOverload { + if m != nil { + return m.DropOverloads + } + return nil +} + +func (m *ClusterLoadAssignment_Policy) GetOverprovisioningFactor() *wrappers.UInt32Value { + if m != nil { + return m.OverprovisioningFactor + } + return nil +} + +func (m *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *duration.Duration { + if m != nil { + return m.EndpointStaleAfter + } + return nil +} + +// Deprecated: Do not use. +func (m *ClusterLoadAssignment_Policy) GetDisableOverprovisioning() bool { + if m != nil { + return m.DisableOverprovisioning + } + return false +} + +type ClusterLoadAssignment_Policy_DropOverload struct { + Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` + DropPercentage *_type.FractionalPercent `protobuf:"bytes,2,opt,name=drop_percentage,json=dropPercentage,proto3" json:"drop_percentage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClusterLoadAssignment_Policy_DropOverload) Reset() { + *m = ClusterLoadAssignment_Policy_DropOverload{} +} +func (m *ClusterLoadAssignment_Policy_DropOverload) String() string { return proto.CompactTextString(m) } +func (*ClusterLoadAssignment_Policy_DropOverload) ProtoMessage() {} +func (*ClusterLoadAssignment_Policy_DropOverload) Descriptor() ([]byte, []int) { + return fileDescriptor_8dd3a9d301e6758b, []int{0, 0, 0} +} + +func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Unmarshal(m, b) +} +func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Marshal(b, m, deterministic) +} +func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Merge(m, src) +} +func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_Size() int { + return xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.Size(m) +} +func (m *ClusterLoadAssignment_Policy_DropOverload) XXX_DiscardUnknown() { + xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload.DiscardUnknown(m) +} + +var xxx_messageInfo_ClusterLoadAssignment_Policy_DropOverload proto.InternalMessageInfo + +func (m *ClusterLoadAssignment_Policy_DropOverload) GetCategory() string { + if m != nil { + return m.Category + } + return "" +} + +func (m *ClusterLoadAssignment_Policy_DropOverload) GetDropPercentage() *_type.FractionalPercent { + if m != nil { + return m.DropPercentage + } + return nil +} + +func init() { + proto.RegisterType((*ClusterLoadAssignment)(nil), "envoy.api.v2.ClusterLoadAssignment") + proto.RegisterMapType((map[string]*endpoint.Endpoint)(nil), "envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry") + proto.RegisterType((*ClusterLoadAssignment_Policy)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy") + proto.RegisterType((*ClusterLoadAssignment_Policy_DropOverload)(nil), "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload") +} + +func init() { proto.RegisterFile("envoy/api/v2/endpoint.proto", fileDescriptor_8dd3a9d301e6758b) } + +var fileDescriptor_8dd3a9d301e6758b = []byte{ + // 645 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6e, 0xd3, 0x40, + 0x14, 0xc7, 0x6b, 0xa7, 0x09, 0xe9, 0xf4, 0x53, 0xc3, 0x47, 0x8d, 0x69, 0x21, 0x82, 0x4d, 0x95, + 0x85, 0x2d, 0xa5, 0x42, 0x45, 0x48, 0x2c, 0x6a, 0xda, 0x0a, 0x50, 0x45, 0x23, 0xa3, 0xb2, 0xac, + 0x99, 0xd8, 0x13, 0x6b, 0x84, 0x33, 0x33, 0x1a, 0x8f, 0x0d, 0x16, 0x1b, 0x6e, 0xc0, 0x96, 0x33, + 0x70, 0x04, 0x4e, 0xc0, 0x96, 0x23, 0x70, 0x05, 0x96, 0x45, 0x42, 0xc8, 0xe3, 0xb1, 0x9b, 0xa6, + 0xa9, 0xc4, 0x6e, 0xec, 0xff, 0xfb, 0xff, 0xde, 0x9b, 0xf7, 0x9e, 0x0d, 0xee, 0x61, 0x9a, 0xb3, + 0xc2, 0x45, 0x9c, 0xb8, 0xf9, 0xc0, 0xc5, 0x34, 0xe2, 0x8c, 0x50, 0xe9, 0x70, 0xc1, 0x24, 0x83, + 0x2b, 0x4a, 0x74, 0x10, 0x27, 0x4e, 0x3e, 0xb0, 0xdd, 0xb9, 0xa1, 0xcd, 0x21, 0x08, 0xd9, 0x84, + 0x33, 0x8a, 0xa9, 0x4c, 0x2b, 0xbb, 0x6d, 0x55, 0x06, 0x59, 0x70, 0xec, 0x72, 0x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00, 0x8f, 0xc0, 0xba, 0x1a, 0x85, + 0xfe, 0x2e, 0x51, 0x8c, 0x2d, 0x53, 0xdd, 0x62, 0x5b, 0xcf, 0xa2, 0xfc, 0x6a, 0x9d, 0x23, 0x81, + 0xc2, 0xf2, 0x02, 0x28, 0x19, 0x56, 0x71, 0xbe, 0x1a, 0xe0, 0xb0, 0x31, 0xbd, 0x5a, 0xec, 0x1a, + 0x1b, 0xa6, 0x3d, 0x02, 0x37, 0xe7, 0xac, 0x13, 0xdc, 0x00, 0xad, 0xf7, 0x58, 0x17, 0xe1, 0x97, + 0x47, 0xf8, 0x18, 0xb4, 0xf3, 0xb2, 0xd7, 0x3a, 0xd9, 0x83, 0x6b, 0x16, 0xbf, 0xe6, 0xf8, 0x55, + 0xf4, 0x53, 0xf3, 0x89, 0xe1, 0x9d, 0xfe, 0xfe, 0xfa, 0xf7, 0x4b, 0xdb, 0x86, 0xd5, 0x5f, 0xc5, + 0x09, 0x19, 0x1d, 0x93, 0xf8, 0xc2, 0x92, 0xef, 0x7e, 0xff, 0xfc, 0xe3, 0x67, 0xc7, 0xdc, 0x30, + 0x80, 0x4d, 0x58, 0xc5, 0xe5, 0x82, 0x7d, 0x2c, 0x2e, 0xa5, 0xf0, 0x56, 0x6b, 0xf4, 0xb0, 0x1c, + 0xd2, 0xd0, 0x18, 0x75, 0xd4, 0xb4, 0x76, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xef, 0xcb, 0xbf, + 0xb6, 0x09, 0x05, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go new file mode 100644 index 0000000000..279db0dd82 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go @@ -0,0 +1,355 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/endpoint.proto + +package envoy_api_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _endpoint_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on ClusterLoadAssignment with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ClusterLoadAssignment) Validate() error { + if m == nil { + return nil + } + + if len(m.GetClusterName()) < 1 { + return ClusterLoadAssignmentValidationError{ + field: "ClusterName", + reason: "value length must be at least 1 bytes", + } + } + + for idx, item := range m.GetEndpoints() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for key, val := range m.GetNamedEndpoints() { + _ = val + + // no validation rules for NamedEndpoints[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignmentValidationError{ + field: fmt.Sprintf("NamedEndpoints[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignmentValidationError{ + field: "Policy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ClusterLoadAssignmentValidationError is the validation error returned by +// ClusterLoadAssignment.Validate if the designated constraints aren't met. +type ClusterLoadAssignmentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterLoadAssignmentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterLoadAssignmentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterLoadAssignmentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterLoadAssignmentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterLoadAssignmentValidationError) ErrorName() string { + return "ClusterLoadAssignmentValidationError" +} + +// Error satisfies the builtin error interface +func (e ClusterLoadAssignmentValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sClusterLoadAssignment.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterLoadAssignmentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterLoadAssignmentValidationError{} + +// Validate checks the field values on ClusterLoadAssignment_Policy with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ClusterLoadAssignment_Policy) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetDropOverloads() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignment_PolicyValidationError{ + field: fmt.Sprintf("DropOverloads[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if wrapper := m.GetOverprovisioningFactor(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + return ClusterLoadAssignment_PolicyValidationError{ + field: "OverprovisioningFactor", + reason: "value must be greater than 0", + } + } + + } + + if d := m.GetEndpointStaleAfter(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return ClusterLoadAssignment_PolicyValidationError{ + field: "EndpointStaleAfter", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return ClusterLoadAssignment_PolicyValidationError{ + field: "EndpointStaleAfter", + reason: "value must be greater than 0s", + } + } + + } + + // no validation rules for DisableOverprovisioning + + return nil +} + +// ClusterLoadAssignment_PolicyValidationError is the validation error returned +// by ClusterLoadAssignment_Policy.Validate if the designated constraints +// aren't met. +type ClusterLoadAssignment_PolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterLoadAssignment_PolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterLoadAssignment_PolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterLoadAssignment_PolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterLoadAssignment_PolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterLoadAssignment_PolicyValidationError) ErrorName() string { + return "ClusterLoadAssignment_PolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e ClusterLoadAssignment_PolicyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sClusterLoadAssignment_Policy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterLoadAssignment_PolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterLoadAssignment_PolicyValidationError{} + +// Validate checks the field values on +// ClusterLoadAssignment_Policy_DropOverload with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { + if m == nil { + return nil + } + + if len(m.GetCategory()) < 1 { + return ClusterLoadAssignment_Policy_DropOverloadValidationError{ + field: "Category", + reason: "value length must be at least 1 bytes", + } + } + + if v, ok := interface{}(m.GetDropPercentage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterLoadAssignment_Policy_DropOverloadValidationError{ + field: "DropPercentage", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ClusterLoadAssignment_Policy_DropOverloadValidationError is the validation +// error returned by ClusterLoadAssignment_Policy_DropOverload.Validate if the +// designated constraints aren't met. +type ClusterLoadAssignment_Policy_DropOverloadValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) ErrorName() string { + return "ClusterLoadAssignment_Policy_DropOverloadValidationError" +} + +// Error satisfies the builtin error interface +func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sClusterLoadAssignment_Policy_DropOverload.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterLoadAssignment_Policy_DropOverloadValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterLoadAssignment_Policy_DropOverloadValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go index a6b9c222fb..cb74431ea7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go @@ -1,20 +1,13 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/endpoint/endpoint.proto -package endpoint +package envoy_api_v2_endpoint import ( - bytes "bytes" fmt "fmt" - io "io" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,1707 +19,22 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// Upstream host identifier. -type Endpoint struct { - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig *Endpoint_HealthCheckConfig `protobuf:"bytes,2,opt,name=health_check_config,json=healthCheckConfig,proto3" json:"health_check_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (m *Endpoint) String() string { return proto.CompactTextString(m) } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_a9d2a3e4ee06324f, []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) { - if deterministic { - return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(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 *Endpoint) GetAddress() *core.Address { - if m != nil { - return m.Address - } - return nil -} - -func (m *Endpoint) GetHealthCheckConfig() *Endpoint_HealthCheckConfig { - if m != nil { - return m.HealthCheckConfig - } - return nil -} - -// The optional health check configuration. -type Endpoint_HealthCheckConfig struct { - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - PortValue uint32 `protobuf:"varint,1,opt,name=port_value,json=portValue,proto3" json:"port_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Endpoint_HealthCheckConfig) Reset() { *m = Endpoint_HealthCheckConfig{} } -func (m *Endpoint_HealthCheckConfig) String() string { return proto.CompactTextString(m) } -func (*Endpoint_HealthCheckConfig) ProtoMessage() {} -func (*Endpoint_HealthCheckConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_a9d2a3e4ee06324f, []int{0, 0} -} -func (m *Endpoint_HealthCheckConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint_HealthCheckConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Endpoint_HealthCheckConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Endpoint_HealthCheckConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint_HealthCheckConfig.Merge(m, src) -} -func (m *Endpoint_HealthCheckConfig) XXX_Size() int { - return m.Size() -} -func (m *Endpoint_HealthCheckConfig) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint_HealthCheckConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint_HealthCheckConfig proto.InternalMessageInfo - -func (m *Endpoint_HealthCheckConfig) GetPortValue() uint32 { - if m != nil { - return m.PortValue - } - return 0 -} - -// An Endpoint that Envoy can route traffic to. -type LbEndpoint struct { - // Upstream host identifier or a named reference. - // - // Types that are valid to be assigned to HostIdentifier: - // *LbEndpoint_Endpoint - // *LbEndpoint_EndpointName - HostIdentifier isLbEndpoint_HostIdentifier `protobuf_oneof:"host_identifier"` - // Optional health status when known and supplied by EDS server. - HealthStatus core.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=envoy.api.v2.core.HealthStatus" json:"health_status,omitempty"` - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - Metadata *core.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // The optional load balancing weight of the upstream host, in the range 1 - - // 128. Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. - // - // .. attention:: - // - // The limit of 128 is somewhat arbitrary, but is applied due to performance - // concerns with the current implementation and can be removed when - // `this issue `_ is fixed. - LoadBalancingWeight *types.UInt32Value `protobuf:"bytes,4,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LbEndpoint) Reset() { *m = LbEndpoint{} } -func (m *LbEndpoint) String() string { return proto.CompactTextString(m) } -func (*LbEndpoint) ProtoMessage() {} -func (*LbEndpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_a9d2a3e4ee06324f, []int{1} -} -func (m *LbEndpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LbEndpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LbEndpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LbEndpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_LbEndpoint.Merge(m, src) -} -func (m *LbEndpoint) XXX_Size() int { - return m.Size() -} -func (m *LbEndpoint) XXX_DiscardUnknown() { - xxx_messageInfo_LbEndpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_LbEndpoint proto.InternalMessageInfo - -type isLbEndpoint_HostIdentifier interface { - isLbEndpoint_HostIdentifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type LbEndpoint_Endpoint struct { - Endpoint *Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3,oneof"` -} -type LbEndpoint_EndpointName struct { - EndpointName string `protobuf:"bytes,5,opt,name=endpoint_name,json=endpointName,proto3,oneof"` -} - -func (*LbEndpoint_Endpoint) isLbEndpoint_HostIdentifier() {} -func (*LbEndpoint_EndpointName) isLbEndpoint_HostIdentifier() {} - -func (m *LbEndpoint) GetHostIdentifier() isLbEndpoint_HostIdentifier { - if m != nil { - return m.HostIdentifier - } - return nil -} - -func (m *LbEndpoint) GetEndpoint() *Endpoint { - if x, ok := m.GetHostIdentifier().(*LbEndpoint_Endpoint); ok { - return x.Endpoint - } - return nil -} - -func (m *LbEndpoint) GetEndpointName() string { - if x, ok := m.GetHostIdentifier().(*LbEndpoint_EndpointName); ok { - return x.EndpointName - } - return "" -} - -func (m *LbEndpoint) GetHealthStatus() core.HealthStatus { - if m != nil { - return m.HealthStatus - } - return core.HealthStatus_UNKNOWN -} - -func (m *LbEndpoint) GetMetadata() *core.Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *LbEndpoint) GetLoadBalancingWeight() *types.UInt32Value { - if m != nil { - return m.LoadBalancingWeight - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*LbEndpoint) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _LbEndpoint_OneofMarshaler, _LbEndpoint_OneofUnmarshaler, _LbEndpoint_OneofSizer, []interface{}{ - (*LbEndpoint_Endpoint)(nil), - (*LbEndpoint_EndpointName)(nil), - } -} - -func _LbEndpoint_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*LbEndpoint) - // host_identifier - switch x := m.HostIdentifier.(type) { - case *LbEndpoint_Endpoint: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Endpoint); err != nil { - return err - } - case *LbEndpoint_EndpointName: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.EndpointName) - case nil: - default: - return fmt.Errorf("LbEndpoint.HostIdentifier has unexpected type %T", x) - } - return nil -} - -func _LbEndpoint_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*LbEndpoint) - switch tag { - case 1: // host_identifier.endpoint - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Endpoint) - err := b.DecodeMessage(msg) - m.HostIdentifier = &LbEndpoint_Endpoint{msg} - return true, err - case 5: // host_identifier.endpoint_name - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HostIdentifier = &LbEndpoint_EndpointName{x} - return true, err - default: - return false, nil - } -} - -func _LbEndpoint_OneofSizer(msg proto.Message) (n int) { - m := msg.(*LbEndpoint) - // host_identifier - switch x := m.HostIdentifier.(type) { - case *LbEndpoint_Endpoint: - s := proto.Size(x.Endpoint) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *LbEndpoint_EndpointName: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.EndpointName))) - n += len(x.EndpointName) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -type LocalityLbEndpoints struct { - // Identifies location of where the upstream hosts run. - Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - // The group of endpoints belonging to the locality specified. - LbEndpoints []LbEndpoint `protobuf:"bytes,2,rep,name=lb_endpoints,json=lbEndpoints,proto3" json:"lb_endpoints"` - // Optional: Per priority/region/zone/sub_zone weight - range 1-128. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - // - // .. attention:: - // - // The limit of 128 is somewhat arbitrary, but is applied due to performance - // concerns with the current implementation and can be removed when - // `this issue `_ is fixed. - LoadBalancingWeight *types.UInt32Value `protobuf:"bytes,3,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - Priority uint32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalityLbEndpoints) Reset() { *m = LocalityLbEndpoints{} } -func (m *LocalityLbEndpoints) String() string { return proto.CompactTextString(m) } -func (*LocalityLbEndpoints) ProtoMessage() {} -func (*LocalityLbEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_a9d2a3e4ee06324f, []int{2} -} -func (m *LocalityLbEndpoints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalityLbEndpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalityLbEndpoints.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalityLbEndpoints) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalityLbEndpoints.Merge(m, src) -} -func (m *LocalityLbEndpoints) XXX_Size() int { - return m.Size() -} -func (m *LocalityLbEndpoints) XXX_DiscardUnknown() { - xxx_messageInfo_LocalityLbEndpoints.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalityLbEndpoints proto.InternalMessageInfo - -func (m *LocalityLbEndpoints) GetLocality() *core.Locality { - if m != nil { - return m.Locality - } - return nil -} - -func (m *LocalityLbEndpoints) GetLbEndpoints() []LbEndpoint { - if m != nil { - return m.LbEndpoints - } - return nil -} - -func (m *LocalityLbEndpoints) GetLoadBalancingWeight() *types.UInt32Value { - if m != nil { - return m.LoadBalancingWeight - } - return nil -} - -func (m *LocalityLbEndpoints) GetPriority() uint32 { - if m != nil { - return m.Priority - } - return 0 -} - -func init() { - proto.RegisterType((*Endpoint)(nil), "envoy.api.v2.endpoint.Endpoint") - proto.RegisterType((*Endpoint_HealthCheckConfig)(nil), "envoy.api.v2.endpoint.Endpoint.HealthCheckConfig") - proto.RegisterType((*LbEndpoint)(nil), "envoy.api.v2.endpoint.LbEndpoint") - proto.RegisterType((*LocalityLbEndpoints)(nil), "envoy.api.v2.endpoint.LocalityLbEndpoints") -} +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("envoy/api/v2/endpoint/endpoint.proto", fileDescriptor_a9d2a3e4ee06324f) } var fileDescriptor_a9d2a3e4ee06324f = []byte{ - // 591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xed, 0xd6, 0x4d, 0x9b, 0x6e, 0x12, 0x50, 0x1c, 0x2a, 0xac, 0x50, 0x25, 0x25, 0x14, 0x14, - 0xe5, 0xb0, 0x16, 0x29, 0x12, 0x27, 0x84, 0x70, 0x41, 0x0a, 0xa8, 0xa0, 0xc8, 0x08, 0x90, 0x38, - 0x60, 0xad, 0xed, 0x8d, 0xbd, 0xc2, 0xf1, 0x5a, 0xf6, 0x26, 0x25, 0xb7, 0x7e, 0x0b, 0x27, 0xbe, - 0x81, 0x13, 0xc7, 0x1e, 0xf9, 0x02, 0x84, 0xa2, 0x5e, 0xf8, 0x8a, 0x22, 0xaf, 0xbd, 0x6e, 0xda, - 0xa4, 0xe2, 0xc2, 0x6d, 0xbc, 0xf3, 0xde, 0xcc, 0x7b, 0xcf, 0x03, 0xf7, 0x49, 0x38, 0x65, 0x33, - 0x1d, 0x47, 0x54, 0x9f, 0xf6, 0x75, 0x12, 0xba, 0x11, 0xa3, 0x21, 0x2f, 0x0a, 0x14, 0xc5, 0x8c, - 0x33, 0x75, 0x47, 0xa0, 0x10, 0x8e, 0x28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x4f, 0x60, - 0x59, 0x2a, 0xc9, 0x9d, 0xb6, 0xff, 0xa1, 0x73, 0xb0, 0x66, 0x16, 0x14, 0xf5, 0x3e, 0xac, 0xc9, - 0xda, 0x0a, 0xf1, 0x98, 0x68, 0xa5, 0x3d, 0xd0, 0xdd, 0x1e, 0xac, 0x99, 0x55, 0xf9, 0xfc, 0x06, - 0x8f, 0x89, 0xfa, 0x1c, 0xd6, 0xf2, 0x60, 0x12, 0x8e, 0xf9, 0x24, 0x11, 0x91, 0xdc, 0xb8, 0xba, - 0x4a, 0x84, 0x9a, 0xb9, 0x7b, 0x2b, 0x60, 0x66, 0xd5, 0x5f, 0xf8, 0x52, 0x1f, 0xc3, 0xf2, 0x98, - 0x70, 0xec, 0x62, 0x8e, 0x35, 0x45, 0x68, 0xbd, 0xb3, 0x62, 0xc0, 0xeb, 0x1c, 0x62, 0x16, 0x60, - 0xf5, 0x13, 0xdc, 0x09, 0x18, 0x76, 0x2d, 0x1b, 0x07, 0x38, 0x74, 0x68, 0xe8, 0x59, 0xc7, 0x84, - 0x7a, 0x3e, 0xd7, 0x36, 0xc4, 0x94, 0x5d, 0x94, 0x5d, 0x12, 0x92, 0x97, 0x84, 0xde, 0xbd, 0x0c, - 0xf9, 0x41, 0x5f, 0x04, 0x66, 0x54, 0xd3, 0x20, 0xb7, 0x7a, 0x25, 0xed, 0x04, 0x74, 0x81, 0xd9, - 0x48, 0x07, 0x19, 0x72, 0xce, 0x07, 0x31, 0xc6, 0xa8, 0xc3, 0x9b, 0x3e, 0x4b, 0xb8, 0x45, 0x5d, - 0x12, 0x72, 0x3a, 0xa2, 0x24, 0xee, 0x7c, 0x5d, 0x87, 0x8d, 0x23, 0xe6, 0xe0, 0x80, 0xf2, 0xd9, - 0x45, 0xdc, 0xc2, 0x43, 0x90, 0x3f, 0xe7, 0x79, 0xaf, 0xf2, 0x20, 0x99, 0x66, 0x01, 0x56, 0x5f, - 0xc1, 0x6a, 0x60, 0x5b, 0x32, 0xd5, 0x34, 0x41, 0xa5, 0x5b, 0xe9, 0xdf, 0xbd, 0xe6, 0x67, 0x5d, - 0xac, 0x34, 0x36, 0x4e, 0x7f, 0xb5, 0xd7, 0xcc, 0x4a, 0xb0, 0x20, 0xe2, 0xda, 0x3c, 0x94, 0xff, - 0x92, 0x87, 0xfa, 0x00, 0x96, 0xa3, 0x98, 0xb2, 0x38, 0x35, 0x59, 0x12, 0xd7, 0x08, 0x53, 0x52, - 0xa9, 0xa7, 0x68, 0x27, 0xc0, 0x2c, 0x7a, 0xc6, 0xf0, 0xdb, 0xbc, 0x05, 0x4e, 0xe7, 0x2d, 0xf0, - 0x73, 0xde, 0x02, 0xbf, 0xe7, 0x2d, 0x00, 0xef, 0x51, 0x96, 0x39, 0x8a, 0x62, 0xf6, 0x65, 0xb6, - 0xda, 0x9c, 0x51, 0x93, 0x4e, 0x86, 0xa9, 0xbe, 0x21, 0xf8, 0x58, 0xdc, 0xa3, 0xbd, 0x29, 0x24, - 0x1f, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xb0, 0xf4, 0xcc, 0xbe, 0x04, 0x00, 0x00, + // 155 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0xd2, 0x4f, 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, + 0x2b, 0x81, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0xc1, 0xaa, 0xf4, 0x12, 0x0b, + 0x32, 0xf5, 0xca, 0x8c, 0xf4, 0x60, 0x92, 0x52, 0xb2, 0xa5, 0x29, 0x05, 0x89, 0xfa, 0x89, 0x79, + 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0xfa, 0xc5, 0x25, 0x89, 0x25, 0xa5, 0xc5, + 0x10, 0x5d, 0x52, 0xfa, 0xf8, 0xcd, 0x8e, 0x4f, 0xce, 0xcf, 0x2d, 0xc8, 0xcf, 0x4b, 0xcd, 0x2b, + 0x81, 0x6a, 0x70, 0xb2, 0xdb, 0xd5, 0x70, 0xe2, 0x22, 0x1b, 0x93, 0x00, 0x23, 0x97, 0x72, 0x66, + 0xbe, 0x1e, 0x58, 0x77, 0x41, 0x51, 0x7e, 0x45, 0xa5, 0x1e, 0x56, 0xeb, 0x9d, 0x78, 0x5d, 0xa1, + 0xac, 0x00, 0x90, 0xee, 0x00, 0xc6, 0x00, 0xc6, 0x24, 0x36, 0xb0, 0x41, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x0e, 0x68, 0x62, 0x1a, 0xd7, 0x00, 0x00, 0x00, } - -func (this *Endpoint) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Endpoint) - if !ok { - that2, ok := that.(Endpoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Address.Equal(that1.Address) { - return false - } - if !this.HealthCheckConfig.Equal(that1.HealthCheckConfig) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Endpoint_HealthCheckConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Endpoint_HealthCheckConfig) - if !ok { - that2, ok := that.(Endpoint_HealthCheckConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PortValue != that1.PortValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LbEndpoint) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LbEndpoint) - if !ok { - that2, ok := that.(LbEndpoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.HostIdentifier == nil { - if this.HostIdentifier != nil { - return false - } - } else if this.HostIdentifier == nil { - return false - } else if !this.HostIdentifier.Equal(that1.HostIdentifier) { - return false - } - if this.HealthStatus != that1.HealthStatus { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !this.LoadBalancingWeight.Equal(that1.LoadBalancingWeight) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LbEndpoint_Endpoint) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LbEndpoint_Endpoint) - if !ok { - that2, ok := that.(LbEndpoint_Endpoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Endpoint.Equal(that1.Endpoint) { - return false - } - return true -} -func (this *LbEndpoint_EndpointName) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LbEndpoint_EndpointName) - if !ok { - that2, ok := that.(LbEndpoint_EndpointName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.EndpointName != that1.EndpointName { - return false - } - return true -} -func (this *LocalityLbEndpoints) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LocalityLbEndpoints) - if !ok { - that2, ok := that.(LocalityLbEndpoints) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Locality.Equal(that1.Locality) { - return false - } - if len(this.LbEndpoints) != len(that1.LbEndpoints) { - return false - } - for i := range this.LbEndpoints { - if !this.LbEndpoints[i].Equal(&that1.LbEndpoints[i]) { - return false - } - } - if !this.LoadBalancingWeight.Equal(that1.LoadBalancingWeight) { - return false - } - if this.Priority != that1.Priority { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Endpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Endpoint) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Address != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.Address.Size())) - n1, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.HealthCheckConfig != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.HealthCheckConfig.Size())) - n2, err := m.HealthCheckConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Endpoint_HealthCheckConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Endpoint_HealthCheckConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.PortValue != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.PortValue)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *LbEndpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LbEndpoint) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.HostIdentifier != nil { - nn3, err := m.HostIdentifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn3 - } - if m.HealthStatus != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.HealthStatus)) - } - if m.Metadata != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.Metadata.Size())) - n4, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.LoadBalancingWeight != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.LoadBalancingWeight.Size())) - n5, err := m.LoadBalancingWeight.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *LbEndpoint_Endpoint) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Endpoint != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.Endpoint.Size())) - n6, err := m.Endpoint.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - return i, nil -} -func (m *LbEndpoint_EndpointName) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x2a - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(len(m.EndpointName))) - i += copy(dAtA[i:], m.EndpointName) - return i, nil -} -func (m *LocalityLbEndpoints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalityLbEndpoints) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Locality != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.Locality.Size())) - n7, err := m.Locality.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if len(m.LbEndpoints) > 0 { - for _, msg := range m.LbEndpoints { - dAtA[i] = 0x12 - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.LoadBalancingWeight != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.LoadBalancingWeight.Size())) - n8, err := m.LoadBalancingWeight.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Priority != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintEndpoint(dAtA, i, uint64(m.Priority)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintEndpoint(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - if m.HealthCheckConfig != nil { - l = m.HealthCheckConfig.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Endpoint_HealthCheckConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PortValue != 0 { - n += 1 + sovEndpoint(uint64(m.PortValue)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LbEndpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HostIdentifier != nil { - n += m.HostIdentifier.Size() - } - if m.HealthStatus != 0 { - n += 1 + sovEndpoint(uint64(m.HealthStatus)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - if m.LoadBalancingWeight != nil { - l = m.LoadBalancingWeight.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LbEndpoint_Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Endpoint != nil { - l = m.Endpoint.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - return n -} -func (m *LbEndpoint_EndpointName) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EndpointName) - n += 1 + l + sovEndpoint(uint64(l)) - return n -} -func (m *LocalityLbEndpoints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Locality != nil { - l = m.Locality.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - if len(m.LbEndpoints) > 0 { - for _, e := range m.LbEndpoints { - l = e.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - } - if m.LoadBalancingWeight != nil { - l = m.LoadBalancingWeight.Size() - n += 1 + l + sovEndpoint(uint64(l)) - } - if m.Priority != 0 { - n += 1 + sovEndpoint(uint64(m.Priority)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEndpoint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozEndpoint(x uint64) (n int) { - return sovEndpoint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -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 ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &core.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthCheckConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HealthCheckConfig == nil { - m.HealthCheckConfig = &Endpoint_HealthCheckConfig{} - } - if err := m.HealthCheckConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEndpoint(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEndpoint - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEndpoint - } - 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 *Endpoint_HealthCheckConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HealthCheckConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HealthCheckConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PortValue", wireType) - } - m.PortValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PortValue |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEndpoint(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEndpoint - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEndpoint - } - 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 *LbEndpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LbEndpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LbEndpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Endpoint{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HostIdentifier = &LbEndpoint_Endpoint{v} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthStatus", wireType) - } - m.HealthStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HealthStatus |= core.HealthStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &core.Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancingWeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LoadBalancingWeight == nil { - m.LoadBalancingWeight = &types.UInt32Value{} - } - if err := m.LoadBalancingWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndpointName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostIdentifier = &LbEndpoint_EndpointName{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEndpoint(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEndpoint - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEndpoint - } - 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 *LocalityLbEndpoints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalityLbEndpoints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalityLbEndpoints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Locality == nil { - m.Locality = &core.Locality{} - } - if err := m.Locality.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LbEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LbEndpoints = append(m.LbEndpoints, LbEndpoint{}) - if err := m.LbEndpoints[len(m.LbEndpoints)-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 LoadBalancingWeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEndpoint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEndpoint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LoadBalancingWeight == nil { - m.LoadBalancingWeight = &types.UInt32Value{} - } - if err := m.LoadBalancingWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEndpoint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEndpoint(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEndpoint - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthEndpoint - } - 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 skipEndpoint(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEndpoint - } - 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, ErrIntOverflowEndpoint - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEndpoint - } - 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, ErrInvalidLengthEndpoint - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthEndpoint - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEndpoint - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEndpoint(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthEndpoint - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthEndpoint = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEndpoint = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go index f1d8041faa..d7db956bf7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/endpoint/endpoint.proto -package endpoint +package envoy_api_v2_endpoint import ( "bytes" @@ -15,9 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -32,411 +30,8 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} - - _ = core.HealthStatus(0) + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on Endpoint with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Endpoint) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetAddress() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return EndpointValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetHealthCheckConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return EndpointValidationError{ - field: "HealthCheckConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// EndpointValidationError is the validation error returned by -// Endpoint.Validate if the designated constraints aren't met. -type EndpointValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointValidationError) ErrorName() string { return "EndpointValidationError" } - -// Error satisfies the builtin error interface -func (e EndpointValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpoint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointValidationError{} - -// Validate checks the field values on LbEndpoint with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *LbEndpoint) Validate() error { - if m == nil { - return nil - } - - // no validation rules for HealthStatus - - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return LbEndpointValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 128 { - return LbEndpointValidationError{ - field: "LoadBalancingWeight", - reason: "value must be inside range [1, 128]", - } - } - - } - - switch m.HostIdentifier.(type) { - - case *LbEndpoint_Endpoint: - - { - tmp := m.GetEndpoint() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return LbEndpointValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *LbEndpoint_EndpointName: - // no validation rules for EndpointName - - } - - return nil -} - -// LbEndpointValidationError is the validation error returned by -// LbEndpoint.Validate if the designated constraints aren't met. -type LbEndpointValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LbEndpointValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LbEndpointValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LbEndpointValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LbEndpointValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LbEndpointValidationError) ErrorName() string { return "LbEndpointValidationError" } - -// Error satisfies the builtin error interface -func (e LbEndpointValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLbEndpoint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LbEndpointValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LbEndpointValidationError{} - -// Validate checks the field values on LocalityLbEndpoints with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *LocalityLbEndpoints) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetLocality() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return LocalityLbEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - for idx, item := range m.GetLbEndpoints() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return LocalityLbEndpointsValidationError{ - field: fmt.Sprintf("LbEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 128 { - return LocalityLbEndpointsValidationError{ - field: "LoadBalancingWeight", - reason: "value must be inside range [1, 128]", - } - } - - } - - if m.GetPriority() > 128 { - return LocalityLbEndpointsValidationError{ - field: "Priority", - reason: "value must be less than or equal to 128", - } - } - - return nil -} - -// LocalityLbEndpointsValidationError is the validation error returned by -// LocalityLbEndpoints.Validate if the designated constraints aren't met. -type LocalityLbEndpointsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityLbEndpointsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityLbEndpointsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityLbEndpointsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityLbEndpointsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityLbEndpointsValidationError) ErrorName() string { - return "LocalityLbEndpointsValidationError" -} - -// Error satisfies the builtin error interface -func (e LocalityLbEndpointsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocalityLbEndpoints.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityLbEndpointsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityLbEndpointsValidationError{} - -// Validate checks the field values on Endpoint_HealthCheckConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Endpoint_HealthCheckConfig) Validate() error { - if m == nil { - return nil - } - - if m.GetPortValue() > 65535 { - return Endpoint_HealthCheckConfigValidationError{ - field: "PortValue", - reason: "value must be less than or equal to 65535", - } - } - - return nil -} - -// Endpoint_HealthCheckConfigValidationError is the validation error returned -// by Endpoint_HealthCheckConfig.Validate if the designated constraints aren't met. -type Endpoint_HealthCheckConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Endpoint_HealthCheckConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Endpoint_HealthCheckConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Endpoint_HealthCheckConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Endpoint_HealthCheckConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Endpoint_HealthCheckConfigValidationError) ErrorName() string { - return "Endpoint_HealthCheckConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Endpoint_HealthCheckConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpoint_HealthCheckConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Endpoint_HealthCheckConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Endpoint_HealthCheckConfigValidationError{} +// define the regex for a UUID once up-front +var _endpoint_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go new file mode 100644 index 0000000000..2ad7fb0d73 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go @@ -0,0 +1,341 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/endpoint/endpoint_components.proto + +package envoy_api_v2_endpoint + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type Endpoint struct { + Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + HealthCheckConfig *Endpoint_HealthCheckConfig `protobuf:"bytes,2,opt,name=health_check_config,json=healthCheckConfig,proto3" json:"health_check_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_2d96d13bf4e60dd1, []int{0} +} + +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Endpoint.Unmarshal(m, b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) +} +func (m *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return xxx_messageInfo_Endpoint.Size(m) +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetAddress() *core.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *Endpoint) GetHealthCheckConfig() *Endpoint_HealthCheckConfig { + if m != nil { + return m.HealthCheckConfig + } + return nil +} + +type Endpoint_HealthCheckConfig struct { + PortValue uint32 `protobuf:"varint,1,opt,name=port_value,json=portValue,proto3" json:"port_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Endpoint_HealthCheckConfig) Reset() { *m = Endpoint_HealthCheckConfig{} } +func (m *Endpoint_HealthCheckConfig) String() string { return proto.CompactTextString(m) } +func (*Endpoint_HealthCheckConfig) ProtoMessage() {} +func (*Endpoint_HealthCheckConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_2d96d13bf4e60dd1, []int{0, 0} +} + +func (m *Endpoint_HealthCheckConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Endpoint_HealthCheckConfig.Unmarshal(m, b) +} +func (m *Endpoint_HealthCheckConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Endpoint_HealthCheckConfig.Marshal(b, m, deterministic) +} +func (m *Endpoint_HealthCheckConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint_HealthCheckConfig.Merge(m, src) +} +func (m *Endpoint_HealthCheckConfig) XXX_Size() int { + return xxx_messageInfo_Endpoint_HealthCheckConfig.Size(m) +} +func (m *Endpoint_HealthCheckConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint_HealthCheckConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint_HealthCheckConfig proto.InternalMessageInfo + +func (m *Endpoint_HealthCheckConfig) GetPortValue() uint32 { + if m != nil { + return m.PortValue + } + return 0 +} + +type LbEndpoint struct { + // Types that are valid to be assigned to HostIdentifier: + // *LbEndpoint_Endpoint + // *LbEndpoint_EndpointName + HostIdentifier isLbEndpoint_HostIdentifier `protobuf_oneof:"host_identifier"` + HealthStatus core.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=envoy.api.v2.core.HealthStatus" json:"health_status,omitempty"` + Metadata *core.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + LoadBalancingWeight *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LbEndpoint) Reset() { *m = LbEndpoint{} } +func (m *LbEndpoint) String() string { return proto.CompactTextString(m) } +func (*LbEndpoint) ProtoMessage() {} +func (*LbEndpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_2d96d13bf4e60dd1, []int{1} +} + +func (m *LbEndpoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LbEndpoint.Unmarshal(m, b) +} +func (m *LbEndpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LbEndpoint.Marshal(b, m, deterministic) +} +func (m *LbEndpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_LbEndpoint.Merge(m, src) +} +func (m *LbEndpoint) XXX_Size() int { + return xxx_messageInfo_LbEndpoint.Size(m) +} +func (m *LbEndpoint) XXX_DiscardUnknown() { + xxx_messageInfo_LbEndpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_LbEndpoint proto.InternalMessageInfo + +type isLbEndpoint_HostIdentifier interface { + isLbEndpoint_HostIdentifier() +} + +type LbEndpoint_Endpoint struct { + Endpoint *Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3,oneof"` +} + +type LbEndpoint_EndpointName struct { + EndpointName string `protobuf:"bytes,5,opt,name=endpoint_name,json=endpointName,proto3,oneof"` +} + +func (*LbEndpoint_Endpoint) isLbEndpoint_HostIdentifier() {} + +func (*LbEndpoint_EndpointName) isLbEndpoint_HostIdentifier() {} + +func (m *LbEndpoint) GetHostIdentifier() isLbEndpoint_HostIdentifier { + if m != nil { + return m.HostIdentifier + } + return nil +} + +func (m *LbEndpoint) GetEndpoint() *Endpoint { + if x, ok := m.GetHostIdentifier().(*LbEndpoint_Endpoint); ok { + return x.Endpoint + } + return nil +} + +func (m *LbEndpoint) GetEndpointName() string { + if x, ok := m.GetHostIdentifier().(*LbEndpoint_EndpointName); ok { + return x.EndpointName + } + return "" +} + +func (m *LbEndpoint) GetHealthStatus() core.HealthStatus { + if m != nil { + return m.HealthStatus + } + return core.HealthStatus_UNKNOWN +} + +func (m *LbEndpoint) GetMetadata() *core.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *LbEndpoint) GetLoadBalancingWeight() *wrappers.UInt32Value { + if m != nil { + return m.LoadBalancingWeight + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*LbEndpoint) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*LbEndpoint_Endpoint)(nil), + (*LbEndpoint_EndpointName)(nil), + } +} + +type LocalityLbEndpoints struct { + Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` + LbEndpoints []*LbEndpoint `protobuf:"bytes,2,rep,name=lb_endpoints,json=lbEndpoints,proto3" json:"lb_endpoints,omitempty"` + LoadBalancingWeight *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` + Priority uint32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"` + Proximity *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=proximity,proto3" json:"proximity,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LocalityLbEndpoints) Reset() { *m = LocalityLbEndpoints{} } +func (m *LocalityLbEndpoints) String() string { return proto.CompactTextString(m) } +func (*LocalityLbEndpoints) ProtoMessage() {} +func (*LocalityLbEndpoints) Descriptor() ([]byte, []int) { + return fileDescriptor_2d96d13bf4e60dd1, []int{2} +} + +func (m *LocalityLbEndpoints) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LocalityLbEndpoints.Unmarshal(m, b) +} +func (m *LocalityLbEndpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LocalityLbEndpoints.Marshal(b, m, deterministic) +} +func (m *LocalityLbEndpoints) XXX_Merge(src proto.Message) { + xxx_messageInfo_LocalityLbEndpoints.Merge(m, src) +} +func (m *LocalityLbEndpoints) XXX_Size() int { + return xxx_messageInfo_LocalityLbEndpoints.Size(m) +} +func (m *LocalityLbEndpoints) XXX_DiscardUnknown() { + xxx_messageInfo_LocalityLbEndpoints.DiscardUnknown(m) +} + +var xxx_messageInfo_LocalityLbEndpoints proto.InternalMessageInfo + +func (m *LocalityLbEndpoints) GetLocality() *core.Locality { + if m != nil { + return m.Locality + } + return nil +} + +func (m *LocalityLbEndpoints) GetLbEndpoints() []*LbEndpoint { + if m != nil { + return m.LbEndpoints + } + return nil +} + +func (m *LocalityLbEndpoints) GetLoadBalancingWeight() *wrappers.UInt32Value { + if m != nil { + return m.LoadBalancingWeight + } + return nil +} + +func (m *LocalityLbEndpoints) GetPriority() uint32 { + if m != nil { + return m.Priority + } + return 0 +} + +func (m *LocalityLbEndpoints) GetProximity() *wrappers.UInt32Value { + if m != nil { + return m.Proximity + } + return nil +} + +func init() { + proto.RegisterType((*Endpoint)(nil), "envoy.api.v2.endpoint.Endpoint") + proto.RegisterType((*Endpoint_HealthCheckConfig)(nil), "envoy.api.v2.endpoint.Endpoint.HealthCheckConfig") + proto.RegisterType((*LbEndpoint)(nil), "envoy.api.v2.endpoint.LbEndpoint") + proto.RegisterType((*LocalityLbEndpoints)(nil), "envoy.api.v2.endpoint.LocalityLbEndpoints") +} + +func init() { + proto.RegisterFile("envoy/api/v2/endpoint/endpoint_components.proto", fileDescriptor_2d96d13bf4e60dd1) +} + +var fileDescriptor_2d96d13bf4e60dd1 = []byte{ + // 628 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xc1, 0x4e, 0x13, 0x41, + 0x18, 0x66, 0x5b, 0x5a, 0xda, 0x01, 0x54, 0x86, 0x10, 0x36, 0x15, 0x01, 0x11, 0x93, 0x86, 0xc3, + 0x6c, 0x2c, 0x26, 0x26, 0x26, 0x1c, 0x5c, 0x30, 0xc1, 0x04, 0x0d, 0x19, 0xa3, 0xc6, 0xd3, 0xe6, + 0xef, 0xee, 0xd0, 0x9d, 0xb8, 0x9d, 0xd9, 0x6c, 0xa7, 0x8b, 0xdc, 0x78, 0x03, 0xaf, 0x3e, 0x8b, + 0x4f, 0xe0, 0x95, 0x27, 0x30, 0xf1, 0x11, 0x3c, 0x72, 0x10, 0xb3, 0xb3, 0x3b, 0xdb, 0x42, 0x4b, + 0x38, 0x78, 0xdb, 0x99, 0xff, 0xfb, 0xfe, 0xff, 0xfb, 0xbe, 0xf9, 0x5b, 0xe4, 0x30, 0x91, 0xca, + 0x33, 0x07, 0x62, 0xee, 0xa4, 0x1d, 0x87, 0x89, 0x20, 0x96, 0x5c, 0xa8, 0xf2, 0xc3, 0xf3, 0x65, + 0x3f, 0x96, 0x82, 0x09, 0x35, 0x20, 0x71, 0x22, 0x95, 0xc4, 0x2b, 0x9a, 0x40, 0x20, 0xe6, 0x24, + 0xed, 0x10, 0x83, 0x6b, 0x6d, 0x5c, 0xeb, 0xe3, 0xcb, 0x84, 0x39, 0x10, 0x04, 0x09, 0x1b, 0x14, + 0xbc, 0xd6, 0xda, 0x24, 0xa0, 0x0b, 0x03, 0x56, 0x54, 0xb7, 0x27, 0xab, 0x21, 0x83, 0x48, 0x85, + 0x9e, 0x1f, 0x32, 0xff, 0x4b, 0x81, 0x5a, 0xef, 0x49, 0xd9, 0x8b, 0x98, 0xa3, 0x4f, 0xdd, 0xe1, + 0x89, 0x73, 0x9a, 0x40, 0x1c, 0xb3, 0xc4, 0xcc, 0x58, 0x1f, 0x06, 0x31, 0x38, 0x20, 0x84, 0x54, + 0xa0, 0xb8, 0x14, 0x03, 0xa7, 0xcf, 0x7b, 0x09, 0x28, 0x33, 0xe5, 0xd1, 0x44, 0x7d, 0xa0, 0x40, + 0x0d, 0x0d, 0x7d, 0x35, 0x85, 0x88, 0x07, 0xa0, 0x98, 0x63, 0x3e, 0xf2, 0xc2, 0xd6, 0x6f, 0x0b, + 0x35, 0x5e, 0x17, 0x4e, 0xf1, 0x73, 0x34, 0x57, 0x38, 0xb3, 0xad, 0x4d, 0xab, 0x3d, 0xdf, 0x69, + 0x91, 0x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 0xe0, + 0xd8, 0xea, 0xd6, 0xb5, 0x94, 0xdd, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x16, 0x0f, 0x37, + 0x32, 0x05, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go new file mode 100644 index 0000000000..36390f20a5 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go @@ -0,0 +1,425 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/endpoint/endpoint_components.proto + +package envoy_api_v2_endpoint + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" + + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" +) + +// 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) + _ = ptypes.DynamicAny{} + + _ = core.HealthStatus(0) +) + +// define the regex for a UUID once up-front +var _endpoint_components_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on Endpoint with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Endpoint) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetHealthCheckConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointValidationError{ + field: "HealthCheckConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// EndpointValidationError is the validation error returned by +// Endpoint.Validate if the designated constraints aren't met. +type EndpointValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EndpointValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EndpointValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EndpointValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EndpointValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EndpointValidationError) ErrorName() string { return "EndpointValidationError" } + +// Error satisfies the builtin error interface +func (e EndpointValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sEndpoint.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EndpointValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EndpointValidationError{} + +// Validate checks the field values on LbEndpoint with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *LbEndpoint) Validate() error { + if m == nil { + return nil + } + + // no validation rules for HealthStatus + + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LbEndpointValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return LbEndpointValidationError{ + field: "LoadBalancingWeight", + reason: "value must be greater than or equal to 1", + } + } + + } + + switch m.HostIdentifier.(type) { + + case *LbEndpoint_Endpoint: + + if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LbEndpointValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *LbEndpoint_EndpointName: + // no validation rules for EndpointName + + } + + return nil +} + +// LbEndpointValidationError is the validation error returned by +// LbEndpoint.Validate if the designated constraints aren't met. +type LbEndpointValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LbEndpointValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LbEndpointValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LbEndpointValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LbEndpointValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LbEndpointValidationError) ErrorName() string { return "LbEndpointValidationError" } + +// Error satisfies the builtin error interface +func (e LbEndpointValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLbEndpoint.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LbEndpointValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LbEndpointValidationError{} + +// Validate checks the field values on LocalityLbEndpoints with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *LocalityLbEndpoints) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityLbEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetLbEndpoints() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityLbEndpointsValidationError{ + field: fmt.Sprintf("LbEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return LocalityLbEndpointsValidationError{ + field: "LoadBalancingWeight", + reason: "value must be greater than or equal to 1", + } + } + + } + + if m.GetPriority() > 128 { + return LocalityLbEndpointsValidationError{ + field: "Priority", + reason: "value must be less than or equal to 128", + } + } + + if v, ok := interface{}(m.GetProximity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityLbEndpointsValidationError{ + field: "Proximity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// LocalityLbEndpointsValidationError is the validation error returned by +// LocalityLbEndpoints.Validate if the designated constraints aren't met. +type LocalityLbEndpointsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LocalityLbEndpointsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LocalityLbEndpointsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LocalityLbEndpointsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LocalityLbEndpointsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LocalityLbEndpointsValidationError) ErrorName() string { + return "LocalityLbEndpointsValidationError" +} + +// Error satisfies the builtin error interface +func (e LocalityLbEndpointsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLocalityLbEndpoints.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LocalityLbEndpointsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LocalityLbEndpointsValidationError{} + +// Validate checks the field values on Endpoint_HealthCheckConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Endpoint_HealthCheckConfig) Validate() error { + if m == nil { + return nil + } + + if m.GetPortValue() > 65535 { + return Endpoint_HealthCheckConfigValidationError{ + field: "PortValue", + reason: "value must be less than or equal to 65535", + } + } + + return nil +} + +// Endpoint_HealthCheckConfigValidationError is the validation error returned +// by Endpoint_HealthCheckConfig.Validate if the designated constraints aren't met. +type Endpoint_HealthCheckConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Endpoint_HealthCheckConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Endpoint_HealthCheckConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Endpoint_HealthCheckConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Endpoint_HealthCheckConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Endpoint_HealthCheckConfigValidationError) ErrorName() string { + return "Endpoint_HealthCheckConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Endpoint_HealthCheckConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sEndpoint_HealthCheckConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Endpoint_HealthCheckConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Endpoint_HealthCheckConfigValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go index b53def0834..508ad483b1 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go @@ -1,20 +1,17 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/endpoint/load_report.proto -package endpoint +package envoy_api_v2_endpoint import ( - encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,46 +23,20 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// These are stats Envoy reports to GLB every so often. Report frequency is -// defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. type UpstreamLocalityStats struct { - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - // The total number of requests sent by this Envoy since the last report. This - // information is aggregated over all the upstream Endpoints. total_requests - // can be inferred from: - // - // .. code-block:: none - // - // total_requests = total_successful_requests + total_requests_in_progress + - // total_error_requests - // - // The total number of requests successfully completed by the endpoints in the - // locality. - TotalSuccessfulRequests uint64 `protobuf:"varint,2,opt,name=total_successful_requests,json=totalSuccessfulRequests,proto3" json:"total_successful_requests,omitempty"` - // The total number of unfinished requests - TotalRequestsInProgress uint64 `protobuf:"varint,3,opt,name=total_requests_in_progress,json=totalRequestsInProgress,proto3" json:"total_requests_in_progress,omitempty"` - // The total number of requests that failed due to errors at the endpoint, - // aggregated over all endpoints in the locality. - TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"` - // Stats for multi-dimensional load balancing. - LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"` - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - UpstreamEndpointStats []*UpstreamEndpointStats `protobuf:"bytes,7,rep,name=upstream_endpoint_stats,json=upstreamEndpointStats,proto3" json:"upstream_endpoint_stats,omitempty"` - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - Priority uint32 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` + TotalSuccessfulRequests uint64 `protobuf:"varint,2,opt,name=total_successful_requests,json=totalSuccessfulRequests,proto3" json:"total_successful_requests,omitempty"` + TotalRequestsInProgress uint64 `protobuf:"varint,3,opt,name=total_requests_in_progress,json=totalRequestsInProgress,proto3" json:"total_requests_in_progress,omitempty"` + TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"` + TotalIssuedRequests uint64 `protobuf:"varint,8,opt,name=total_issued_requests,json=totalIssuedRequests,proto3" json:"total_issued_requests,omitempty"` + LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"` + UpstreamEndpointStats []*UpstreamEndpointStats `protobuf:"bytes,7,rep,name=upstream_endpoint_stats,json=upstreamEndpointStats,proto3" json:"upstream_endpoint_stats,omitempty"` + Priority uint32 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UpstreamLocalityStats) Reset() { *m = UpstreamLocalityStats{} } @@ -74,26 +45,18 @@ func (*UpstreamLocalityStats) ProtoMessage() {} func (*UpstreamLocalityStats) Descriptor() ([]byte, []int) { return fileDescriptor_5134f8f33d8f8d01, []int{0} } + func (m *UpstreamLocalityStats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_UpstreamLocalityStats.Unmarshal(m, b) } func (m *UpstreamLocalityStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpstreamLocalityStats.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_UpstreamLocalityStats.Marshal(b, m, deterministic) } func (m *UpstreamLocalityStats) XXX_Merge(src proto.Message) { xxx_messageInfo_UpstreamLocalityStats.Merge(m, src) } func (m *UpstreamLocalityStats) XXX_Size() int { - return m.Size() + return xxx_messageInfo_UpstreamLocalityStats.Size(m) } func (m *UpstreamLocalityStats) XXX_DiscardUnknown() { xxx_messageInfo_UpstreamLocalityStats.DiscardUnknown(m) @@ -129,6 +92,13 @@ func (m *UpstreamLocalityStats) GetTotalErrorRequests() uint64 { return 0 } +func (m *UpstreamLocalityStats) GetTotalIssuedRequests() uint64 { + if m != nil { + return m.TotalIssuedRequests + } + return 0 +} + func (m *UpstreamLocalityStats) GetLoadMetricStats() []*EndpointLoadMetricStats { if m != nil { return m.LoadMetricStats @@ -151,44 +121,16 @@ func (m *UpstreamLocalityStats) GetPriority() uint32 { } type UpstreamEndpointStats struct { - // Upstream host address. - Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - Metadata *types.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` - // The total number of requests successfully completed by the endpoint. A - // single HTTP or gRPC request or stream is counted as one request. A TCP - // connection is also treated as one request. There is no explicit - // total_requests field below for an endpoint, but it may be inferred from: - // - // .. code-block:: none - // - // total_requests = total_successful_requests + total_requests_in_progress + - // total_error_requests - // - // The total number of requests successfully completed by the endpoints in the - // locality. These include non-5xx responses for HTTP, where errors - // originate at the client and the endpoint responded successfully. For gRPC, - // the grpc-status values are those not covered by total_error_requests below. - TotalSuccessfulRequests uint64 `protobuf:"varint,2,opt,name=total_successful_requests,json=totalSuccessfulRequests,proto3" json:"total_successful_requests,omitempty"` - // The total number of unfinished requests for this endpoint. - TotalRequestsInProgress uint64 `protobuf:"varint,3,opt,name=total_requests_in_progress,json=totalRequestsInProgress,proto3" json:"total_requests_in_progress,omitempty"` - // The total number of requests that failed due to errors at the endpoint. - // For HTTP these are responses with 5xx status codes and for gRPC the - // grpc-status values: - // - // - DeadlineExceeded - // - Unimplemented - // - Internal - // - Unavailable - // - Unknown - // - DataLoss - TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"` - // Stats for multi-dimensional load balancing. - LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Metadata *_struct.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + TotalSuccessfulRequests uint64 `protobuf:"varint,2,opt,name=total_successful_requests,json=totalSuccessfulRequests,proto3" json:"total_successful_requests,omitempty"` + TotalRequestsInProgress uint64 `protobuf:"varint,3,opt,name=total_requests_in_progress,json=totalRequestsInProgress,proto3" json:"total_requests_in_progress,omitempty"` + TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"` + TotalIssuedRequests uint64 `protobuf:"varint,7,opt,name=total_issued_requests,json=totalIssuedRequests,proto3" json:"total_issued_requests,omitempty"` + LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UpstreamEndpointStats) Reset() { *m = UpstreamEndpointStats{} } @@ -197,26 +139,18 @@ func (*UpstreamEndpointStats) ProtoMessage() {} func (*UpstreamEndpointStats) Descriptor() ([]byte, []int) { return fileDescriptor_5134f8f33d8f8d01, []int{1} } + func (m *UpstreamEndpointStats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_UpstreamEndpointStats.Unmarshal(m, b) } func (m *UpstreamEndpointStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpstreamEndpointStats.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_UpstreamEndpointStats.Marshal(b, m, deterministic) } func (m *UpstreamEndpointStats) XXX_Merge(src proto.Message) { xxx_messageInfo_UpstreamEndpointStats.Merge(m, src) } func (m *UpstreamEndpointStats) XXX_Size() int { - return m.Size() + return xxx_messageInfo_UpstreamEndpointStats.Size(m) } func (m *UpstreamEndpointStats) XXX_DiscardUnknown() { xxx_messageInfo_UpstreamEndpointStats.DiscardUnknown(m) @@ -231,7 +165,7 @@ func (m *UpstreamEndpointStats) GetAddress() *core.Address { return nil } -func (m *UpstreamEndpointStats) GetMetadata() *types.Struct { +func (m *UpstreamEndpointStats) GetMetadata() *_struct.Struct { if m != nil { return m.Metadata } @@ -259,6 +193,13 @@ func (m *UpstreamEndpointStats) GetTotalErrorRequests() uint64 { return 0 } +func (m *UpstreamEndpointStats) GetTotalIssuedRequests() uint64 { + if m != nil { + return m.TotalIssuedRequests + } + return 0 +} + func (m *UpstreamEndpointStats) GetLoadMetricStats() []*EndpointLoadMetricStats { if m != nil { return m.LoadMetricStats @@ -266,18 +207,13 @@ func (m *UpstreamEndpointStats) GetLoadMetricStats() []*EndpointLoadMetricStats return nil } -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. type EndpointLoadMetricStats struct { - // Name of the metric; may be empty. - MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` - // Number of calls that finished and included this metric. - NumRequestsFinishedWithMetric uint64 `protobuf:"varint,2,opt,name=num_requests_finished_with_metric,json=numRequestsFinishedWithMetric,proto3" json:"num_requests_finished_with_metric,omitempty"` - // Sum of metric values across all calls that finished with this metric for - // load_reporting_interval. - TotalMetricValue float64 `protobuf:"fixed64,3,opt,name=total_metric_value,json=totalMetricValue,proto3" json:"total_metric_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` + NumRequestsFinishedWithMetric uint64 `protobuf:"varint,2,opt,name=num_requests_finished_with_metric,json=numRequestsFinishedWithMetric,proto3" json:"num_requests_finished_with_metric,omitempty"` + TotalMetricValue float64 `protobuf:"fixed64,3,opt,name=total_metric_value,json=totalMetricValue,proto3" json:"total_metric_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *EndpointLoadMetricStats) Reset() { *m = EndpointLoadMetricStats{} } @@ -286,26 +222,18 @@ func (*EndpointLoadMetricStats) ProtoMessage() {} func (*EndpointLoadMetricStats) Descriptor() ([]byte, []int) { return fileDescriptor_5134f8f33d8f8d01, []int{2} } + func (m *EndpointLoadMetricStats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_EndpointLoadMetricStats.Unmarshal(m, b) } func (m *EndpointLoadMetricStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EndpointLoadMetricStats.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_EndpointLoadMetricStats.Marshal(b, m, deterministic) } func (m *EndpointLoadMetricStats) XXX_Merge(src proto.Message) { xxx_messageInfo_EndpointLoadMetricStats.Merge(m, src) } func (m *EndpointLoadMetricStats) XXX_Size() int { - return m.Size() + return xxx_messageInfo_EndpointLoadMetricStats.Size(m) } func (m *EndpointLoadMetricStats) XXX_DiscardUnknown() { xxx_messageInfo_EndpointLoadMetricStats.DiscardUnknown(m) @@ -334,43 +262,16 @@ func (m *EndpointLoadMetricStats) GetTotalMetricValue() float64 { return 0 } -// Per cluster load stats. Envoy reports these stats a management server in a -// :ref:`LoadStatsRequest` -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// Next ID: 7 type ClusterStats struct { - // The name of the cluster. - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - ClusterServiceName string `protobuf:"bytes,6,opt,name=cluster_service_name,json=clusterServiceName,proto3" json:"cluster_service_name,omitempty"` - // Need at least one. - UpstreamLocalityStats []*UpstreamLocalityStats `protobuf:"bytes,2,rep,name=upstream_locality_stats,json=upstreamLocalityStats,proto3" json:"upstream_locality_stats,omitempty"` - // Cluster-level stats such as total_successful_requests may be computed by - // summing upstream_locality_stats. In addition, below there are additional - // cluster-wide stats. The following total_requests equality holds at the - // cluster-level: - // - // .. code-block:: none - // - // sum_locality(total_successful_requests) + sum_locality(total_requests_in_progress) + - // sum_locality(total_error_requests) + total_dropped_requests` - // - // The total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - TotalDroppedRequests uint64 `protobuf:"varint,3,opt,name=total_dropped_requests,json=totalDroppedRequests,proto3" json:"total_dropped_requests,omitempty"` - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - DroppedRequests []*ClusterStats_DroppedRequests `protobuf:"bytes,5,rep,name=dropped_requests,json=droppedRequests,proto3" json:"dropped_requests,omitempty"` - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - LoadReportInterval *types.Duration `protobuf:"bytes,4,opt,name=load_report_interval,json=loadReportInterval,proto3" json:"load_report_interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + ClusterServiceName string `protobuf:"bytes,6,opt,name=cluster_service_name,json=clusterServiceName,proto3" json:"cluster_service_name,omitempty"` + UpstreamLocalityStats []*UpstreamLocalityStats `protobuf:"bytes,2,rep,name=upstream_locality_stats,json=upstreamLocalityStats,proto3" json:"upstream_locality_stats,omitempty"` + TotalDroppedRequests uint64 `protobuf:"varint,3,opt,name=total_dropped_requests,json=totalDroppedRequests,proto3" json:"total_dropped_requests,omitempty"` + DroppedRequests []*ClusterStats_DroppedRequests `protobuf:"bytes,5,rep,name=dropped_requests,json=droppedRequests,proto3" json:"dropped_requests,omitempty"` + LoadReportInterval *duration.Duration `protobuf:"bytes,4,opt,name=load_report_interval,json=loadReportInterval,proto3" json:"load_report_interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ClusterStats) Reset() { *m = ClusterStats{} } @@ -379,26 +280,18 @@ func (*ClusterStats) ProtoMessage() {} func (*ClusterStats) Descriptor() ([]byte, []int) { return fileDescriptor_5134f8f33d8f8d01, []int{3} } + func (m *ClusterStats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ClusterStats.Unmarshal(m, b) } func (m *ClusterStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterStats.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ClusterStats.Marshal(b, m, deterministic) } func (m *ClusterStats) XXX_Merge(src proto.Message) { xxx_messageInfo_ClusterStats.Merge(m, src) } func (m *ClusterStats) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ClusterStats.Size(m) } func (m *ClusterStats) XXX_DiscardUnknown() { xxx_messageInfo_ClusterStats.DiscardUnknown(m) @@ -441,7 +334,7 @@ func (m *ClusterStats) GetDroppedRequests() []*ClusterStats_DroppedRequests { return nil } -func (m *ClusterStats) GetLoadReportInterval() *types.Duration { +func (m *ClusterStats) GetLoadReportInterval() *duration.Duration { if m != nil { return m.LoadReportInterval } @@ -449,9 +342,7 @@ func (m *ClusterStats) GetLoadReportInterval() *types.Duration { } type ClusterStats_DroppedRequests struct { - // Identifier for the policy specifying the drop. - Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` - // Total number of deliberately dropped requests for the category. + Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` DroppedCount uint64 `protobuf:"varint,2,opt,name=dropped_count,json=droppedCount,proto3" json:"dropped_count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -464,26 +355,18 @@ func (*ClusterStats_DroppedRequests) ProtoMessage() {} func (*ClusterStats_DroppedRequests) Descriptor() ([]byte, []int) { return fileDescriptor_5134f8f33d8f8d01, []int{3, 0} } + func (m *ClusterStats_DroppedRequests) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ClusterStats_DroppedRequests.Unmarshal(m, b) } func (m *ClusterStats_DroppedRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterStats_DroppedRequests.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ClusterStats_DroppedRequests.Marshal(b, m, deterministic) } func (m *ClusterStats_DroppedRequests) XXX_Merge(src proto.Message) { xxx_messageInfo_ClusterStats_DroppedRequests.Merge(m, src) } func (m *ClusterStats_DroppedRequests) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ClusterStats_DroppedRequests.Size(m) } func (m *ClusterStats_DroppedRequests) XXX_DiscardUnknown() { xxx_messageInfo_ClusterStats_DroppedRequests.DiscardUnknown(m) @@ -518,1539 +401,56 @@ func init() { } var fileDescriptor_5134f8f33d8f8d01 = []byte{ - // 760 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4d, 0x6e, 0xd3, 0x40, - 0x18, 0x95, 0x93, 0xb4, 0x4d, 0x27, 0xad, 0x52, 0x46, 0x29, 0x49, 0x03, 0xa4, 0x21, 0x15, 0x22, - 0x8b, 0xca, 0xae, 0xd2, 0x4a, 0x48, 0xb0, 0x22, 0x6d, 0x11, 0x15, 0x05, 0x55, 0x8e, 0x00, 0x09, - 0x09, 0xac, 0xa9, 0x3d, 0x4d, 0x47, 0x72, 0x3c, 0x66, 0x66, 0x1c, 0xc8, 0x11, 0xd8, 0x72, 0x04, - 0x8e, 0xc0, 0x92, 0x15, 0x4b, 0x96, 0x6c, 0xd9, 0xa1, 0xee, 0xb8, 0x05, 0xf2, 0xfc, 0x38, 0xbf, - 0x95, 0x38, 0x00, 0xbb, 0xf1, 0xf7, 0xde, 0xf3, 0xf7, 0xf7, 0xc6, 0x06, 0xf7, 0x71, 0x34, 0xa4, - 0x23, 0x07, 0xc5, 0xc4, 0x19, 0x76, 0x1c, 0x1c, 0x05, 0x31, 0x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 0x62, 0x23, 0x39, 0x89, 0xce, 0x34, 0x0c, 0xf7, 0x40, 0x45, 0x89, 0x31, 0x63, 0x94, - 0x8d, 0x73, 0x16, 0xa4, 0x0c, 0x4a, 0xec, 0x38, 0x85, 0xb2, 0x74, 0x6f, 0xc0, 0x0d, 0xb9, 0xd5, - 0x01, 0x16, 0x8c, 0xf8, 0x1e, 0x4f, 0x1b, 0xaf, 0x2d, 0x35, 0xf3, 0xed, 0x52, 0xc7, 0xb6, 0x17, - 0x2e, 0xd7, 0x3e, 0xd6, 0x87, 0x53, 0x8a, 0x82, 0xe7, 0x52, 0x26, 0xc7, 0xe5, 0x96, 0xc3, 0xe9, - 0x00, 0x0c, 0x40, 0x35, 0xd1, 0x83, 0xf5, 0x8c, 0x5a, 0x67, 0x58, 0x91, 0x19, 0x76, 0xaf, 0xc9, - 0x60, 0xd6, 0x61, 0x32, 0xa9, 0xf7, 0x6f, 0x26, 0x8b, 0xc2, 0xb0, 0x0e, 0x8a, 0x31, 0x23, 0x94, - 0xa5, 0x5b, 0x5a, 0x6e, 0x5a, 0xed, 0x75, 0x37, 0x7b, 0x6e, 0x7d, 0x9a, 0xd8, 0xed, 0xb4, 0xea, - 0x00, 0xac, 0x68, 0x47, 0xea, 0xd5, 0xd6, 0x17, 0xac, 0xf6, 0xb1, 0x62, 0xb8, 0x86, 0x0a, 0xf7, - 0x41, 0x71, 0x80, 0x05, 0x0a, 0x90, 0x40, 0x32, 0x57, 0xa9, 0x53, 0xb5, 0x95, 0x17, 0x6d, 0xe3, - 0x45, 0xbb, 0x27, 0xbd, 0xe8, 0x66, 0xc4, 0xff, 0x6e, 0x90, 0x81, 0xd6, 0x57, 0x0b, 0x54, 0xaf, - 0x21, 0xc3, 0x6d, 0x50, 0xd2, 0x29, 0x23, 0x34, 0xc0, 0x72, 0x23, 0xab, 0x2e, 0x50, 0xa1, 0x17, - 0x68, 0x80, 0xe1, 0x53, 0x70, 0x37, 0x4a, 0x06, 0xe3, 0x29, 0x5c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0x4b, 0x9d, 0xad, 0xb9, 0x5b, 0x77, 0xa4, 0xff, 0x10, 0x2e, 0x4c, 0x65, 0xae, 0x54, 0x9d, - 0x68, 0x51, 0xfd, 0x2d, 0x28, 0xcf, 0xd6, 0x7f, 0x0f, 0x14, 0x7d, 0x24, 0x70, 0x9f, 0xb2, 0xd1, - 0xfc, 0x0e, 0x33, 0x08, 0xee, 0x80, 0x75, 0xd3, 0xa6, 0x4f, 0x93, 0x48, 0x68, 0x8f, 0xad, 0xe9, - 0xe0, 0x61, 0x1a, 0xeb, 0x1e, 0xfd, 0xb8, 0x6a, 0x58, 0x3f, 0xaf, 0x1a, 0xd6, 0xef, 0xab, 0x86, - 0x05, 0x76, 0x08, 0x55, 0x13, 0x88, 0x19, 0xfd, 0x38, 0x5a, 0x3c, 0x8c, 0x6e, 0xf9, 0x34, 0xab, - 0xf2, 0x2c, 0x6d, 0xe1, 0xcc, 0x3a, 0x5f, 0x96, 0xbd, 0xec, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, - 0x77, 0xa0, 0xc7, 0x7d, 0x7c, 0x07, 0x00, 0x00, + // 812 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x4d, 0x8b, 0x23, 0x45, + 0x18, 0xa6, 0x33, 0x99, 0x24, 0x56, 0x66, 0xc9, 0x58, 0x4e, 0x4c, 0x36, 0xba, 0x6e, 0xcc, 0x1c, + 0x0c, 0xb2, 0x74, 0x2f, 0xc9, 0x82, 0xa0, 0x27, 0xb3, 0x3b, 0xe2, 0xe0, 0x28, 0x43, 0x07, 0x15, + 0x14, 0x6c, 0x6b, 0xba, 0x2b, 0x99, 0x82, 0xee, 0xaa, 0xb6, 0x3e, 0x5a, 0x73, 0xf3, 0x0f, 0x88, + 0xe0, 0xc9, 0x83, 0xbf, 0xc2, 0xa3, 0xe0, 0xdd, 0xab, 0x7f, 0xc5, 0xe3, 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0xd3, 0xcb, 0x4d, 0x04, 0x23, 0x08, 0x00, 0x00, } - -func (m *UpstreamLocalityStats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpstreamLocalityStats) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Locality != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.Locality.Size())) - n1, err := m.Locality.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.TotalSuccessfulRequests != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalSuccessfulRequests)) - } - if m.TotalRequestsInProgress != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalRequestsInProgress)) - } - if m.TotalErrorRequests != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalErrorRequests)) - } - if len(m.LoadMetricStats) > 0 { - for _, msg := range m.LoadMetricStats { - dAtA[i] = 0x2a - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Priority != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.Priority)) - } - if len(m.UpstreamEndpointStats) > 0 { - for _, msg := range m.UpstreamEndpointStats { - dAtA[i] = 0x3a - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UpstreamEndpointStats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpstreamEndpointStats) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Address != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.Address.Size())) - n2, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.TotalSuccessfulRequests != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalSuccessfulRequests)) - } - if m.TotalRequestsInProgress != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalRequestsInProgress)) - } - if m.TotalErrorRequests != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalErrorRequests)) - } - if len(m.LoadMetricStats) > 0 { - for _, msg := range m.LoadMetricStats { - dAtA[i] = 0x2a - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Metadata != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.Metadata.Size())) - n3, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *EndpointLoadMetricStats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointLoadMetricStats) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MetricName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(len(m.MetricName))) - i += copy(dAtA[i:], m.MetricName) - } - if m.NumRequestsFinishedWithMetric != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.NumRequestsFinishedWithMetric)) - } - if m.TotalMetricValue != 0 { - dAtA[i] = 0x19 - i++ - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.TotalMetricValue)))) - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ClusterStats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterStats) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ClusterName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(len(m.ClusterName))) - i += copy(dAtA[i:], m.ClusterName) - } - if len(m.UpstreamLocalityStats) > 0 { - for _, msg := range m.UpstreamLocalityStats { - dAtA[i] = 0x12 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.TotalDroppedRequests != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.TotalDroppedRequests)) - } - if m.LoadReportInterval != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.LoadReportInterval.Size())) - n4, err := m.LoadReportInterval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if len(m.DroppedRequests) > 0 { - for _, msg := range m.DroppedRequests { - dAtA[i] = 0x2a - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ClusterServiceName) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(len(m.ClusterServiceName))) - i += copy(dAtA[i:], m.ClusterServiceName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ClusterStats_DroppedRequests) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterStats_DroppedRequests) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Category) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(len(m.Category))) - i += copy(dAtA[i:], m.Category) - } - if m.DroppedCount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintLoadReport(dAtA, i, uint64(m.DroppedCount)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintLoadReport(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *UpstreamLocalityStats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Locality != nil { - l = m.Locality.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - if m.TotalSuccessfulRequests != 0 { - n += 1 + sovLoadReport(uint64(m.TotalSuccessfulRequests)) - } - if m.TotalRequestsInProgress != 0 { - n += 1 + sovLoadReport(uint64(m.TotalRequestsInProgress)) - } - if m.TotalErrorRequests != 0 { - n += 1 + sovLoadReport(uint64(m.TotalErrorRequests)) - } - if len(m.LoadMetricStats) > 0 { - for _, e := range m.LoadMetricStats { - l = e.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - } - if m.Priority != 0 { - n += 1 + sovLoadReport(uint64(m.Priority)) - } - if len(m.UpstreamEndpointStats) > 0 { - for _, e := range m.UpstreamEndpointStats { - l = e.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpstreamEndpointStats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - if m.TotalSuccessfulRequests != 0 { - n += 1 + sovLoadReport(uint64(m.TotalSuccessfulRequests)) - } - if m.TotalRequestsInProgress != 0 { - n += 1 + sovLoadReport(uint64(m.TotalRequestsInProgress)) - } - if m.TotalErrorRequests != 0 { - n += 1 + sovLoadReport(uint64(m.TotalErrorRequests)) - } - if len(m.LoadMetricStats) > 0 { - for _, e := range m.LoadMetricStats { - l = e.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EndpointLoadMetricStats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MetricName) - if l > 0 { - n += 1 + l + sovLoadReport(uint64(l)) - } - if m.NumRequestsFinishedWithMetric != 0 { - n += 1 + sovLoadReport(uint64(m.NumRequestsFinishedWithMetric)) - } - if m.TotalMetricValue != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterStats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClusterName) - if l > 0 { - n += 1 + l + sovLoadReport(uint64(l)) - } - if len(m.UpstreamLocalityStats) > 0 { - for _, e := range m.UpstreamLocalityStats { - l = e.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - } - if m.TotalDroppedRequests != 0 { - n += 1 + sovLoadReport(uint64(m.TotalDroppedRequests)) - } - if m.LoadReportInterval != nil { - l = m.LoadReportInterval.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - if len(m.DroppedRequests) > 0 { - for _, e := range m.DroppedRequests { - l = e.Size() - n += 1 + l + sovLoadReport(uint64(l)) - } - } - l = len(m.ClusterServiceName) - if l > 0 { - n += 1 + l + sovLoadReport(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterStats_DroppedRequests) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Category) - if l > 0 { - n += 1 + l + sovLoadReport(uint64(l)) - } - if m.DroppedCount != 0 { - n += 1 + sovLoadReport(uint64(m.DroppedCount)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovLoadReport(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozLoadReport(x uint64) (n int) { - return sovLoadReport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UpstreamLocalityStats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpstreamLocalityStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpstreamLocalityStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Locality == nil { - m.Locality = &core.Locality{} - } - if err := m.Locality.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSuccessfulRequests", wireType) - } - m.TotalSuccessfulRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSuccessfulRequests |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRequestsInProgress", wireType) - } - m.TotalRequestsInProgress = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalRequestsInProgress |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalErrorRequests", wireType) - } - m.TotalErrorRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalErrorRequests |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadMetricStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LoadMetricStats = append(m.LoadMetricStats, &EndpointLoadMetricStats{}) - if err := m.LoadMetricStats[len(m.LoadMetricStats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpstreamEndpointStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UpstreamEndpointStats = append(m.UpstreamEndpointStats, &UpstreamEndpointStats{}) - if err := m.UpstreamEndpointStats[len(m.UpstreamEndpointStats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLoadReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLoadReport - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLoadReport - } - 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 *UpstreamEndpointStats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpstreamEndpointStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpstreamEndpointStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &core.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalSuccessfulRequests", wireType) - } - m.TotalSuccessfulRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalSuccessfulRequests |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRequestsInProgress", wireType) - } - m.TotalRequestsInProgress = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalRequestsInProgress |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalErrorRequests", wireType) - } - m.TotalErrorRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalErrorRequests |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadMetricStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LoadMetricStats = append(m.LoadMetricStats, &EndpointLoadMetricStats{}) - if err := m.LoadMetricStats[len(m.LoadMetricStats)-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 Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &types.Struct{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLoadReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLoadReport - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLoadReport - } - 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 *EndpointLoadMetricStats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointLoadMetricStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointLoadMetricStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MetricName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumRequestsFinishedWithMetric", wireType) - } - m.NumRequestsFinishedWithMetric = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumRequestsFinishedWithMetric |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalMetricValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.TotalMetricValue = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipLoadReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLoadReport - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLoadReport - } - 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 *ClusterStats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpstreamLocalityStats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UpstreamLocalityStats = append(m.UpstreamLocalityStats, &UpstreamLocalityStats{}) - if err := m.UpstreamLocalityStats[len(m.UpstreamLocalityStats)-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 TotalDroppedRequests", wireType) - } - m.TotalDroppedRequests = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalDroppedRequests |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadReportInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LoadReportInterval == nil { - m.LoadReportInterval = &types.Duration{} - } - if err := m.LoadReportInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedRequests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DroppedRequests = append(m.DroppedRequests, &ClusterStats_DroppedRequests{}) - if err := m.DroppedRequests[len(m.DroppedRequests)-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 ClusterServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterServiceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLoadReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLoadReport - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLoadReport - } - 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 *ClusterStats_DroppedRequests) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DroppedRequests: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DroppedRequests: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLoadReport - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLoadReport - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Category = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedCount", wireType) - } - m.DroppedCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLoadReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipLoadReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLoadReport - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLoadReport - } - 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 skipLoadReport(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLoadReport - } - 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, ErrIntOverflowLoadReport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLoadReport - } - 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, ErrInvalidLengthLoadReport - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthLoadReport - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLoadReport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipLoadReport(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthLoadReport - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthLoadReport = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLoadReport = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go index 0ddfc8bba0..d3ad9b0e19 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/endpoint/load_report.proto -package endpoint +package envoy_api_v2_endpoint import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _load_report_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on UpstreamLocalityStats with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -41,17 +44,12 @@ func (m *UpstreamLocalityStats) Validate() error { return nil } - { - tmp := m.GetLocality() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamLocalityStatsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamLocalityStatsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, } } } @@ -62,20 +60,17 @@ func (m *UpstreamLocalityStats) Validate() error { // no validation rules for TotalErrorRequests + // no validation rules for TotalIssuedRequests + for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -85,17 +80,12 @@ func (m *UpstreamLocalityStats) Validate() error { for idx, item := range m.GetUpstreamEndpointStats() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamLocalityStatsValidationError{ + field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -171,32 +161,22 @@ func (m *UpstreamEndpointStats) Validate() error { return nil } - { - tmp := m.GetAddress() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamEndpointStatsValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamEndpointStatsValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamEndpointStatsValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamEndpointStatsValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, } } } @@ -207,20 +187,17 @@ func (m *UpstreamEndpointStats) Validate() error { // no validation rules for TotalErrorRequests + // no validation rules for TotalIssuedRequests + for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return UpstreamEndpointStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamEndpointStatsValidationError{ + field: fmt.Sprintf("LoadMetricStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -386,17 +363,12 @@ func (m *ClusterStats) Validate() error { for idx, item := range m.GetUpstreamLocalityStats() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterStatsValidationError{ - field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterStatsValidationError{ + field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -408,34 +380,24 @@ func (m *ClusterStats) Validate() error { for idx, item := range m.GetDroppedRequests() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterStatsValidationError{ - field: fmt.Sprintf("DroppedRequests[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterStatsValidationError{ + field: fmt.Sprintf("DroppedRequests[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetLoadReportInterval() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterStatsValidationError{ - field: "LoadReportInterval", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetLoadReportInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterStatsValidationError{ + field: "LoadReportInterval", + reason: "embedded message failed validation", + cause: err, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go index bcd149c5ef..2c61891300 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go @@ -1,540 +1,99 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/lds.proto -package v2 +package envoy_api_v2 import ( - bytes "bytes" context "context" fmt "fmt" - io "io" - math "math" - time "time" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/googleapis/google/api" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + _ "github.com/golang/protobuf/ptypes/duration" + _ "github.com/golang/protobuf/ptypes/wrappers" + _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - listener "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -type Listener_DrainType int32 - -const ( - // Drain in response to calling /healthcheck/fail admin endpoint (along with the health check - // filter), listener removal/modification, and hot restart. - Listener_DEFAULT Listener_DrainType = 0 - // Drain in response to listener removal/modification and hot restart. This setting does not - // include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress - // and egress listeners. - Listener_MODIFY_ONLY Listener_DrainType = 1 -) - -var Listener_DrainType_name = map[int32]string{ - 0: "DEFAULT", - 1: "MODIFY_ONLY", +type LdsDummy struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -var Listener_DrainType_value = map[string]int32{ - "DEFAULT": 0, - "MODIFY_ONLY": 1, -} - -func (x Listener_DrainType) String() string { - return proto.EnumName(Listener_DrainType_name, int32(x)) -} - -func (Listener_DrainType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_34e2cd84a105bcd1, []int{0, 0} -} - -// [#comment:next free field: 16] -type Listener struct { - // The unique name by which this listener is known. If no name is provided, - // Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically - // updated or removed via :ref:`LDS ` a unique name must be provided. - // By default, the maximum length of a listener's name is limited to 60 characters. This limit can - // be increased by setting the :option:`--max-obj-name-len` command line argument to the desired - // value. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The address that the listener should listen on. In general, the address must be unique, though - // that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on - // Linux as the actual port will be allocated by the OS. - Address core.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address"` - // A list of filter chains to consider for this listener. The - // :ref:`FilterChain ` with the most specific - // :ref:`FilterChainMatch ` criteria is used on a - // connection. - // - // Example using SNI for filter chain selection can be found in the - // :ref:`FAQ entry `. - FilterChains []listener.FilterChain `protobuf:"bytes,3,rep,name=filter_chains,json=filterChains,proto3" json:"filter_chains"` - // If a connection is redirected using *iptables*, the port on which the proxy - // receives it might be different from the original destination address. When this flag is set to - // true, the listener hands off redirected connections to the listener associated with the - // original destination address. If there is no listener associated with the original destination - // address, the connection is handled by the listener that receives it. Defaults to false. - // - // .. attention:: - // - // This field is deprecated. Use :ref:`an original_dst ` - // :ref:`listener filter ` instead. - // - // Note that hand off to another listener is *NOT* performed without this flag. Once - // :ref:`FilterChainMatch ` is implemented this flag - // will be removed, as filter chain matching can be used to select a filter chain based on the - // restored destination address. - UseOriginalDst *types.BoolValue `protobuf:"bytes,4,opt,name=use_original_dst,json=useOriginalDst,proto3" json:"use_original_dst,omitempty"` // Deprecated: Do not use. - // Soft limit on size of the listener’s new connection read and write buffers. - // If unspecified, an implementation defined default is applied (1MiB). - PerConnectionBufferLimitBytes *types.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` - // Listener metadata. - Metadata *core.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` - // [#not-implemented-hide:] - DeprecatedV1 *Listener_DeprecatedV1 `protobuf:"bytes,7,opt,name=deprecated_v1,json=deprecatedV1,proto3" json:"deprecated_v1,omitempty"` - // The type of draining to perform at a listener-wide level. - DrainType Listener_DrainType `protobuf:"varint,8,opt,name=drain_type,json=drainType,proto3,enum=envoy.api.v2.Listener_DrainType" json:"drain_type,omitempty"` - // Listener filters have the opportunity to manipulate and augment the connection metadata that - // is used in connection filter chain matching, for example. These filters are run before any in - // :ref:`filter_chains `. Order matters as the - // filters are processed sequentially right after a socket has been accepted by the listener, and - // before a connection is created. - ListenerFilters []listener.ListenerFilter `protobuf:"bytes,9,rep,name=listener_filters,json=listenerFilters,proto3" json:"listener_filters"` - // The timeout to wait for all listener filters to complete operation. If the timeout is reached, - // the accepted socket is closed without a connection being created. Specify 0 to disable the - // timeout. If not specified, a default timeout of 15s is used. - ListenerFiltersTimeout *time.Duration `protobuf:"bytes,15,opt,name=listener_filters_timeout,json=listenerFiltersTimeout,proto3,stdduration" json:"listener_filters_timeout,omitempty"` - // Whether the listener should be set as a transparent socket. - // When this flag is set to true, connections can be redirected to the listener using an - // *iptables* *TPROXY* target, in which case the original source and destination addresses and - // ports are preserved on accepted connections. This flag should be used in combination with - // :ref:`an original_dst ` :ref:`listener filter - // ` to mark the connections' local addresses as - // "restored." This can be used to hand off each redirected connection to another listener - // associated with the connection's destination address. Direct connections to the socket without - // using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are - // therefore treated as if they were redirected. - // When this flag is set to false, the listener's socket is explicitly reset as non-transparent. - // Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. - // When this flag is not set (default), the socket is not modified, i.e. the transparent option - // is neither set nor reset. - Transparent *types.BoolValue `protobuf:"bytes,10,opt,name=transparent,proto3" json:"transparent,omitempty"` - // Whether the listener should set the *IP_FREEBIND* socket option. When this - // flag is set to true, listeners can be bound to 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 *types.BoolValue `protobuf:"bytes,11,opt,name=freebind,proto3" json:"freebind,omitempty"` - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - SocketOptions []*core.SocketOption `protobuf:"bytes,13,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` - // Whether the listener should accept TCP Fast Open (TFO) connections. - // When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on - // the socket, with a queue length of the specified size - // (see `details in RFC7413 `_). - // When this flag is set to 0, the option TCP_FASTOPEN 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. - // - // On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable - // TCP_FASTOPEN. - // See `ip-sysctl.txt `_. - // - // On macOS, only values of 0, 1, and unset are valid; other values may result in an error. - // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. - TcpFastOpenQueueLength *types.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength,proto3" json:"tcp_fast_open_queue_length,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Listener) Reset() { *m = Listener{} } -func (m *Listener) String() string { return proto.CompactTextString(m) } -func (*Listener) ProtoMessage() {} -func (*Listener) Descriptor() ([]byte, []int) { +func (m *LdsDummy) Reset() { *m = LdsDummy{} } +func (m *LdsDummy) String() string { return proto.CompactTextString(m) } +func (*LdsDummy) ProtoMessage() {} +func (*LdsDummy) Descriptor() ([]byte, []int) { return fileDescriptor_34e2cd84a105bcd1, []int{0} } -func (m *Listener) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (m *LdsDummy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LdsDummy.Unmarshal(m, b) } -func (m *Listener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Listener.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (m *LdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LdsDummy.Marshal(b, m, deterministic) } -func (m *Listener) XXX_Merge(src proto.Message) { - xxx_messageInfo_Listener.Merge(m, src) +func (m *LdsDummy) XXX_Merge(src proto.Message) { + xxx_messageInfo_LdsDummy.Merge(m, src) } -func (m *Listener) XXX_Size() int { - return m.Size() +func (m *LdsDummy) XXX_Size() int { + return xxx_messageInfo_LdsDummy.Size(m) } -func (m *Listener) XXX_DiscardUnknown() { - xxx_messageInfo_Listener.DiscardUnknown(m) +func (m *LdsDummy) XXX_DiscardUnknown() { + xxx_messageInfo_LdsDummy.DiscardUnknown(m) } -var xxx_messageInfo_Listener proto.InternalMessageInfo - -func (m *Listener) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Listener) GetAddress() core.Address { - if m != nil { - return m.Address - } - return core.Address{} -} - -func (m *Listener) GetFilterChains() []listener.FilterChain { - if m != nil { - return m.FilterChains - } - return nil -} - -// Deprecated: Do not use. -func (m *Listener) GetUseOriginalDst() *types.BoolValue { - if m != nil { - return m.UseOriginalDst - } - return nil -} - -func (m *Listener) GetPerConnectionBufferLimitBytes() *types.UInt32Value { - if m != nil { - return m.PerConnectionBufferLimitBytes - } - return nil -} - -func (m *Listener) GetMetadata() *core.Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *Listener) GetDeprecatedV1() *Listener_DeprecatedV1 { - if m != nil { - return m.DeprecatedV1 - } - return nil -} - -func (m *Listener) GetDrainType() Listener_DrainType { - if m != nil { - return m.DrainType - } - return Listener_DEFAULT -} - -func (m *Listener) GetListenerFilters() []listener.ListenerFilter { - if m != nil { - return m.ListenerFilters - } - return nil -} - -func (m *Listener) GetListenerFiltersTimeout() *time.Duration { - if m != nil { - return m.ListenerFiltersTimeout - } - return nil -} - -func (m *Listener) GetTransparent() *types.BoolValue { - if m != nil { - return m.Transparent - } - return nil -} - -func (m *Listener) GetFreebind() *types.BoolValue { - if m != nil { - return m.Freebind - } - return nil -} - -func (m *Listener) GetSocketOptions() []*core.SocketOption { - if m != nil { - return m.SocketOptions - } - return nil -} - -func (m *Listener) GetTcpFastOpenQueueLength() *types.UInt32Value { - if m != nil { - return m.TcpFastOpenQueueLength - } - return nil -} - -// [#not-implemented-hide:] -type Listener_DeprecatedV1 struct { - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that - // set use_original_dst parameter to true. Default is true. - // - // [V2-API-DIFF] This is deprecated in v2, all Listeners will bind to their - // port. An additional filter chain must be created for every original - // destination port this listener may redirect to in v2, with the original - // port specified in the FilterChainMatch destination_port field. - // - // [#comment:TODO(PiotrSikora): Remove this once verified that we no longer need it.] - BindToPort *types.BoolValue `protobuf:"bytes,1,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Listener_DeprecatedV1) Reset() { *m = Listener_DeprecatedV1{} } -func (m *Listener_DeprecatedV1) String() string { return proto.CompactTextString(m) } -func (*Listener_DeprecatedV1) ProtoMessage() {} -func (*Listener_DeprecatedV1) Descriptor() ([]byte, []int) { - return fileDescriptor_34e2cd84a105bcd1, []int{0, 0} -} -func (m *Listener_DeprecatedV1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Listener_DeprecatedV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Listener_DeprecatedV1.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Listener_DeprecatedV1) XXX_Merge(src proto.Message) { - xxx_messageInfo_Listener_DeprecatedV1.Merge(m, src) -} -func (m *Listener_DeprecatedV1) XXX_Size() int { - return m.Size() -} -func (m *Listener_DeprecatedV1) XXX_DiscardUnknown() { - xxx_messageInfo_Listener_DeprecatedV1.DiscardUnknown(m) -} - -var xxx_messageInfo_Listener_DeprecatedV1 proto.InternalMessageInfo - -func (m *Listener_DeprecatedV1) GetBindToPort() *types.BoolValue { - if m != nil { - return m.BindToPort - } - return nil -} +var xxx_messageInfo_LdsDummy proto.InternalMessageInfo func init() { - proto.RegisterEnum("envoy.api.v2.Listener_DrainType", Listener_DrainType_name, Listener_DrainType_value) - proto.RegisterType((*Listener)(nil), "envoy.api.v2.Listener") - proto.RegisterType((*Listener_DeprecatedV1)(nil), "envoy.api.v2.Listener.DeprecatedV1") + proto.RegisterType((*LdsDummy)(nil), "envoy.api.v2.LdsDummy") } func init() { proto.RegisterFile("envoy/api/v2/lds.proto", fileDescriptor_34e2cd84a105bcd1) } var fileDescriptor_34e2cd84a105bcd1 = []byte{ - // 857 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x38, 0x6e, 0xe3, 0x8c, 0x1d, 0xdb, 0x1a, 0xa1, 0x74, 0x31, 0xc1, 0x36, 0x06, 0x24, - 0xc3, 0xc1, 0xa6, 0xae, 0x04, 0x52, 0xa9, 0x84, 0xba, 0x35, 0x56, 0x8b, 0x5c, 0x1c, 0x36, 0x69, - 0x68, 0x4e, 0xab, 0xf1, 0xee, 0xb3, 0x33, 0x62, 0x3d, 0x33, 0x9d, 0x99, 0x35, 0xf8, 0xca, 0x09, - 0x71, 0x84, 0x0b, 0x3f, 0x81, 0xdf, 0xc0, 0x89, 0x63, 0x8f, 0x48, 0xdc, 0x01, 0x45, 0x5c, 0x10, - 0xbf, 0x01, 0x09, 0xed, 0x78, 0xd7, 0xd8, 0x4d, 0x42, 0x38, 0x70, 0x7b, 0x33, 0xef, 0xfb, 0xbe, - 0x7d, 0xf3, 0xbd, 0x37, 0xb3, 0x78, 0x1f, 0xf8, 0x5c, 0x2c, 0xba, 0x54, 0xb2, 0xee, 0xbc, 0xd7, - 0x8d, 0x42, 0xdd, 0x91, 0x4a, 0x18, 0x41, 0x4a, 0x76, 0xbf, 0x43, 0x25, 0xeb, 0xcc, 0x7b, 0xb5, - 0xc6, 0x06, 0x2a, 0x10, 0x0a, 0xba, 0x34, 0x0c, 0x15, 0xe8, 0x14, 0x5e, 0x3b, 0xb8, 0x08, 0x18, - 0x53, 0x0d, 0x97, 0x66, 0x43, 0xa6, 0x03, 0x31, 0x07, 0xb5, 0x48, 0xb3, 0x6f, 0x6c, 0x96, 0xc0, - 0xb4, 0x01, 0x0e, 0x6a, 0x15, 0x64, 0x1a, 0x53, 0x21, 0xa6, 0x11, 0x58, 0x18, 0xe5, 0x5c, 0x18, - 0x6a, 0x98, 0xe0, 0xd9, 0xf7, 0xeb, 0x69, 0xd6, 0xae, 0xc6, 0xf1, 0xa4, 0x1b, 0xc6, 0xca, 0x02, - 0xae, 0xca, 0x7f, 0xae, 0xa8, 0x94, 0xa0, 0x32, 0xfe, 0xad, 0x39, 0x8d, 0x58, 0x48, 0x0d, 0x74, - 0xb3, 0x20, 0x4d, 0xbc, 0x34, 0x15, 0x53, 0x61, 0xc3, 0x6e, 0x12, 0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xd5, 0x46, - 0xef, 0x20, 0x12, 0xe3, 0xf2, 0x00, 0x4c, 0x70, 0xf6, 0x3f, 0x0a, 0xb7, 0xbe, 0xfc, 0xf9, 0xf7, - 0x6f, 0x73, 0x07, 0xad, 0x5b, 0x1b, 0x7f, 0x86, 0xbb, 0xd9, 0x38, 0xea, 0xbb, 0xe8, 0x6d, 0xf7, - 0xfd, 0xef, 0xcf, 0xeb, 0xe8, 0xf9, 0x79, 0x1d, 0xfd, 0x74, 0x5e, 0x47, 0xbf, 0x9d, 0xd7, 0x11, - 0xae, 0x31, 0xb1, 0x14, 0x96, 0x4a, 0x7c, 0xb1, 0xd8, 0xf8, 0x86, 0x5b, 0x18, 0x86, 0xfa, 0x30, - 0xf1, 0xfb, 0x10, 0x7d, 0x85, 0xd0, 0xf8, 0xa6, 0xf5, 0xfe, 0xce, 0xdf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x30, 0xb2, 0x88, 0xf1, 0xe9, 0x06, 0x00, 0x00, -} - -func (this *Listener) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Listener) - if !ok { - that2, ok := that.(Listener) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !this.Address.Equal(&that1.Address) { - return false - } - if len(this.FilterChains) != len(that1.FilterChains) { - return false - } - for i := range this.FilterChains { - if !this.FilterChains[i].Equal(&that1.FilterChains[i]) { - return false - } - } - if !this.UseOriginalDst.Equal(that1.UseOriginalDst) { - return false - } - if !this.PerConnectionBufferLimitBytes.Equal(that1.PerConnectionBufferLimitBytes) { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !this.DeprecatedV1.Equal(that1.DeprecatedV1) { - return false - } - if this.DrainType != that1.DrainType { - return false - } - if len(this.ListenerFilters) != len(that1.ListenerFilters) { - return false - } - for i := range this.ListenerFilters { - if !this.ListenerFilters[i].Equal(&that1.ListenerFilters[i]) { - return false - } - } - if this.ListenerFiltersTimeout != nil && that1.ListenerFiltersTimeout != nil { - if *this.ListenerFiltersTimeout != *that1.ListenerFiltersTimeout { - return false - } - } else if this.ListenerFiltersTimeout != nil { - return false - } else if that1.ListenerFiltersTimeout != nil { - return false - } - if !this.Transparent.Equal(that1.Transparent) { - return false - } - if !this.Freebind.Equal(that1.Freebind) { - return false - } - if len(this.SocketOptions) != len(that1.SocketOptions) { - return false - } - for i := range this.SocketOptions { - if !this.SocketOptions[i].Equal(that1.SocketOptions[i]) { - return false - } - } - if !this.TcpFastOpenQueueLength.Equal(that1.TcpFastOpenQueueLength) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Listener_DeprecatedV1) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Listener_DeprecatedV1) - if !ok { - that2, ok := that.(Listener_DeprecatedV1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.BindToPort.Equal(that1.BindToPort) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + // 394 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xbd, 0x4e, 0xe3, 0x40, + 0x14, 0x85, 0xd7, 0x59, 0x6d, 0x36, 0x1a, 0xad, 0xb2, 0xc8, 0x12, 0x84, 0x38, 0x3f, 0xa0, 0x40, + 0x11, 0x51, 0xd8, 0x28, 0xe9, 0x52, 0x46, 0x11, 0x55, 0x8a, 0x88, 0x50, 0xd0, 0x4e, 0xec, 0x4b, + 0x18, 0xc9, 0xf6, 0x0c, 0x33, 0x63, 0x83, 0x45, 0x83, 0xa8, 0x10, 0x0d, 0x05, 0x12, 0xe2, 0x01, + 0x78, 0x0a, 0x9e, 0x80, 0x16, 0xf1, 0x0a, 0x3c, 0x01, 0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, + 0x7f, 0x2f, 0x12, 0x8c, 0xfa, 0x02, 0x1a, 0xbf, 0x9a, 0xda, 0xae, 0xa6, 0x1f, 0xa2, 0xff, 0x43, + 0xc9, 0x01, 0x7b, 0xf3, 0x1d, 0xf5, 0x85, 0xf1, 0x45, 0xfb, 0x8d, 0xa5, 0x3c, 0xe3, 0x7c, 0x8e, + 0x8a, 0x7b, 0x20, 0xed, 0xe3, 0x1f, 0x34, 0x6e, 0x5e, 0xbe, 0xbc, 0xde, 0xe6, 0xca, 0x8d, 0x52, + 0xe6, 0x57, 0xea, 0xa8, 0x78, 0x45, 0x8c, 0x7f, 0x77, 0xb4, 0x1d, 0xa3, 0x76, 0xfd, 0x70, 0x37, + 0xf9, 0x5b, 0x42, 0xab, 0x19, 0x47, 0x75, 0x4a, 0xf7, 0xe0, 0xed, 0xfe, 0xfd, 0xe6, 0x4f, 0x45, + 0x2f, 0x27, 0x58, 0x24, 0x79, 0x9b, 0xb3, 0x9e, 0xc2, 0xf6, 0xe3, 0xc5, 0xd3, 0x73, 0x3e, 0xb7, + 0xa2, 0x21, 0x83, 0xd0, 0xe4, 0x2c, 0xc6, 0xe9, 0x59, 0x94, 0xb9, 0xb0, 0x3b, 0xad, 0x71, 0x30, + 0xad, 0x74, 0xa0, 0x5d, 0x69, 0xda, 0xa0, 0x30, 0xca, 0xc7, 0x05, 0xb7, 0x3f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x34, 0x66, 0x06, 0x72, 0x1b, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -549,6 +108,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ListenerDiscoveryServiceClient interface { + DeltaListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_DeltaListenersClient, error) StreamListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_StreamListenersClient, error) FetchListeners(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) } @@ -561,8 +121,39 @@ func NewListenerDiscoveryServiceClient(cc *grpc.ClientConn) ListenerDiscoverySer return &listenerDiscoveryServiceClient{cc} } +func (c *listenerDiscoveryServiceClient) DeltaListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_DeltaListenersClient, error) { + stream, err := c.cc.NewStream(ctx, &_ListenerDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ListenerDiscoveryService/DeltaListeners", opts...) + if err != nil { + return nil, err + } + x := &listenerDiscoveryServiceDeltaListenersClient{stream} + return x, nil +} + +type ListenerDiscoveryService_DeltaListenersClient interface { + Send(*DeltaDiscoveryRequest) error + Recv() (*DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type listenerDiscoveryServiceDeltaListenersClient struct { + grpc.ClientStream +} + +func (x *listenerDiscoveryServiceDeltaListenersClient) Send(m *DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *listenerDiscoveryServiceDeltaListenersClient) Recv() (*DeltaDiscoveryResponse, error) { + m := new(DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *listenerDiscoveryServiceClient) StreamListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_StreamListenersClient, error) { - stream, err := c.cc.NewStream(ctx, &_ListenerDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ListenerDiscoveryService/StreamListeners", opts...) + stream, err := c.cc.NewStream(ctx, &_ListenerDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.ListenerDiscoveryService/StreamListeners", opts...) if err != nil { return nil, err } @@ -603,14 +194,55 @@ func (c *listenerDiscoveryServiceClient) FetchListeners(ctx context.Context, in // ListenerDiscoveryServiceServer is the server API for ListenerDiscoveryService service. type ListenerDiscoveryServiceServer interface { + DeltaListeners(ListenerDiscoveryService_DeltaListenersServer) error StreamListeners(ListenerDiscoveryService_StreamListenersServer) error FetchListeners(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) } +// UnimplementedListenerDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedListenerDiscoveryServiceServer struct { +} + +func (*UnimplementedListenerDiscoveryServiceServer) DeltaListeners(srv ListenerDiscoveryService_DeltaListenersServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaListeners not implemented") +} +func (*UnimplementedListenerDiscoveryServiceServer) StreamListeners(srv ListenerDiscoveryService_StreamListenersServer) error { + return status.Errorf(codes.Unimplemented, "method StreamListeners not implemented") +} +func (*UnimplementedListenerDiscoveryServiceServer) FetchListeners(ctx context.Context, req *DiscoveryRequest) (*DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchListeners not implemented") +} + func RegisterListenerDiscoveryServiceServer(s *grpc.Server, srv ListenerDiscoveryServiceServer) { s.RegisterService(&_ListenerDiscoveryService_serviceDesc, srv) } +func _ListenerDiscoveryService_DeltaListeners_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ListenerDiscoveryServiceServer).DeltaListeners(&listenerDiscoveryServiceDeltaListenersServer{stream}) +} + +type ListenerDiscoveryService_DeltaListenersServer interface { + Send(*DeltaDiscoveryResponse) error + Recv() (*DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type listenerDiscoveryServiceDeltaListenersServer struct { + grpc.ServerStream +} + +func (x *listenerDiscoveryServiceDeltaListenersServer) Send(m *DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *listenerDiscoveryServiceDeltaListenersServer) Recv() (*DeltaDiscoveryRequest, error) { + m := new(DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _ListenerDiscoveryService_StreamListeners_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(ListenerDiscoveryServiceServer).StreamListeners(&listenerDiscoveryServiceStreamListenersServer{stream}) } @@ -665,6 +297,12 @@ var _ListenerDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{ + { + StreamName: "DeltaListeners", + Handler: _ListenerDiscoveryService_DeltaListeners_Handler, + ServerStreams: true, + ClientStreams: true, + }, { StreamName: "StreamListeners", Handler: _ListenerDiscoveryService_StreamListeners_Handler, @@ -674,1028 +312,3 @@ var _ListenerDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, Metadata: "envoy/api/v2/lds.proto", } - -func (m *Listener) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Listener) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLds(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintLds(dAtA, i, uint64(m.Address.Size())) - n1, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.FilterChains) > 0 { - for _, msg := range m.FilterChains { - dAtA[i] = 0x1a - i++ - i = encodeVarintLds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.UseOriginalDst != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintLds(dAtA, i, uint64(m.UseOriginalDst.Size())) - n2, err := m.UseOriginalDst.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.PerConnectionBufferLimitBytes != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintLds(dAtA, i, uint64(m.PerConnectionBufferLimitBytes.Size())) - n3, err := m.PerConnectionBufferLimitBytes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Metadata != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintLds(dAtA, i, uint64(m.Metadata.Size())) - n4, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.DeprecatedV1 != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintLds(dAtA, i, uint64(m.DeprecatedV1.Size())) - n5, err := m.DeprecatedV1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.DrainType != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintLds(dAtA, i, uint64(m.DrainType)) - } - if len(m.ListenerFilters) > 0 { - for _, msg := range m.ListenerFilters { - dAtA[i] = 0x4a - i++ - i = encodeVarintLds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Transparent != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintLds(dAtA, i, uint64(m.Transparent.Size())) - n6, err := m.Transparent.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.Freebind != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintLds(dAtA, i, uint64(m.Freebind.Size())) - n7, err := m.Freebind.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.TcpFastOpenQueueLength != nil { - dAtA[i] = 0x62 - i++ - i = encodeVarintLds(dAtA, i, uint64(m.TcpFastOpenQueueLength.Size())) - n8, err := m.TcpFastOpenQueueLength.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if len(m.SocketOptions) > 0 { - for _, msg := range m.SocketOptions { - dAtA[i] = 0x6a - i++ - i = encodeVarintLds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.ListenerFiltersTimeout != nil { - dAtA[i] = 0x7a - i++ - i = encodeVarintLds(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ListenerFiltersTimeout))) - n9, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ListenerFiltersTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Listener_DeprecatedV1) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Listener_DeprecatedV1) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.BindToPort != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintLds(dAtA, i, uint64(m.BindToPort.Size())) - n10, err := m.BindToPort.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintLds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Listener) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovLds(uint64(l)) - } - l = m.Address.Size() - n += 1 + l + sovLds(uint64(l)) - if len(m.FilterChains) > 0 { - for _, e := range m.FilterChains { - l = e.Size() - n += 1 + l + sovLds(uint64(l)) - } - } - if m.UseOriginalDst != nil { - l = m.UseOriginalDst.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.PerConnectionBufferLimitBytes != nil { - l = m.PerConnectionBufferLimitBytes.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.DeprecatedV1 != nil { - l = m.DeprecatedV1.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.DrainType != 0 { - n += 1 + sovLds(uint64(m.DrainType)) - } - if len(m.ListenerFilters) > 0 { - for _, e := range m.ListenerFilters { - l = e.Size() - n += 1 + l + sovLds(uint64(l)) - } - } - if m.Transparent != nil { - l = m.Transparent.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.Freebind != nil { - l = m.Freebind.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.TcpFastOpenQueueLength != nil { - l = m.TcpFastOpenQueueLength.Size() - n += 1 + l + sovLds(uint64(l)) - } - if len(m.SocketOptions) > 0 { - for _, e := range m.SocketOptions { - l = e.Size() - n += 1 + l + sovLds(uint64(l)) - } - } - if m.ListenerFiltersTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ListenerFiltersTimeout) - n += 1 + l + sovLds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Listener_DeprecatedV1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BindToPort != nil { - l = m.BindToPort.Size() - n += 1 + l + sovLds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovLds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozLds(x uint64) (n int) { - return sovLds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Listener) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Listener: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Listener: 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 ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLds - } - 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 Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterChains", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilterChains = append(m.FilterChains, listener.FilterChain{}) - if err := m.FilterChains[len(m.FilterChains)-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 UseOriginalDst", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UseOriginalDst == nil { - m.UseOriginalDst = &types.BoolValue{} - } - if err := m.UseOriginalDst.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerConnectionBufferLimitBytes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerConnectionBufferLimitBytes == nil { - m.PerConnectionBufferLimitBytes = &types.UInt32Value{} - } - if err := m.PerConnectionBufferLimitBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &core.Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DeprecatedV1 == nil { - m.DeprecatedV1 = &Listener_DeprecatedV1{} - } - if err := m.DeprecatedV1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DrainType", wireType) - } - m.DrainType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DrainType |= Listener_DrainType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListenerFilters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ListenerFilters = append(m.ListenerFilters, listener.ListenerFilter{}) - if err := m.ListenerFilters[len(m.ListenerFilters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transparent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Transparent == nil { - m.Transparent = &types.BoolValue{} - } - if err := m.Transparent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Freebind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Freebind == nil { - m.Freebind = &types.BoolValue{} - } - if err := m.Freebind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TcpFastOpenQueueLength", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TcpFastOpenQueueLength == nil { - m.TcpFastOpenQueueLength = &types.UInt32Value{} - } - if err := m.TcpFastOpenQueueLength.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SocketOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SocketOptions = append(m.SocketOptions, &core.SocketOption{}) - if err := m.SocketOptions[len(m.SocketOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListenerFiltersTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ListenerFiltersTimeout == nil { - m.ListenerFiltersTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.ListenerFiltersTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLds - } - 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 *Listener_DeprecatedV1) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeprecatedV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeprecatedV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BindToPort", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BindToPort == nil { - m.BindToPort = &types.BoolValue{} - } - if err := m.BindToPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthLds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthLds - } - 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 skipLds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLds - } - 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, ErrIntOverflowLds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLds - } - 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, ErrInvalidLengthLds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthLds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipLds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthLds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthLds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go index 183f736f53..c0496fddb6 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/lds.proto -package v2 +package envoy_api_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,228 +30,25 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on Listener with the rules defined in the +// define the regex for a UUID once up-front +var _lds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on LdsDummy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. -func (m *Listener) Validate() error { +func (m *LdsDummy) Validate() error { if m == nil { return nil } - // no validation rules for Name - - { - tmp := m.GetAddress() - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if len(m.GetFilterChains()) < 1 { - return ListenerValidationError{ - field: "FilterChains", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetFilterChains() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("FilterChains[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetUseOriginalDst() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "UseOriginalDst", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetPerConnectionBufferLimitBytes() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetDeprecatedV1() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "DeprecatedV1", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for DrainType - - for idx, item := range m.GetListenerFilters() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("ListenerFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetListenerFiltersTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "ListenerFiltersTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetTransparent() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Transparent", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetFreebind() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - for idx, item := range m.GetSocketOptions() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetTcpFastOpenQueueLength() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "TcpFastOpenQueueLength", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - return nil } -// ListenerValidationError is the validation error returned by -// Listener.Validate if the designated constraints aren't met. -type ListenerValidationError struct { +// LdsDummyValidationError is the validation error returned by +// LdsDummy.Validate if the designated constraints aren't met. +type LdsDummyValidationError struct { field string reason string cause error @@ -259,22 +56,22 @@ type ListenerValidationError struct { } // Field function returns field value. -func (e ListenerValidationError) Field() string { return e.field } +func (e LdsDummyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ListenerValidationError) Reason() string { return e.reason } +func (e LdsDummyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ListenerValidationError) Cause() error { return e.cause } +func (e LdsDummyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ListenerValidationError) Key() bool { return e.key } +func (e LdsDummyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ListenerValidationError) ErrorName() string { return "ListenerValidationError" } +func (e LdsDummyValidationError) ErrorName() string { return "LdsDummyValidationError" } // Error satisfies the builtin error interface -func (e ListenerValidationError) Error() string { +func (e LdsDummyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -286,14 +83,14 @@ func (e ListenerValidationError) Error() string { } return fmt.Sprintf( - "invalid %sListener.%s: %s%s", + "invalid %sLdsDummy.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ListenerValidationError{} +var _ error = LdsDummyValidationError{} var _ interface { Field() string @@ -301,86 +98,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ListenerValidationError{} - -// Validate checks the field values on Listener_DeprecatedV1 with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *Listener_DeprecatedV1) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetBindToPort() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return Listener_DeprecatedV1ValidationError{ - field: "BindToPort", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// Listener_DeprecatedV1ValidationError is the validation error returned by -// Listener_DeprecatedV1.Validate if the designated constraints aren't met. -type Listener_DeprecatedV1ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Listener_DeprecatedV1ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Listener_DeprecatedV1ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Listener_DeprecatedV1ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Listener_DeprecatedV1ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Listener_DeprecatedV1ValidationError) ErrorName() string { - return "Listener_DeprecatedV1ValidationError" -} - -// Error satisfies the builtin error interface -func (e Listener_DeprecatedV1ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListener_DeprecatedV1.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Listener_DeprecatedV1ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Listener_DeprecatedV1ValidationError{} +} = LdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go new file mode 100644 index 0000000000..1bf8d8f737 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go @@ -0,0 +1,475 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/listener.proto + +package envoy_api_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + listener "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener" + v21 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2" + v2 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v2" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + _ "google.golang.org/genproto/googleapis/api/annotations" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type Listener_DrainType int32 + +const ( + Listener_DEFAULT Listener_DrainType = 0 + Listener_MODIFY_ONLY Listener_DrainType = 1 +) + +var Listener_DrainType_name = map[int32]string{ + 0: "DEFAULT", + 1: "MODIFY_ONLY", +} + +var Listener_DrainType_value = map[string]int32{ + "DEFAULT": 0, + "MODIFY_ONLY": 1, +} + +func (x Listener_DrainType) String() string { + return proto.EnumName(Listener_DrainType_name, int32(x)) +} + +func (Listener_DrainType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0f8f4b6e66505502, []int{0, 0} +} + +type Listener struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Address *core.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + FilterChains []*listener.FilterChain `protobuf:"bytes,3,rep,name=filter_chains,json=filterChains,proto3" json:"filter_chains,omitempty"` + UseOriginalDst *wrappers.BoolValue `protobuf:"bytes,4,opt,name=use_original_dst,json=useOriginalDst,proto3" json:"use_original_dst,omitempty"` // Deprecated: Do not use. + PerConnectionBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` + Metadata *core.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + DeprecatedV1 *Listener_DeprecatedV1 `protobuf:"bytes,7,opt,name=deprecated_v1,json=deprecatedV1,proto3" json:"deprecated_v1,omitempty"` + DrainType Listener_DrainType `protobuf:"varint,8,opt,name=drain_type,json=drainType,proto3,enum=envoy.api.v2.Listener_DrainType" json:"drain_type,omitempty"` + ListenerFilters []*listener.ListenerFilter `protobuf:"bytes,9,rep,name=listener_filters,json=listenerFilters,proto3" json:"listener_filters,omitempty"` + ListenerFiltersTimeout *duration.Duration `protobuf:"bytes,15,opt,name=listener_filters_timeout,json=listenerFiltersTimeout,proto3" json:"listener_filters_timeout,omitempty"` + ContinueOnListenerFiltersTimeout bool `protobuf:"varint,17,opt,name=continue_on_listener_filters_timeout,json=continueOnListenerFiltersTimeout,proto3" json:"continue_on_listener_filters_timeout,omitempty"` + Transparent *wrappers.BoolValue `protobuf:"bytes,10,opt,name=transparent,proto3" json:"transparent,omitempty"` + Freebind *wrappers.BoolValue `protobuf:"bytes,11,opt,name=freebind,proto3" json:"freebind,omitempty"` + SocketOptions []*core.SocketOption `protobuf:"bytes,13,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` + TcpFastOpenQueueLength *wrappers.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength,proto3" json:"tcp_fast_open_queue_length,omitempty"` + TrafficDirection core.TrafficDirection `protobuf:"varint,16,opt,name=traffic_direction,json=trafficDirection,proto3,enum=envoy.api.v2.core.TrafficDirection" json:"traffic_direction,omitempty"` + UdpListenerConfig *listener.UdpListenerConfig `protobuf:"bytes,18,opt,name=udp_listener_config,json=udpListenerConfig,proto3" json:"udp_listener_config,omitempty"` + ApiListener *v2.ApiListener `protobuf:"bytes,19,opt,name=api_listener,json=apiListener,proto3" json:"api_listener,omitempty"` + ConnectionBalanceConfig *Listener_ConnectionBalanceConfig `protobuf:"bytes,20,opt,name=connection_balance_config,json=connectionBalanceConfig,proto3" json:"connection_balance_config,omitempty"` + ReusePort bool `protobuf:"varint,21,opt,name=reuse_port,json=reusePort,proto3" json:"reuse_port,omitempty"` + AccessLog []*v21.AccessLog `protobuf:"bytes,22,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Listener) Reset() { *m = Listener{} } +func (m *Listener) String() string { return proto.CompactTextString(m) } +func (*Listener) ProtoMessage() {} +func (*Listener) Descriptor() ([]byte, []int) { + return fileDescriptor_0f8f4b6e66505502, []int{0} +} + +func (m *Listener) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Listener.Unmarshal(m, b) +} +func (m *Listener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Listener.Marshal(b, m, deterministic) +} +func (m *Listener) XXX_Merge(src proto.Message) { + xxx_messageInfo_Listener.Merge(m, src) +} +func (m *Listener) XXX_Size() int { + return xxx_messageInfo_Listener.Size(m) +} +func (m *Listener) XXX_DiscardUnknown() { + xxx_messageInfo_Listener.DiscardUnknown(m) +} + +var xxx_messageInfo_Listener proto.InternalMessageInfo + +func (m *Listener) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Listener) GetAddress() *core.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *Listener) GetFilterChains() []*listener.FilterChain { + if m != nil { + return m.FilterChains + } + return nil +} + +// Deprecated: Do not use. +func (m *Listener) GetUseOriginalDst() *wrappers.BoolValue { + if m != nil { + return m.UseOriginalDst + } + return nil +} + +func (m *Listener) GetPerConnectionBufferLimitBytes() *wrappers.UInt32Value { + if m != nil { + return m.PerConnectionBufferLimitBytes + } + return nil +} + +func (m *Listener) GetMetadata() *core.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Listener) GetDeprecatedV1() *Listener_DeprecatedV1 { + if m != nil { + return m.DeprecatedV1 + } + return nil +} + +func (m *Listener) GetDrainType() Listener_DrainType { + if m != nil { + return m.DrainType + } + return Listener_DEFAULT +} + +func (m *Listener) GetListenerFilters() []*listener.ListenerFilter { + if m != nil { + return m.ListenerFilters + } + return nil +} + +func (m *Listener) GetListenerFiltersTimeout() *duration.Duration { + if m != nil { + return m.ListenerFiltersTimeout + } + return nil +} + +func (m *Listener) GetContinueOnListenerFiltersTimeout() bool { + if m != nil { + return m.ContinueOnListenerFiltersTimeout + } + return false +} + +func (m *Listener) GetTransparent() *wrappers.BoolValue { + if m != nil { + return m.Transparent + } + return nil +} + +func (m *Listener) GetFreebind() *wrappers.BoolValue { + if m != nil { + return m.Freebind + } + return nil +} + +func (m *Listener) GetSocketOptions() []*core.SocketOption { + if m != nil { + return m.SocketOptions + } + return nil +} + +func (m *Listener) GetTcpFastOpenQueueLength() *wrappers.UInt32Value { + if m != nil { + return m.TcpFastOpenQueueLength + } + return nil +} + +func (m *Listener) GetTrafficDirection() core.TrafficDirection { + if m != nil { + return m.TrafficDirection + } + return core.TrafficDirection_UNSPECIFIED +} + +func (m *Listener) GetUdpListenerConfig() *listener.UdpListenerConfig { + if m != nil { + return m.UdpListenerConfig + } + return nil +} + +func (m *Listener) GetApiListener() *v2.ApiListener { + if m != nil { + return m.ApiListener + } + return nil +} + +func (m *Listener) GetConnectionBalanceConfig() *Listener_ConnectionBalanceConfig { + if m != nil { + return m.ConnectionBalanceConfig + } + return nil +} + +func (m *Listener) GetReusePort() bool { + if m != nil { + return m.ReusePort + } + return false +} + +func (m *Listener) GetAccessLog() []*v21.AccessLog { + if m != nil { + return m.AccessLog + } + return nil +} + +type Listener_DeprecatedV1 struct { + BindToPort *wrappers.BoolValue `protobuf:"bytes,1,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Listener_DeprecatedV1) Reset() { *m = Listener_DeprecatedV1{} } +func (m *Listener_DeprecatedV1) String() string { return proto.CompactTextString(m) } +func (*Listener_DeprecatedV1) ProtoMessage() {} +func (*Listener_DeprecatedV1) Descriptor() ([]byte, []int) { + return fileDescriptor_0f8f4b6e66505502, []int{0, 0} +} + +func (m *Listener_DeprecatedV1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Listener_DeprecatedV1.Unmarshal(m, b) +} +func (m *Listener_DeprecatedV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Listener_DeprecatedV1.Marshal(b, m, deterministic) +} +func (m *Listener_DeprecatedV1) XXX_Merge(src proto.Message) { + xxx_messageInfo_Listener_DeprecatedV1.Merge(m, src) +} +func (m *Listener_DeprecatedV1) XXX_Size() int { + return xxx_messageInfo_Listener_DeprecatedV1.Size(m) +} +func (m *Listener_DeprecatedV1) XXX_DiscardUnknown() { + xxx_messageInfo_Listener_DeprecatedV1.DiscardUnknown(m) +} + +var xxx_messageInfo_Listener_DeprecatedV1 proto.InternalMessageInfo + +func (m *Listener_DeprecatedV1) GetBindToPort() *wrappers.BoolValue { + if m != nil { + return m.BindToPort + } + return nil +} + +type Listener_ConnectionBalanceConfig struct { + // Types that are valid to be assigned to BalanceType: + // *Listener_ConnectionBalanceConfig_ExactBalance_ + BalanceType isListener_ConnectionBalanceConfig_BalanceType `protobuf_oneof:"balance_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Listener_ConnectionBalanceConfig) Reset() { *m = Listener_ConnectionBalanceConfig{} } +func (m *Listener_ConnectionBalanceConfig) String() string { return proto.CompactTextString(m) } +func (*Listener_ConnectionBalanceConfig) ProtoMessage() {} +func (*Listener_ConnectionBalanceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0f8f4b6e66505502, []int{0, 1} +} + +func (m *Listener_ConnectionBalanceConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Listener_ConnectionBalanceConfig.Unmarshal(m, b) +} +func (m *Listener_ConnectionBalanceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Listener_ConnectionBalanceConfig.Marshal(b, m, deterministic) +} +func (m *Listener_ConnectionBalanceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_Listener_ConnectionBalanceConfig.Merge(m, src) +} +func (m *Listener_ConnectionBalanceConfig) XXX_Size() int { + return xxx_messageInfo_Listener_ConnectionBalanceConfig.Size(m) +} +func (m *Listener_ConnectionBalanceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_Listener_ConnectionBalanceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_Listener_ConnectionBalanceConfig proto.InternalMessageInfo + +type isListener_ConnectionBalanceConfig_BalanceType interface { + isListener_ConnectionBalanceConfig_BalanceType() +} + +type Listener_ConnectionBalanceConfig_ExactBalance_ struct { + ExactBalance *Listener_ConnectionBalanceConfig_ExactBalance `protobuf:"bytes,1,opt,name=exact_balance,json=exactBalance,proto3,oneof"` +} + +func (*Listener_ConnectionBalanceConfig_ExactBalance_) isListener_ConnectionBalanceConfig_BalanceType() { +} + +func (m *Listener_ConnectionBalanceConfig) GetBalanceType() isListener_ConnectionBalanceConfig_BalanceType { + if m != nil { + return m.BalanceType + } + return nil +} + +func (m *Listener_ConnectionBalanceConfig) GetExactBalance() *Listener_ConnectionBalanceConfig_ExactBalance { + if x, ok := m.GetBalanceType().(*Listener_ConnectionBalanceConfig_ExactBalance_); ok { + return x.ExactBalance + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Listener_ConnectionBalanceConfig) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Listener_ConnectionBalanceConfig_ExactBalance_)(nil), + } +} + +type Listener_ConnectionBalanceConfig_ExactBalance struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Listener_ConnectionBalanceConfig_ExactBalance) Reset() { + *m = Listener_ConnectionBalanceConfig_ExactBalance{} +} +func (m *Listener_ConnectionBalanceConfig_ExactBalance) String() string { + return proto.CompactTextString(m) +} +func (*Listener_ConnectionBalanceConfig_ExactBalance) ProtoMessage() {} +func (*Listener_ConnectionBalanceConfig_ExactBalance) Descriptor() ([]byte, []int) { + return fileDescriptor_0f8f4b6e66505502, []int{0, 1, 0} +} + +func (m *Listener_ConnectionBalanceConfig_ExactBalance) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Listener_ConnectionBalanceConfig_ExactBalance.Unmarshal(m, b) +} +func (m *Listener_ConnectionBalanceConfig_ExactBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Listener_ConnectionBalanceConfig_ExactBalance.Marshal(b, m, deterministic) +} +func (m *Listener_ConnectionBalanceConfig_ExactBalance) XXX_Merge(src proto.Message) { + xxx_messageInfo_Listener_ConnectionBalanceConfig_ExactBalance.Merge(m, src) +} +func (m *Listener_ConnectionBalanceConfig_ExactBalance) XXX_Size() int { + return xxx_messageInfo_Listener_ConnectionBalanceConfig_ExactBalance.Size(m) +} +func (m *Listener_ConnectionBalanceConfig_ExactBalance) XXX_DiscardUnknown() { + xxx_messageInfo_Listener_ConnectionBalanceConfig_ExactBalance.DiscardUnknown(m) +} + +var xxx_messageInfo_Listener_ConnectionBalanceConfig_ExactBalance proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("envoy.api.v2.Listener_DrainType", Listener_DrainType_name, Listener_DrainType_value) + proto.RegisterType((*Listener)(nil), "envoy.api.v2.Listener") + proto.RegisterType((*Listener_DeprecatedV1)(nil), "envoy.api.v2.Listener.DeprecatedV1") + proto.RegisterType((*Listener_ConnectionBalanceConfig)(nil), "envoy.api.v2.Listener.ConnectionBalanceConfig") + proto.RegisterType((*Listener_ConnectionBalanceConfig_ExactBalance)(nil), "envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance") +} + +func init() { proto.RegisterFile("envoy/api/v2/listener.proto", fileDescriptor_0f8f4b6e66505502) } + +var fileDescriptor_0f8f4b6e66505502 = []byte{ + // 1046 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x73, 0x1b, 0xb5, + 0x1b, 0xef, 0xa6, 0x79, 0xb1, 0xe5, 0x97, 0x38, 0xca, 0xff, 0x9f, 0x6c, 0xdd, 0x84, 0x9a, 0x94, + 0xce, 0x98, 0xe9, 0xcc, 0x9a, 0x3a, 0x33, 0x70, 0xa0, 0x03, 0x13, 0xc7, 0x0d, 0x69, 0xc7, 0xad, + 0xc3, 0x36, 0xe9, 0xb4, 0x27, 0x8d, 0xbc, 0xab, 0x75, 0x05, 0x6b, 0x49, 0x48, 0x5a, 0xd3, 0xdc, + 0x38, 0x73, 0xe1, 0xca, 0x85, 0x0b, 0x1f, 0x83, 0x4f, 0xc0, 0x95, 0xaf, 0xc2, 0x89, 0xe1, 0xc0, + 0x30, 0xab, 0x7d, 0xc9, 0x3a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0x1c, 0xfe, 0xf2, 0xdd, 0xaf, 0xbf, 0xad, 0xaf, 0x34, 0x2c, + 0xd0, 0xa4, 0x3c, 0x49, 0x47, 0x48, 0xfe, 0xee, 0x72, 0x26, 0xb3, 0x5e, 0x2d, 0x4b, 0xed, 0x2c, + 0xae, 0xe1, 0x99, 0x35, 0x5a, 0x37, 0xc5, 0x3c, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xcc, + 0xae, 0xe0, 0x87, 0x09, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go new file mode 100644 index 0000000000..d96e181b12 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go @@ -0,0 +1,538 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/listener.proto + +package envoy_api_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" + + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" +) + +// 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) + _ = ptypes.DynamicAny{} + + _ = core.TrafficDirection(0) +) + +// define the regex for a UUID once up-front +var _listener_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on Listener with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Listener) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + if m.GetAddress() == nil { + return ListenerValidationError{ + field: "Address", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetFilterChains() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: fmt.Sprintf("FilterChains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetUseOriginalDst()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "UseOriginalDst", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "PerConnectionBufferLimitBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DrainType + + for idx, item := range m.GetListenerFilters() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: fmt.Sprintf("ListenerFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetListenerFiltersTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "ListenerFiltersTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ContinueOnListenerFiltersTimeout + + if v, ok := interface{}(m.GetTransparent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "Transparent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "Freebind", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetSocketOptions() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: fmt.Sprintf("SocketOptions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetTcpFastOpenQueueLength()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "TcpFastOpenQueueLength", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TrafficDirection + + if v, ok := interface{}(m.GetUdpListenerConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "UdpListenerConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetConnectionBalanceConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: "ConnectionBalanceConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ReusePort + + for idx, item := range m.GetAccessLog() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ListenerValidationError is the validation error returned by +// Listener.Validate if the designated constraints aren't met. +type ListenerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenerValidationError) ErrorName() string { return "ListenerValidationError" } + +// Error satisfies the builtin error interface +func (e ListenerValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListener.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenerValidationError{} + +// Validate checks the field values on Listener_DeprecatedV1 with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Listener_DeprecatedV1) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Listener_DeprecatedV1ValidationError{ + field: "BindToPort", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Listener_DeprecatedV1ValidationError is the validation error returned by +// Listener_DeprecatedV1.Validate if the designated constraints aren't met. +type Listener_DeprecatedV1ValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Listener_DeprecatedV1ValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Listener_DeprecatedV1ValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Listener_DeprecatedV1ValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Listener_DeprecatedV1ValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Listener_DeprecatedV1ValidationError) ErrorName() string { + return "Listener_DeprecatedV1ValidationError" +} + +// Error satisfies the builtin error interface +func (e Listener_DeprecatedV1ValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListener_DeprecatedV1.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Listener_DeprecatedV1ValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Listener_DeprecatedV1ValidationError{} + +// Validate checks the field values on Listener_ConnectionBalanceConfig with +// the rules defined in the proto definition for this message. If any rules +// are violated, an error is returned. +func (m *Listener_ConnectionBalanceConfig) Validate() error { + if m == nil { + return nil + } + + switch m.BalanceType.(type) { + + case *Listener_ConnectionBalanceConfig_ExactBalance_: + + if v, ok := interface{}(m.GetExactBalance()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Listener_ConnectionBalanceConfigValidationError{ + field: "ExactBalance", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return Listener_ConnectionBalanceConfigValidationError{ + field: "BalanceType", + reason: "value is required", + } + + } + + return nil +} + +// Listener_ConnectionBalanceConfigValidationError is the validation error +// returned by Listener_ConnectionBalanceConfig.Validate if the designated +// constraints aren't met. +type Listener_ConnectionBalanceConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Listener_ConnectionBalanceConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Listener_ConnectionBalanceConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Listener_ConnectionBalanceConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Listener_ConnectionBalanceConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Listener_ConnectionBalanceConfigValidationError) ErrorName() string { + return "Listener_ConnectionBalanceConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Listener_ConnectionBalanceConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListener_ConnectionBalanceConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Listener_ConnectionBalanceConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Listener_ConnectionBalanceConfigValidationError{} + +// Validate checks the field values on +// Listener_ConnectionBalanceConfig_ExactBalance with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Listener_ConnectionBalanceConfig_ExactBalance) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// Listener_ConnectionBalanceConfig_ExactBalanceValidationError is the +// validation error returned by +// Listener_ConnectionBalanceConfig_ExactBalance.Validate if the designated +// constraints aren't met. +type Listener_ConnectionBalanceConfig_ExactBalanceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) ErrorName() string { + return "Listener_ConnectionBalanceConfig_ExactBalanceValidationError" +} + +// Error satisfies the builtin error interface +func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListener_ConnectionBalanceConfig_ExactBalance.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Listener_ConnectionBalanceConfig_ExactBalanceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Listener_ConnectionBalanceConfig_ExactBalanceValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go index 37fb18d8bf..b99225336f 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go @@ -1,21 +1,13 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/listener/listener.proto -package listener +package envoy_api_v2_listener import ( - bytes "bytes" fmt "fmt" - io "io" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - - auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,2662 +19,23 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -type FilterChainMatch_ConnectionSourceType int32 - -const ( - // Any connection source matches. - FilterChainMatch_ANY FilterChainMatch_ConnectionSourceType = 0 - // Match a connection originating from the same host. - FilterChainMatch_LOCAL FilterChainMatch_ConnectionSourceType = 1 - // Match a connection originating from a different host. - FilterChainMatch_EXTERNAL FilterChainMatch_ConnectionSourceType = 2 -) - -var FilterChainMatch_ConnectionSourceType_name = map[int32]string{ - 0: "ANY", - 1: "LOCAL", - 2: "EXTERNAL", -} - -var FilterChainMatch_ConnectionSourceType_value = map[string]int32{ - "ANY": 0, - "LOCAL": 1, - "EXTERNAL": 2, -} - -func (x FilterChainMatch_ConnectionSourceType) String() string { - return proto.EnumName(FilterChainMatch_ConnectionSourceType_name, int32(x)) -} - -func (FilterChainMatch_ConnectionSourceType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0ced541f18749edd, []int{1, 0} -} - -type Filter struct { - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(mattklein123): Auto generate the following list] - // * :ref:`envoy.client_ssl_auth` - // * :ref:`envoy.echo ` - // * :ref:`envoy.http_connection_manager ` - // * :ref:`envoy.mongo_proxy ` - // * :ref:`envoy.ratelimit ` - // * :ref:`envoy.redis_proxy ` - // * :ref:`envoy.tcp_proxy ` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - // - // Types that are valid to be assigned to ConfigType: - // *Filter_Config - // *Filter_TypedConfig - ConfigType isFilter_ConfigType `protobuf_oneof:"config_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Filter) Reset() { *m = Filter{} } -func (m *Filter) String() string { return proto.CompactTextString(m) } -func (*Filter) ProtoMessage() {} -func (*Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_0ced541f18749edd, []int{0} -} -func (m *Filter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Filter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Filter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Filter.Merge(m, src) -} -func (m *Filter) XXX_Size() int { - return m.Size() -} -func (m *Filter) XXX_DiscardUnknown() { - xxx_messageInfo_Filter.DiscardUnknown(m) -} - -var xxx_messageInfo_Filter proto.InternalMessageInfo - -type isFilter_ConfigType interface { - isFilter_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type Filter_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type Filter_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*Filter_Config) isFilter_ConfigType() {} -func (*Filter_TypedConfig) isFilter_ConfigType() {} - -func (m *Filter) GetConfigType() isFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (m *Filter) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Filter) GetConfig() *types.Struct { - if x, ok := m.GetConfigType().(*Filter_Config); ok { - return x.Config - } - return nil -} - -func (m *Filter) GetTypedConfig() *types.Any { - if x, ok := m.GetConfigType().(*Filter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Filter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Filter_OneofMarshaler, _Filter_OneofUnmarshaler, _Filter_OneofSizer, []interface{}{ - (*Filter_Config)(nil), - (*Filter_TypedConfig)(nil), - } -} - -func _Filter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Filter) - // config_type - switch x := m.ConfigType.(type) { - case *Filter_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *Filter_TypedConfig: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Filter.ConfigType has unexpected type %T", x) - } - return nil -} - -func _Filter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Filter) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &Filter_Config{msg} - return true, err - case 4: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &Filter_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _Filter_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Filter) - // config_type - switch x := m.ConfigType.(type) { - case *Filter_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Filter_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Specifies the match criteria for selecting a specific filter chain for a -// listener. -// -// In order for a filter chain to be selected, *ALL* of its criteria must be -// fulfilled by the incoming connection, properties of which are set by the -// networking stack and/or listener filters. -// -// The following order applies: -// -// 1. Destination port. -// 2. Destination IP address. -// 3. Server name (e.g. SNI for TLS protocol), -// 4. Transport protocol. -// 5. Application protocols (e.g. ALPN for TLS protocol). -// 6. Source type (e.g. any, local or external network). -// -// For criteria that allow ranges or wildcards, the most specific value in any -// of the configured filter chains that matches the incoming connection is going -// to be used (e.g. for SNI ``www.example.com`` the most specific match would be -// ``www.example.com``, then ``*.example.com``, then ``*.com``, then any filter -// chain without ``server_names`` requirements). -// -// [#comment: Implemented rules are kept in the preference order, with deprecated fields -// listed at the end, because that's how we want to list them in the docs. -// -// [#comment:TODO(PiotrSikora): Add support for configurable precedence of the rules] -type FilterChainMatch struct { - // Optional destination port to consider when use_original_dst is set on the - // listener in determining a filter chain match. - DestinationPort *types.UInt32Value `protobuf:"bytes,8,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - // If non-empty, an IP address and prefix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - PrefixRanges []*core.CidrRange `protobuf:"bytes,3,rep,name=prefix_ranges,json=prefixRanges,proto3" json:"prefix_ranges,omitempty"` - // If non-empty, an IP address and suffix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - // [#not-implemented-hide:] - AddressSuffix string `protobuf:"bytes,4,opt,name=address_suffix,json=addressSuffix,proto3" json:"address_suffix,omitempty"` - // [#not-implemented-hide:] - SuffixLen *types.UInt32Value `protobuf:"bytes,5,opt,name=suffix_len,json=suffixLen,proto3" json:"suffix_len,omitempty"` - // Specifies the connection source IP match type. Can be any, local or external network. - SourceType FilterChainMatch_ConnectionSourceType `protobuf:"varint,12,opt,name=source_type,json=sourceType,proto3,enum=envoy.api.v2.listener.FilterChainMatch_ConnectionSourceType" json:"source_type,omitempty"` - // The criteria is satisfied if the source IP address of the downstream - // connection is contained in at least one of the specified subnets. If the - // parameter is not specified or the list is empty, the source IP address is - // ignored. - // [#not-implemented-hide:] - SourcePrefixRanges []*core.CidrRange `protobuf:"bytes,6,rep,name=source_prefix_ranges,json=sourcePrefixRanges,proto3" json:"source_prefix_ranges,omitempty"` - // The criteria is satisfied if the source port of the downstream connection - // is contained in at least one of the specified ports. If the parameter is - // not specified, the source port is ignored. - // [#not-implemented-hide:] - SourcePorts []*types.UInt32Value `protobuf:"bytes,7,rep,name=source_ports,json=sourcePorts,proto3" json:"source_ports,omitempty"` - // If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining - // a filter chain match. Those values will be compared against the server names of a new - // connection, when detected by one of the listener filters. - // - // The server name will be matched against all wildcard domains, i.e. ``www.example.com`` - // will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. - // - // Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. - // - // .. attention:: - // - // See the :ref:`FAQ entry ` on how to configure SNI for more - // information. - ServerNames []string `protobuf:"bytes,11,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` - // If non-empty, a transport protocol to consider when determining a filter chain match. - // This value will be compared against the transport protocol of a new connection, when - // it's detected by one of the listener filters. - // - // Suggested values include: - // - // * ``raw_buffer`` - default, used when no transport protocol is detected, - // * ``tls`` - set by :ref:`envoy.listener.tls_inspector ` - // when TLS protocol is detected. - TransportProtocol string `protobuf:"bytes,9,opt,name=transport_protocol,json=transportProtocol,proto3" json:"transport_protocol,omitempty"` - // If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when - // determining a filter chain match. Those values will be compared against the application - // protocols of a new connection, when detected by one of the listener filters. - // - // Suggested values include: - // - // * ``http/1.1`` - set by :ref:`envoy.listener.tls_inspector - // `, - // * ``h2`` - set by :ref:`envoy.listener.tls_inspector ` - // - // .. attention:: - // - // Currently, only :ref:`TLS Inspector ` provides - // application protocol detection based on the requested - // `ALPN `_ values. - // - // However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, - // and matching on values other than ``h2`` is going to lead to a lot of false negatives, - // unless all connecting clients are known to use ALPN. - ApplicationProtocols []string `protobuf:"bytes,10,rep,name=application_protocols,json=applicationProtocols,proto3" json:"application_protocols,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FilterChainMatch) Reset() { *m = FilterChainMatch{} } -func (m *FilterChainMatch) String() string { return proto.CompactTextString(m) } -func (*FilterChainMatch) ProtoMessage() {} -func (*FilterChainMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_0ced541f18749edd, []int{1} -} -func (m *FilterChainMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilterChainMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilterChainMatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FilterChainMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilterChainMatch.Merge(m, src) -} -func (m *FilterChainMatch) XXX_Size() int { - return m.Size() -} -func (m *FilterChainMatch) XXX_DiscardUnknown() { - xxx_messageInfo_FilterChainMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_FilterChainMatch proto.InternalMessageInfo - -func (m *FilterChainMatch) GetDestinationPort() *types.UInt32Value { - if m != nil { - return m.DestinationPort - } - return nil -} - -func (m *FilterChainMatch) GetPrefixRanges() []*core.CidrRange { - if m != nil { - return m.PrefixRanges - } - return nil -} - -func (m *FilterChainMatch) GetAddressSuffix() string { - if m != nil { - return m.AddressSuffix - } - return "" -} - -func (m *FilterChainMatch) GetSuffixLen() *types.UInt32Value { - if m != nil { - return m.SuffixLen - } - return nil -} - -func (m *FilterChainMatch) GetSourceType() FilterChainMatch_ConnectionSourceType { - if m != nil { - return m.SourceType - } - return FilterChainMatch_ANY -} - -func (m *FilterChainMatch) GetSourcePrefixRanges() []*core.CidrRange { - if m != nil { - return m.SourcePrefixRanges - } - return nil -} - -func (m *FilterChainMatch) GetSourcePorts() []*types.UInt32Value { - if m != nil { - return m.SourcePorts - } - return nil -} - -func (m *FilterChainMatch) GetServerNames() []string { - if m != nil { - return m.ServerNames - } - return nil -} - -func (m *FilterChainMatch) GetTransportProtocol() string { - if m != nil { - return m.TransportProtocol - } - return "" -} - -func (m *FilterChainMatch) GetApplicationProtocols() []string { - if m != nil { - return m.ApplicationProtocols - } - return nil -} - -// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and -// various other parameters. -type FilterChain struct { - // The criteria to use when matching a connection to this filter chain. - FilterChainMatch *FilterChainMatch `protobuf:"bytes,1,opt,name=filter_chain_match,json=filterChainMatch,proto3" json:"filter_chain_match,omitempty"` - // The TLS context for this filter chain. - TlsContext *auth.DownstreamTlsContext `protobuf:"bytes,2,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` - // A list of individual network filters that make up the filter chain for - // connections established with the listener. Order matters as the filters are - // processed sequentially as connection events happen. Note: If the filter - // list is empty, the connection will close by default. - Filters []Filter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters"` - // Whether the listener should expect a PROXY protocol V1 header on new - // connections. If this option is enabled, the listener will assume that that - // remote address of the connection is the one specified in the header. Some - // load balancers including the AWS ELB support this option. If the option is - // absent or set to false, Envoy will use the physical peer address of the - // connection as the remote address. - UseProxyProto *types.BoolValue `protobuf:"bytes,4,opt,name=use_proxy_proto,json=useProxyProto,proto3" json:"use_proxy_proto,omitempty"` - // [#not-implemented-hide:] filter chain metadata. - Metadata *core.Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` - // See :ref:`base.TransportSocket` description. - TransportSocket *core.TransportSocket `protobuf:"bytes,6,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FilterChain) Reset() { *m = FilterChain{} } -func (m *FilterChain) String() string { return proto.CompactTextString(m) } -func (*FilterChain) ProtoMessage() {} -func (*FilterChain) Descriptor() ([]byte, []int) { - return fileDescriptor_0ced541f18749edd, []int{2} -} -func (m *FilterChain) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilterChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilterChain.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FilterChain) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilterChain.Merge(m, src) -} -func (m *FilterChain) XXX_Size() int { - return m.Size() -} -func (m *FilterChain) XXX_DiscardUnknown() { - xxx_messageInfo_FilterChain.DiscardUnknown(m) -} - -var xxx_messageInfo_FilterChain proto.InternalMessageInfo - -func (m *FilterChain) GetFilterChainMatch() *FilterChainMatch { - if m != nil { - return m.FilterChainMatch - } - return nil -} - -func (m *FilterChain) GetTlsContext() *auth.DownstreamTlsContext { - if m != nil { - return m.TlsContext - } - return nil -} - -func (m *FilterChain) GetFilters() []Filter { - if m != nil { - return m.Filters - } - return nil -} - -func (m *FilterChain) GetUseProxyProto() *types.BoolValue { - if m != nil { - return m.UseProxyProto - } - return nil -} - -func (m *FilterChain) GetMetadata() *core.Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *FilterChain) GetTransportSocket() *core.TransportSocket { - if m != nil { - return m.TransportSocket - } - return nil -} - -type ListenerFilter struct { - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(mattklein123): Auto generate the following list] - // * :ref:`envoy.listener.original_dst ` - // * :ref:`envoy.listener.tls_inspector ` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter specific configuration which depends on the filter being instantiated. - // See the supported filters for further documentation. - // - // Types that are valid to be assigned to ConfigType: - // *ListenerFilter_Config - // *ListenerFilter_TypedConfig - ConfigType isListenerFilter_ConfigType `protobuf_oneof:"config_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListenerFilter) Reset() { *m = ListenerFilter{} } -func (m *ListenerFilter) String() string { return proto.CompactTextString(m) } -func (*ListenerFilter) ProtoMessage() {} -func (*ListenerFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_0ced541f18749edd, []int{3} -} -func (m *ListenerFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenerFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenerFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenerFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenerFilter.Merge(m, src) -} -func (m *ListenerFilter) XXX_Size() int { - return m.Size() -} -func (m *ListenerFilter) XXX_DiscardUnknown() { - xxx_messageInfo_ListenerFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenerFilter proto.InternalMessageInfo - -type isListenerFilter_ConfigType interface { - isListenerFilter_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type ListenerFilter_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type ListenerFilter_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*ListenerFilter_Config) isListenerFilter_ConfigType() {} -func (*ListenerFilter_TypedConfig) isListenerFilter_ConfigType() {} - -func (m *ListenerFilter) GetConfigType() isListenerFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (m *ListenerFilter) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ListenerFilter) GetConfig() *types.Struct { - if x, ok := m.GetConfigType().(*ListenerFilter_Config); ok { - return x.Config - } - return nil -} - -func (m *ListenerFilter) GetTypedConfig() *types.Any { - if x, ok := m.GetConfigType().(*ListenerFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ListenerFilter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ListenerFilter_OneofMarshaler, _ListenerFilter_OneofUnmarshaler, _ListenerFilter_OneofSizer, []interface{}{ - (*ListenerFilter_Config)(nil), - (*ListenerFilter_TypedConfig)(nil), - } -} - -func _ListenerFilter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ListenerFilter) - // config_type - switch x := m.ConfigType.(type) { - case *ListenerFilter_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *ListenerFilter_TypedConfig: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("ListenerFilter.ConfigType has unexpected type %T", x) - } - return nil -} - -func _ListenerFilter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ListenerFilter) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &ListenerFilter_Config{msg} - return true, err - case 3: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &ListenerFilter_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _ListenerFilter_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ListenerFilter) - // config_type - switch x := m.ConfigType.(type) { - case *ListenerFilter_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ListenerFilter_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterEnum("envoy.api.v2.listener.FilterChainMatch_ConnectionSourceType", FilterChainMatch_ConnectionSourceType_name, FilterChainMatch_ConnectionSourceType_value) - proto.RegisterType((*Filter)(nil), "envoy.api.v2.listener.Filter") - proto.RegisterType((*FilterChainMatch)(nil), "envoy.api.v2.listener.FilterChainMatch") - proto.RegisterType((*FilterChain)(nil), "envoy.api.v2.listener.FilterChain") - proto.RegisterType((*ListenerFilter)(nil), "envoy.api.v2.listener.ListenerFilter") -} +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("envoy/api/v2/listener/listener.proto", fileDescriptor_0ced541f18749edd) } var fileDescriptor_0ced541f18749edd = []byte{ - // 883 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcf, 0x6e, 0xe3, 0x44, - 0x18, 0xaf, 0x93, 0x34, 0x4d, 0x3e, 0x27, 0xad, 0x19, 0x65, 0x55, 0x53, 0x76, 0xb3, 0x21, 0x80, - 0x88, 0x90, 0x70, 0x44, 0x7a, 0x00, 0x04, 0x08, 0xc5, 0xa1, 0xa8, 0xac, 0xd2, 0x10, 0x39, 0xdd, - 0x0a, 0xb8, 0x58, 0x53, 0x67, 0x92, 0x0e, 0x38, 0x33, 0xd6, 0xcc, 0x24, 0xdb, 0x5c, 0x79, 0x1a, - 0xb4, 0xe2, 0x05, 0xe0, 0xc4, 0x71, 0x8f, 0x3c, 0x01, 0x82, 0xde, 0x78, 0x8a, 0x45, 0x1e, 0xdb, - 0xa1, 0x49, 0xa3, 0x65, 0xc5, 0x61, 0x6f, 0x33, 0xdf, 0xf7, 0xfb, 0xfd, 0xe6, 0xfb, 0x3b, 0xf0, - 0x36, 0x61, 0x0b, 0xbe, 0x6c, 0xe3, 0x88, 0xb6, 0x17, 0x9d, 0x76, 0x48, 0xa5, 0x22, 0x8c, 0x88, - 0xd5, 0xc1, 0x89, 0x04, 0x57, 0x1c, 0xdd, 0xd3, 0x28, 0x07, 0x47, 0xd4, 0x59, 0x74, 0x9c, 0xcc, - 0x79, 0xf4, 0x70, 0x8d, 0x1c, 0x70, 0x41, 0xda, 0x78, 0x3c, 0x16, 0x44, 0xca, 0x84, 0x77, 0x74, - 0x7f, 0x0d, 0x80, 0xe7, 0xea, 0xaa, 0x1d, 0x10, 0xa1, 0xb6, 0x7a, 0x35, 0xfd, 0x12, 0x4b, 0x92, - 0x7a, 0x5f, 0x9f, 0x72, 0x3e, 0x0d, 0x49, 0x5b, 0xdf, 0x2e, 0xe7, 0x93, 0x36, 0x66, 0xcb, 0x8c, - 0xb8, 0xe9, 0x92, 0x4a, 0xcc, 0x83, 0x4c, 0xb6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, 0x99, 0xd4, 0x3b, 0xfd, 0x26, 0x8e, - 0xee, 0xcc, 0x81, 0xcb, 0x79, 0x98, 0x4c, 0x41, 0x75, 0x2e, 0xc9, 0x30, 0x66, 0xe8, 0x26, 0xa0, - 0x0f, 0xa1, 0x34, 0x23, 0x0a, 0x8f, 0xb1, 0xc2, 0xe9, 0xfa, 0xbc, 0xb1, 0x65, 0x18, 0xcf, 0x52, - 0x88, 0xb7, 0x02, 0xa3, 0x33, 0xb0, 0xfe, 0x9d, 0x0e, 0xc9, 0x83, 0x1f, 0x88, 0xb2, 0x8b, 0x5a, - 0xa0, 0xb9, 0x45, 0xe0, 0x3c, 0x83, 0x8e, 0x34, 0xd2, 0x3b, 0x50, 0xeb, 0x86, 0xe6, 0xcf, 0x06, - 0xec, 0xf7, 0xd3, 0x74, 0x5f, 0xd9, 0xa7, 0x9a, 0xff, 0xbf, 0x9f, 0xaa, 0xfb, 0xfd, 0x4f, 0x37, - 0x75, 0xe3, 0xd9, 0x4d, 0xdd, 0xf8, 0xfd, 0xa6, 0x6e, 0xfc, 0x79, 0x53, 0x37, 0xe0, 0x2d, 0xca, - 0x93, 0xbc, 0x75, 0x3b, 0xb6, 0xf7, 0xd1, 0xad, 0x66, 0x29, 0xea, 0xe2, 0x0f, 0x8d, 0xef, 0x4a, - 0x99, 0xeb, 0x69, 0xee, 0xf0, 0x44, 0x53, 0xba, 0x11, 0x75, 0x2e, 0x3a, 0x4e, 0x06, 0x1c, 0x8c, - 0x2e, 0x8b, 0x3a, 0xae, 0xe3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xcc, 0x41, 0xcc, 0x92, - 0x07, 0x00, 0x00, + // 175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0xd2, 0xcf, 0xc9, 0x2c, 0x2e, 0x49, 0xcd, 0x4b, + 0x2d, 0x82, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0xc1, 0xaa, 0xf4, 0x12, 0x0b, + 0x32, 0xf5, 0xca, 0x8c, 0xf4, 0x60, 0x92, 0x52, 0xb2, 0xa5, 0x29, 0x05, 0x89, 0xfa, 0x89, 0x79, + 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0xfa, 0xc5, 0x25, 0x89, 0x25, 0xa5, 0xc5, + 0x10, 0x5d, 0x52, 0xfa, 0xf8, 0xcd, 0x8e, 0x4f, 0xce, 0xcf, 0x2d, 0xc8, 0xcf, 0x4b, 0xcd, 0x2b, + 0x81, 0x6a, 0x70, 0x2a, 0xda, 0xd5, 0x70, 0xe2, 0x22, 0x1b, 0x93, 0x00, 0x23, 0x97, 0x72, 0x66, + 0xbe, 0x1e, 0x58, 0x77, 0x41, 0x51, 0x7e, 0x45, 0xa5, 0x1e, 0x56, 0xeb, 0x9d, 0x78, 0x7d, 0xa0, + 0xac, 0x00, 0x90, 0xee, 0x00, 0xc6, 0x55, 0x4c, 0xe2, 0xae, 0x60, 0x85, 0x8e, 0x05, 0x99, 0x7a, + 0x61, 0x46, 0x7a, 0x30, 0x69, 0xbf, 0xe0, 0x57, 0x38, 0x65, 0x02, 0x18, 0x93, 0xd8, 0xc0, 0x96, + 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x26, 0x17, 0xb4, 0x0b, 0x01, 0x00, 0x00, } - -func (this *Filter) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Filter) - if !ok { - that2, ok := that.(Filter) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Filter_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Filter_Config) - if !ok { - that2, ok := that.(Filter_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *Filter_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Filter_TypedConfig) - if !ok { - that2, ok := that.(Filter_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (this *FilterChainMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FilterChainMatch) - if !ok { - that2, ok := that.(FilterChainMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.DestinationPort.Equal(that1.DestinationPort) { - return false - } - if len(this.PrefixRanges) != len(that1.PrefixRanges) { - return false - } - for i := range this.PrefixRanges { - if !this.PrefixRanges[i].Equal(that1.PrefixRanges[i]) { - return false - } - } - if this.AddressSuffix != that1.AddressSuffix { - return false - } - if !this.SuffixLen.Equal(that1.SuffixLen) { - return false - } - if this.SourceType != that1.SourceType { - return false - } - if len(this.SourcePrefixRanges) != len(that1.SourcePrefixRanges) { - return false - } - for i := range this.SourcePrefixRanges { - if !this.SourcePrefixRanges[i].Equal(that1.SourcePrefixRanges[i]) { - return false - } - } - if len(this.SourcePorts) != len(that1.SourcePorts) { - return false - } - for i := range this.SourcePorts { - if !this.SourcePorts[i].Equal(that1.SourcePorts[i]) { - return false - } - } - if len(this.ServerNames) != len(that1.ServerNames) { - return false - } - for i := range this.ServerNames { - if this.ServerNames[i] != that1.ServerNames[i] { - return false - } - } - if this.TransportProtocol != that1.TransportProtocol { - return false - } - if len(this.ApplicationProtocols) != len(that1.ApplicationProtocols) { - return false - } - for i := range this.ApplicationProtocols { - if this.ApplicationProtocols[i] != that1.ApplicationProtocols[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *FilterChain) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FilterChain) - if !ok { - that2, ok := that.(FilterChain) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.FilterChainMatch.Equal(that1.FilterChainMatch) { - return false - } - if !this.TlsContext.Equal(that1.TlsContext) { - return false - } - if len(this.Filters) != len(that1.Filters) { - return false - } - for i := range this.Filters { - if !this.Filters[i].Equal(&that1.Filters[i]) { - return false - } - } - if !this.UseProxyProto.Equal(that1.UseProxyProto) { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !this.TransportSocket.Equal(that1.TransportSocket) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ListenerFilter) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ListenerFilter) - if !ok { - that2, ok := that.(ListenerFilter) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ListenerFilter_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ListenerFilter_Config) - if !ok { - that2, ok := that.(ListenerFilter_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *ListenerFilter_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ListenerFilter_TypedConfig) - if !ok { - that2, ok := that.(ListenerFilter_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (m *Filter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Filter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintListener(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn1, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Filter_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.Config.Size())) - n2, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *Filter_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.TypedConfig.Size())) - n3, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - return i, nil -} -func (m *FilterChainMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilterChainMatch) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.PrefixRanges) > 0 { - for _, msg := range m.PrefixRanges { - dAtA[i] = 0x1a - i++ - i = encodeVarintListener(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.AddressSuffix) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintListener(dAtA, i, uint64(len(m.AddressSuffix))) - i += copy(dAtA[i:], m.AddressSuffix) - } - if m.SuffixLen != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintListener(dAtA, i, uint64(m.SuffixLen.Size())) - n4, err := m.SuffixLen.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if len(m.SourcePrefixRanges) > 0 { - for _, msg := range m.SourcePrefixRanges { - dAtA[i] = 0x32 - i++ - i = encodeVarintListener(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.SourcePorts) > 0 { - for _, msg := range m.SourcePorts { - dAtA[i] = 0x3a - i++ - i = encodeVarintListener(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.DestinationPort != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.DestinationPort.Size())) - n5, err := m.DestinationPort.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.TransportProtocol) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintListener(dAtA, i, uint64(len(m.TransportProtocol))) - i += copy(dAtA[i:], m.TransportProtocol) - } - if len(m.ApplicationProtocols) > 0 { - for _, s := range m.ApplicationProtocols { - dAtA[i] = 0x52 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ServerNames) > 0 { - for _, s := range m.ServerNames { - dAtA[i] = 0x5a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.SourceType != 0 { - dAtA[i] = 0x60 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.SourceType)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *FilterChain) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilterChain) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FilterChainMatch != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintListener(dAtA, i, uint64(m.FilterChainMatch.Size())) - n6, err := m.FilterChainMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.TlsContext != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.TlsContext.Size())) - n7, err := m.TlsContext.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if len(m.Filters) > 0 { - for _, msg := range m.Filters { - dAtA[i] = 0x1a - i++ - i = encodeVarintListener(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.UseProxyProto != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.UseProxyProto.Size())) - n8, err := m.UseProxyProto.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Metadata != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintListener(dAtA, i, uint64(m.Metadata.Size())) - n9, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.TransportSocket != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.TransportSocket.Size())) - n10, err := m.TransportSocket.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListenerFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenerFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintListener(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn11, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn11 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ListenerFilter_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintListener(dAtA, i, uint64(m.Config.Size())) - n12, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - return i, nil -} -func (m *ListenerFilter_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintListener(dAtA, i, uint64(m.TypedConfig.Size())) - n13, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - return i, nil -} -func encodeVarintListener(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Filter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovListener(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Filter_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovListener(uint64(l)) - } - return n -} -func (m *Filter_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovListener(uint64(l)) - } - return n -} -func (m *FilterChainMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PrefixRanges) > 0 { - for _, e := range m.PrefixRanges { - l = e.Size() - n += 1 + l + sovListener(uint64(l)) - } - } - l = len(m.AddressSuffix) - if l > 0 { - n += 1 + l + sovListener(uint64(l)) - } - if m.SuffixLen != nil { - l = m.SuffixLen.Size() - n += 1 + l + sovListener(uint64(l)) - } - if len(m.SourcePrefixRanges) > 0 { - for _, e := range m.SourcePrefixRanges { - l = e.Size() - n += 1 + l + sovListener(uint64(l)) - } - } - if len(m.SourcePorts) > 0 { - for _, e := range m.SourcePorts { - l = e.Size() - n += 1 + l + sovListener(uint64(l)) - } - } - if m.DestinationPort != nil { - l = m.DestinationPort.Size() - n += 1 + l + sovListener(uint64(l)) - } - l = len(m.TransportProtocol) - if l > 0 { - n += 1 + l + sovListener(uint64(l)) - } - if len(m.ApplicationProtocols) > 0 { - for _, s := range m.ApplicationProtocols { - l = len(s) - n += 1 + l + sovListener(uint64(l)) - } - } - if len(m.ServerNames) > 0 { - for _, s := range m.ServerNames { - l = len(s) - n += 1 + l + sovListener(uint64(l)) - } - } - if m.SourceType != 0 { - n += 1 + sovListener(uint64(m.SourceType)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FilterChain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FilterChainMatch != nil { - l = m.FilterChainMatch.Size() - n += 1 + l + sovListener(uint64(l)) - } - if m.TlsContext != nil { - l = m.TlsContext.Size() - n += 1 + l + sovListener(uint64(l)) - } - if len(m.Filters) > 0 { - for _, e := range m.Filters { - l = e.Size() - n += 1 + l + sovListener(uint64(l)) - } - } - if m.UseProxyProto != nil { - l = m.UseProxyProto.Size() - n += 1 + l + sovListener(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovListener(uint64(l)) - } - if m.TransportSocket != nil { - l = m.TransportSocket.Size() - n += 1 + l + sovListener(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListenerFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovListener(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ListenerFilter_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovListener(uint64(l)) - } - return n -} -func (m *ListenerFilter_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovListener(uint64(l)) - } - return n -} - -func sovListener(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozListener(x uint64) (n int) { - return sovListener(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Filter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Filter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Filter: 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 ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListener - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &Filter_Config{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &Filter_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListener(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthListener - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthListener - } - 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 *FilterChainMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilterChainMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilterChainMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrefixRanges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrefixRanges = append(m.PrefixRanges, &core.CidrRange{}) - if err := m.PrefixRanges[len(m.PrefixRanges)-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 AddressSuffix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddressSuffix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuffixLen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SuffixLen == nil { - m.SuffixLen = &types.UInt32Value{} - } - if err := m.SuffixLen.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourcePrefixRanges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourcePrefixRanges = append(m.SourcePrefixRanges, &core.CidrRange{}) - if err := m.SourcePrefixRanges[len(m.SourcePrefixRanges)-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 SourcePorts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourcePorts = append(m.SourcePorts, &types.UInt32Value{}) - if err := m.SourcePorts[len(m.SourcePorts)-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 DestinationPort", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DestinationPort == nil { - m.DestinationPort = &types.UInt32Value{} - } - if err := m.DestinationPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransportProtocol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransportProtocol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplicationProtocols", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ApplicationProtocols = append(m.ApplicationProtocols, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServerNames = append(m.ServerNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceType", wireType) - } - m.SourceType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SourceType |= FilterChainMatch_ConnectionSourceType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipListener(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthListener - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthListener - } - 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 *FilterChain) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FilterChain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilterChain: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterChainMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FilterChainMatch == nil { - m.FilterChainMatch = &FilterChainMatch{} - } - if err := m.FilterChainMatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TlsContext == nil { - m.TlsContext = &auth.DownstreamTlsContext{} - } - if err := m.TlsContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, Filter{}) - if err := m.Filters[len(m.Filters)-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 UseProxyProto", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UseProxyProto == nil { - m.UseProxyProto = &types.BoolValue{} - } - if err := m.UseProxyProto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &core.Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransportSocket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransportSocket == nil { - m.TransportSocket = &core.TransportSocket{} - } - if err := m.TransportSocket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListener(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthListener - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthListener - } - 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 *ListenerFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenerFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenerFilter: 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 ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListener - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &ListenerFilter_Config{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListener - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListener - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListener - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &ListenerFilter_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListener(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthListener - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthListener - } - 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 skipListener(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListener - } - 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, ErrIntOverflowListener - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListener - } - 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, ErrInvalidLengthListener - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthListener - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListener - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipListener(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthListener - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthListener = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowListener = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go index 2673ce1ace..ba292557c0 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/listener/listener.proto -package listener +package envoy_api_v2_listener import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,546 +30,8 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on Filter with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Filter) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return FilterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - switch m.ConfigType.(type) { - - case *Filter_Config: - - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *Filter_TypedConfig: - - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// FilterValidationError is the validation error returned by Filter.Validate if -// the designated constraints aren't met. -type FilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterValidationError) ErrorName() string { return "FilterValidationError" } - -// Error satisfies the builtin error interface -func (e FilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterValidationError{} - -// Validate checks the field values on FilterChainMatch with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *FilterChainMatch) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetDestinationPort(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 65535 { - return FilterChainMatchValidationError{ - field: "DestinationPort", - reason: "value must be inside range [1, 65535]", - } - } - - } - - for idx, item := range m.GetPrefixRanges() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: fmt.Sprintf("PrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - // no validation rules for AddressSuffix - - { - tmp := m.GetSuffixLen() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: "SuffixLen", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { - return FilterChainMatchValidationError{ - field: "SourceType", - reason: "value must be one of the defined enum values", - } - } - - for idx, item := range m.GetSourcePrefixRanges() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - for idx, item := range m.GetSourcePorts() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: fmt.Sprintf("SourcePorts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - // no validation rules for TransportProtocol - - return nil -} - -// FilterChainMatchValidationError is the validation error returned by -// FilterChainMatch.Validate if the designated constraints aren't met. -type FilterChainMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterChainMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterChainMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterChainMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterChainMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterChainMatchValidationError) ErrorName() string { return "FilterChainMatchValidationError" } - -// Error satisfies the builtin error interface -func (e FilterChainMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterChainMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterChainMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterChainMatchValidationError{} - -// Validate checks the field values on FilterChain with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *FilterChain) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetFilterChainMatch() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "FilterChainMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetTlsContext() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - { - tmp := m.GetUseProxyProto() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "UseProxyProto", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetTransportSocket() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// FilterChainValidationError is the validation error returned by -// FilterChain.Validate if the designated constraints aren't met. -type FilterChainValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterChainValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterChainValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterChainValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterChainValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterChainValidationError) ErrorName() string { return "FilterChainValidationError" } - -// Error satisfies the builtin error interface -func (e FilterChainValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterChain.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterChainValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterChainValidationError{} - -// Validate checks the field values on ListenerFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ListenerFilter) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return ListenerFilterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - switch m.ConfigType.(type) { - - case *ListenerFilter_Config: - - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *ListenerFilter_TypedConfig: - - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ListenerFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// ListenerFilterValidationError is the validation error returned by -// ListenerFilter.Validate if the designated constraints aren't met. -type ListenerFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerFilterValidationError) ErrorName() string { return "ListenerFilterValidationError" } - -// Error satisfies the builtin error interface -func (e ListenerFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenerFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerFilterValidationError{} +// define the regex for a UUID once up-front +var _listener_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go new file mode 100644 index 0000000000..11810fa6b2 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go @@ -0,0 +1,702 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/listener/listener_components.proto + +package envoy_api_v2_listener + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type FilterChainMatch_ConnectionSourceType int32 + +const ( + FilterChainMatch_ANY FilterChainMatch_ConnectionSourceType = 0 + FilterChainMatch_LOCAL FilterChainMatch_ConnectionSourceType = 1 + FilterChainMatch_EXTERNAL FilterChainMatch_ConnectionSourceType = 2 +) + +var FilterChainMatch_ConnectionSourceType_name = map[int32]string{ + 0: "ANY", + 1: "LOCAL", + 2: "EXTERNAL", +} + +var FilterChainMatch_ConnectionSourceType_value = map[string]int32{ + "ANY": 0, + "LOCAL": 1, + "EXTERNAL": 2, +} + +func (x FilterChainMatch_ConnectionSourceType) String() string { + return proto.EnumName(FilterChainMatch_ConnectionSourceType_name, int32(x)) +} + +func (FilterChainMatch_ConnectionSourceType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{1, 0} +} + +type Filter struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *Filter_Config + // *Filter_TypedConfig + ConfigType isFilter_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Filter) Reset() { *m = Filter{} } +func (m *Filter) String() string { return proto.CompactTextString(m) } +func (*Filter) ProtoMessage() {} +func (*Filter) Descriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{0} +} + +func (m *Filter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Filter.Unmarshal(m, b) +} +func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Filter.Marshal(b, m, deterministic) +} +func (m *Filter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Filter.Merge(m, src) +} +func (m *Filter) XXX_Size() int { + return xxx_messageInfo_Filter.Size(m) +} +func (m *Filter) XXX_DiscardUnknown() { + xxx_messageInfo_Filter.DiscardUnknown(m) +} + +var xxx_messageInfo_Filter proto.InternalMessageInfo + +func (m *Filter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isFilter_ConfigType interface { + isFilter_ConfigType() +} + +type Filter_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type Filter_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*Filter_Config) isFilter_ConfigType() {} + +func (*Filter_TypedConfig) isFilter_ConfigType() {} + +func (m *Filter) GetConfigType() isFilter_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *Filter) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*Filter_Config); ok { + return x.Config + } + return nil +} + +func (m *Filter) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*Filter_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Filter) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Filter_Config)(nil), + (*Filter_TypedConfig)(nil), + } +} + +type FilterChainMatch struct { + DestinationPort *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` + PrefixRanges []*core.CidrRange `protobuf:"bytes,3,rep,name=prefix_ranges,json=prefixRanges,proto3" json:"prefix_ranges,omitempty"` + AddressSuffix string `protobuf:"bytes,4,opt,name=address_suffix,json=addressSuffix,proto3" json:"address_suffix,omitempty"` + SuffixLen *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=suffix_len,json=suffixLen,proto3" json:"suffix_len,omitempty"` + SourceType FilterChainMatch_ConnectionSourceType `protobuf:"varint,12,opt,name=source_type,json=sourceType,proto3,enum=envoy.api.v2.listener.FilterChainMatch_ConnectionSourceType" json:"source_type,omitempty"` + SourcePrefixRanges []*core.CidrRange `protobuf:"bytes,6,rep,name=source_prefix_ranges,json=sourcePrefixRanges,proto3" json:"source_prefix_ranges,omitempty"` + SourcePorts []uint32 `protobuf:"varint,7,rep,packed,name=source_ports,json=sourcePorts,proto3" json:"source_ports,omitempty"` + ServerNames []string `protobuf:"bytes,11,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` + TransportProtocol string `protobuf:"bytes,9,opt,name=transport_protocol,json=transportProtocol,proto3" json:"transport_protocol,omitempty"` + ApplicationProtocols []string `protobuf:"bytes,10,rep,name=application_protocols,json=applicationProtocols,proto3" json:"application_protocols,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FilterChainMatch) Reset() { *m = FilterChainMatch{} } +func (m *FilterChainMatch) String() string { return proto.CompactTextString(m) } +func (*FilterChainMatch) ProtoMessage() {} +func (*FilterChainMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{1} +} + +func (m *FilterChainMatch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FilterChainMatch.Unmarshal(m, b) +} +func (m *FilterChainMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FilterChainMatch.Marshal(b, m, deterministic) +} +func (m *FilterChainMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilterChainMatch.Merge(m, src) +} +func (m *FilterChainMatch) XXX_Size() int { + return xxx_messageInfo_FilterChainMatch.Size(m) +} +func (m *FilterChainMatch) XXX_DiscardUnknown() { + xxx_messageInfo_FilterChainMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_FilterChainMatch proto.InternalMessageInfo + +func (m *FilterChainMatch) GetDestinationPort() *wrappers.UInt32Value { + if m != nil { + return m.DestinationPort + } + return nil +} + +func (m *FilterChainMatch) GetPrefixRanges() []*core.CidrRange { + if m != nil { + return m.PrefixRanges + } + return nil +} + +func (m *FilterChainMatch) GetAddressSuffix() string { + if m != nil { + return m.AddressSuffix + } + return "" +} + +func (m *FilterChainMatch) GetSuffixLen() *wrappers.UInt32Value { + if m != nil { + return m.SuffixLen + } + return nil +} + +func (m *FilterChainMatch) GetSourceType() FilterChainMatch_ConnectionSourceType { + if m != nil { + return m.SourceType + } + return FilterChainMatch_ANY +} + +func (m *FilterChainMatch) GetSourcePrefixRanges() []*core.CidrRange { + if m != nil { + return m.SourcePrefixRanges + } + return nil +} + +func (m *FilterChainMatch) GetSourcePorts() []uint32 { + if m != nil { + return m.SourcePorts + } + return nil +} + +func (m *FilterChainMatch) GetServerNames() []string { + if m != nil { + return m.ServerNames + } + return nil +} + +func (m *FilterChainMatch) GetTransportProtocol() string { + if m != nil { + return m.TransportProtocol + } + return "" +} + +func (m *FilterChainMatch) GetApplicationProtocols() []string { + if m != nil { + return m.ApplicationProtocols + } + return nil +} + +type FilterChain struct { + FilterChainMatch *FilterChainMatch `protobuf:"bytes,1,opt,name=filter_chain_match,json=filterChainMatch,proto3" json:"filter_chain_match,omitempty"` + TlsContext *auth.DownstreamTlsContext `protobuf:"bytes,2,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` // Deprecated: Do not use. + Filters []*Filter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` + UseProxyProto *wrappers.BoolValue `protobuf:"bytes,4,opt,name=use_proxy_proto,json=useProxyProto,proto3" json:"use_proxy_proto,omitempty"` + Metadata *core.Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` + TransportSocket *core.TransportSocket `protobuf:"bytes,6,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` + Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FilterChain) Reset() { *m = FilterChain{} } +func (m *FilterChain) String() string { return proto.CompactTextString(m) } +func (*FilterChain) ProtoMessage() {} +func (*FilterChain) Descriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{2} +} + +func (m *FilterChain) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FilterChain.Unmarshal(m, b) +} +func (m *FilterChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FilterChain.Marshal(b, m, deterministic) +} +func (m *FilterChain) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilterChain.Merge(m, src) +} +func (m *FilterChain) XXX_Size() int { + return xxx_messageInfo_FilterChain.Size(m) +} +func (m *FilterChain) XXX_DiscardUnknown() { + xxx_messageInfo_FilterChain.DiscardUnknown(m) +} + +var xxx_messageInfo_FilterChain proto.InternalMessageInfo + +func (m *FilterChain) GetFilterChainMatch() *FilterChainMatch { + if m != nil { + return m.FilterChainMatch + } + return nil +} + +// Deprecated: Do not use. +func (m *FilterChain) GetTlsContext() *auth.DownstreamTlsContext { + if m != nil { + return m.TlsContext + } + return nil +} + +func (m *FilterChain) GetFilters() []*Filter { + if m != nil { + return m.Filters + } + return nil +} + +func (m *FilterChain) GetUseProxyProto() *wrappers.BoolValue { + if m != nil { + return m.UseProxyProto + } + return nil +} + +func (m *FilterChain) GetMetadata() *core.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *FilterChain) GetTransportSocket() *core.TransportSocket { + if m != nil { + return m.TransportSocket + } + return nil +} + +func (m *FilterChain) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type ListenerFilterChainMatchPredicate struct { + // Types that are valid to be assigned to Rule: + // *ListenerFilterChainMatchPredicate_OrMatch + // *ListenerFilterChainMatchPredicate_AndMatch + // *ListenerFilterChainMatchPredicate_NotMatch + // *ListenerFilterChainMatchPredicate_AnyMatch + // *ListenerFilterChainMatchPredicate_DestinationPortRange + Rule isListenerFilterChainMatchPredicate_Rule `protobuf_oneof:"rule"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListenerFilterChainMatchPredicate) Reset() { *m = ListenerFilterChainMatchPredicate{} } +func (m *ListenerFilterChainMatchPredicate) String() string { return proto.CompactTextString(m) } +func (*ListenerFilterChainMatchPredicate) ProtoMessage() {} +func (*ListenerFilterChainMatchPredicate) Descriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{3} +} + +func (m *ListenerFilterChainMatchPredicate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListenerFilterChainMatchPredicate.Unmarshal(m, b) +} +func (m *ListenerFilterChainMatchPredicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListenerFilterChainMatchPredicate.Marshal(b, m, deterministic) +} +func (m *ListenerFilterChainMatchPredicate) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenerFilterChainMatchPredicate.Merge(m, src) +} +func (m *ListenerFilterChainMatchPredicate) XXX_Size() int { + return xxx_messageInfo_ListenerFilterChainMatchPredicate.Size(m) +} +func (m *ListenerFilterChainMatchPredicate) XXX_DiscardUnknown() { + xxx_messageInfo_ListenerFilterChainMatchPredicate.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenerFilterChainMatchPredicate proto.InternalMessageInfo + +type isListenerFilterChainMatchPredicate_Rule interface { + isListenerFilterChainMatchPredicate_Rule() +} + +type ListenerFilterChainMatchPredicate_OrMatch struct { + OrMatch *ListenerFilterChainMatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` +} + +type ListenerFilterChainMatchPredicate_AndMatch struct { + AndMatch *ListenerFilterChainMatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` +} + +type ListenerFilterChainMatchPredicate_NotMatch struct { + NotMatch *ListenerFilterChainMatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` +} + +type ListenerFilterChainMatchPredicate_AnyMatch struct { + AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` +} + +type ListenerFilterChainMatchPredicate_DestinationPortRange struct { + DestinationPortRange *_type.Int32Range `protobuf:"bytes,5,opt,name=destination_port_range,json=destinationPortRange,proto3,oneof"` +} + +func (*ListenerFilterChainMatchPredicate_OrMatch) isListenerFilterChainMatchPredicate_Rule() {} + +func (*ListenerFilterChainMatchPredicate_AndMatch) isListenerFilterChainMatchPredicate_Rule() {} + +func (*ListenerFilterChainMatchPredicate_NotMatch) isListenerFilterChainMatchPredicate_Rule() {} + +func (*ListenerFilterChainMatchPredicate_AnyMatch) isListenerFilterChainMatchPredicate_Rule() {} + +func (*ListenerFilterChainMatchPredicate_DestinationPortRange) isListenerFilterChainMatchPredicate_Rule() { +} + +func (m *ListenerFilterChainMatchPredicate) GetRule() isListenerFilterChainMatchPredicate_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (m *ListenerFilterChainMatchPredicate) GetOrMatch() *ListenerFilterChainMatchPredicate_MatchSet { + if x, ok := m.GetRule().(*ListenerFilterChainMatchPredicate_OrMatch); ok { + return x.OrMatch + } + return nil +} + +func (m *ListenerFilterChainMatchPredicate) GetAndMatch() *ListenerFilterChainMatchPredicate_MatchSet { + if x, ok := m.GetRule().(*ListenerFilterChainMatchPredicate_AndMatch); ok { + return x.AndMatch + } + return nil +} + +func (m *ListenerFilterChainMatchPredicate) GetNotMatch() *ListenerFilterChainMatchPredicate { + if x, ok := m.GetRule().(*ListenerFilterChainMatchPredicate_NotMatch); ok { + return x.NotMatch + } + return nil +} + +func (m *ListenerFilterChainMatchPredicate) GetAnyMatch() bool { + if x, ok := m.GetRule().(*ListenerFilterChainMatchPredicate_AnyMatch); ok { + return x.AnyMatch + } + return false +} + +func (m *ListenerFilterChainMatchPredicate) GetDestinationPortRange() *_type.Int32Range { + if x, ok := m.GetRule().(*ListenerFilterChainMatchPredicate_DestinationPortRange); ok { + return x.DestinationPortRange + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ListenerFilterChainMatchPredicate) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ListenerFilterChainMatchPredicate_OrMatch)(nil), + (*ListenerFilterChainMatchPredicate_AndMatch)(nil), + (*ListenerFilterChainMatchPredicate_NotMatch)(nil), + (*ListenerFilterChainMatchPredicate_AnyMatch)(nil), + (*ListenerFilterChainMatchPredicate_DestinationPortRange)(nil), + } +} + +type ListenerFilterChainMatchPredicate_MatchSet struct { + Rules []*ListenerFilterChainMatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListenerFilterChainMatchPredicate_MatchSet) Reset() { + *m = ListenerFilterChainMatchPredicate_MatchSet{} +} +func (m *ListenerFilterChainMatchPredicate_MatchSet) String() string { + return proto.CompactTextString(m) +} +func (*ListenerFilterChainMatchPredicate_MatchSet) ProtoMessage() {} +func (*ListenerFilterChainMatchPredicate_MatchSet) Descriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{3, 0} +} + +func (m *ListenerFilterChainMatchPredicate_MatchSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListenerFilterChainMatchPredicate_MatchSet.Unmarshal(m, b) +} +func (m *ListenerFilterChainMatchPredicate_MatchSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListenerFilterChainMatchPredicate_MatchSet.Marshal(b, m, deterministic) +} +func (m *ListenerFilterChainMatchPredicate_MatchSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenerFilterChainMatchPredicate_MatchSet.Merge(m, src) +} +func (m *ListenerFilterChainMatchPredicate_MatchSet) XXX_Size() int { + return xxx_messageInfo_ListenerFilterChainMatchPredicate_MatchSet.Size(m) +} +func (m *ListenerFilterChainMatchPredicate_MatchSet) XXX_DiscardUnknown() { + xxx_messageInfo_ListenerFilterChainMatchPredicate_MatchSet.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenerFilterChainMatchPredicate_MatchSet proto.InternalMessageInfo + +func (m *ListenerFilterChainMatchPredicate_MatchSet) GetRules() []*ListenerFilterChainMatchPredicate { + if m != nil { + return m.Rules + } + return nil +} + +type ListenerFilter struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *ListenerFilter_Config + // *ListenerFilter_TypedConfig + ConfigType isListenerFilter_ConfigType `protobuf_oneof:"config_type"` + FilterDisabled *ListenerFilterChainMatchPredicate `protobuf:"bytes,4,opt,name=filter_disabled,json=filterDisabled,proto3" json:"filter_disabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListenerFilter) Reset() { *m = ListenerFilter{} } +func (m *ListenerFilter) String() string { return proto.CompactTextString(m) } +func (*ListenerFilter) ProtoMessage() {} +func (*ListenerFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_30285372e511ffb4, []int{4} +} + +func (m *ListenerFilter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListenerFilter.Unmarshal(m, b) +} +func (m *ListenerFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListenerFilter.Marshal(b, m, deterministic) +} +func (m *ListenerFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenerFilter.Merge(m, src) +} +func (m *ListenerFilter) XXX_Size() int { + return xxx_messageInfo_ListenerFilter.Size(m) +} +func (m *ListenerFilter) XXX_DiscardUnknown() { + xxx_messageInfo_ListenerFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenerFilter proto.InternalMessageInfo + +func (m *ListenerFilter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isListenerFilter_ConfigType interface { + isListenerFilter_ConfigType() +} + +type ListenerFilter_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type ListenerFilter_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*ListenerFilter_Config) isListenerFilter_ConfigType() {} + +func (*ListenerFilter_TypedConfig) isListenerFilter_ConfigType() {} + +func (m *ListenerFilter) GetConfigType() isListenerFilter_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *ListenerFilter) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*ListenerFilter_Config); ok { + return x.Config + } + return nil +} + +func (m *ListenerFilter) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*ListenerFilter_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +func (m *ListenerFilter) GetFilterDisabled() *ListenerFilterChainMatchPredicate { + if m != nil { + return m.FilterDisabled + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ListenerFilter) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ListenerFilter_Config)(nil), + (*ListenerFilter_TypedConfig)(nil), + } +} + +func init() { + proto.RegisterEnum("envoy.api.v2.listener.FilterChainMatch_ConnectionSourceType", FilterChainMatch_ConnectionSourceType_name, FilterChainMatch_ConnectionSourceType_value) + proto.RegisterType((*Filter)(nil), "envoy.api.v2.listener.Filter") + proto.RegisterType((*FilterChainMatch)(nil), "envoy.api.v2.listener.FilterChainMatch") + proto.RegisterType((*FilterChain)(nil), "envoy.api.v2.listener.FilterChain") + proto.RegisterType((*ListenerFilterChainMatchPredicate)(nil), "envoy.api.v2.listener.ListenerFilterChainMatchPredicate") + proto.RegisterType((*ListenerFilterChainMatchPredicate_MatchSet)(nil), "envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet") + proto.RegisterType((*ListenerFilter)(nil), "envoy.api.v2.listener.ListenerFilter") +} + +func init() { + proto.RegisterFile("envoy/api/v2/listener/listener_components.proto", fileDescriptor_30285372e511ffb4) +} + +var fileDescriptor_30285372e511ffb4 = []byte{ + // 1154 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xae, 0x1d, 0x67, 0x3d, 0xce, 0x9f, 0x65, 0x48, 0x9b, 0x25, 0xfd, 0x83, 0x6b, 0x44, + 0x89, 0x90, 0xd8, 0x95, 0x1c, 0xa1, 0x82, 0xe0, 0xe2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 0x71, 0x9c, 0x21, 0x0f, 0x11, 0x42, 0x05, 0x12, 0x09, 0x25, 0xdc, 0x1b, 0x25, 0x43, 0x86, 0x44, + 0x11, 0xf8, 0xda, 0x39, 0x3d, 0x17, 0x48, 0x8c, 0x0b, 0xf7, 0xad, 0x09, 0x4a, 0x93, 0x18, 0x09, + 0xec, 0x15, 0x1f, 0x4a, 0xd1, 0xf8, 0xc9, 0x00, 0x95, 0x8f, 0x92, 0x54, 0x60, 0x06, 0xaf, 0x80, + 0x32, 0x41, 0x23, 0xec, 0x18, 0x75, 0x63, 0xa7, 0xea, 0xaf, 0x9c, 0xfa, 0x65, 0x66, 0xd6, 0x8d, + 0x40, 0x0a, 0xe1, 0xbb, 0xa0, 0x12, 0x51, 0x32, 0x48, 0x86, 0x8e, 0x59, 0x37, 0x76, 0x6a, 0xcd, + 0x2d, 0x57, 0x25, 0xec, 0x16, 0x09, 0xbb, 0x7d, 0x79, 0x1d, 0xdf, 0x74, 0x8c, 0xfd, 0xa5, 0x40, + 0x1b, 0xc3, 0xf7, 0xc1, 0x6a, 0x5e, 0xa3, 0x38, 0xd4, 0xce, 0x65, 0xe9, 0xbc, 0x79, 0xce, 0xb9, + 0x45, 0xa6, 0xfb, 0x4b, 0x41, 0x4d, 0xda, 0xb6, 0xa5, 0xa9, 0xbf, 0x06, 0x6a, 0xca, 0x29, 0xcc, + 0xa5, 0x77, 0xcb, 0x56, 0xc9, 0x2e, 0x37, 0x7e, 0x5f, 0x06, 0xb6, 0x4a, 0xb7, 0xfd, 0x10, 0x25, + 0xe4, 0x00, 0x89, 0xe8, 0x21, 0x3c, 0x02, 0x76, 0x8c, 0xb9, 0x48, 0x88, 0xbc, 0x79, 0x98, 0x51, + 0x26, 0x1c, 0x4b, 0x06, 0xba, 0x7a, 0x2e, 0xd0, 0xbd, 0x3b, 0x44, 0xec, 0x36, 0xef, 0xa3, 0x74, + 0x8c, 0xfd, 0xda, 0xa9, 0x6f, 0xbd, 0x5d, 0x71, 0x9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x02, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x9d, 0xc1, 0x3d, 0xb6, 0x0a, + 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go new file mode 100644 index 0000000000..c47853ebcb --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go @@ -0,0 +1,742 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/listener/listener_components.proto + +package envoy_api_v2_listener + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _listener_components_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on Filter with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Filter) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return FilterValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + switch m.ConfigType.(type) { + + case *Filter_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Filter_TypedConfig: + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// FilterValidationError is the validation error returned by Filter.Validate if +// the designated constraints aren't met. +type FilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterValidationError) ErrorName() string { return "FilterValidationError" } + +// Error satisfies the builtin error interface +func (e FilterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterValidationError{} + +// Validate checks the field values on FilterChainMatch with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *FilterChainMatch) Validate() error { + if m == nil { + return nil + } + + if wrapper := m.GetDestinationPort(); wrapper != nil { + + if val := wrapper.GetValue(); val < 1 || val > 65535 { + return FilterChainMatchValidationError{ + field: "DestinationPort", + reason: "value must be inside range [1, 65535]", + } + } + + } + + for idx, item := range m.GetPrefixRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainMatchValidationError{ + field: fmt.Sprintf("PrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for AddressSuffix + + if v, ok := interface{}(m.GetSuffixLen()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainMatchValidationError{ + field: "SuffixLen", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { + return FilterChainMatchValidationError{ + field: "SourceType", + reason: "value must be one of the defined enum values", + } + } + + for idx, item := range m.GetSourcePrefixRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainMatchValidationError{ + field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetSourcePorts() { + _, _ = idx, item + + if val := item; val < 1 || val > 65535 { + return FilterChainMatchValidationError{ + field: fmt.Sprintf("SourcePorts[%v]", idx), + reason: "value must be inside range [1, 65535]", + } + } + + } + + // no validation rules for TransportProtocol + + return nil +} + +// FilterChainMatchValidationError is the validation error returned by +// FilterChainMatch.Validate if the designated constraints aren't met. +type FilterChainMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterChainMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterChainMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterChainMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterChainMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterChainMatchValidationError) ErrorName() string { return "FilterChainMatchValidationError" } + +// Error satisfies the builtin error interface +func (e FilterChainMatchValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFilterChainMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterChainMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterChainMatchValidationError{} + +// Validate checks the field values on FilterChain with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *FilterChain) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetFilterChainMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainValidationError{ + field: "FilterChainMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainValidationError{ + field: "TlsContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetFilters() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetUseProxyProto()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainValidationError{ + field: "UseProxyProto", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterChainValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Name + + return nil +} + +// FilterChainValidationError is the validation error returned by +// FilterChain.Validate if the designated constraints aren't met. +type FilterChainValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterChainValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterChainValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterChainValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterChainValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterChainValidationError) ErrorName() string { return "FilterChainValidationError" } + +// Error satisfies the builtin error interface +func (e FilterChainValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFilterChain.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterChainValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterChainValidationError{} + +// Validate checks the field values on ListenerFilterChainMatchPredicate with +// the rules defined in the proto definition for this message. If any rules +// are violated, an error is returned. +func (m *ListenerFilterChainMatchPredicate) Validate() error { + if m == nil { + return nil + } + + switch m.Rule.(type) { + + case *ListenerFilterChainMatchPredicate_OrMatch: + + if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterChainMatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ListenerFilterChainMatchPredicate_AndMatch: + + if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterChainMatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ListenerFilterChainMatchPredicate_NotMatch: + + if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterChainMatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ListenerFilterChainMatchPredicate_AnyMatch: + + if m.GetAnyMatch() != true { + return ListenerFilterChainMatchPredicateValidationError{ + field: "AnyMatch", + reason: "value must equal true", + } + } + + case *ListenerFilterChainMatchPredicate_DestinationPortRange: + + if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterChainMatchPredicateValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return ListenerFilterChainMatchPredicateValidationError{ + field: "Rule", + reason: "value is required", + } + + } + + return nil +} + +// ListenerFilterChainMatchPredicateValidationError is the validation error +// returned by ListenerFilterChainMatchPredicate.Validate if the designated +// constraints aren't met. +type ListenerFilterChainMatchPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenerFilterChainMatchPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenerFilterChainMatchPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenerFilterChainMatchPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenerFilterChainMatchPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenerFilterChainMatchPredicateValidationError) ErrorName() string { + return "ListenerFilterChainMatchPredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e ListenerFilterChainMatchPredicateValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListenerFilterChainMatchPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenerFilterChainMatchPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenerFilterChainMatchPredicateValidationError{} + +// Validate checks the field values on ListenerFilter with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ListenerFilter) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return ListenerFilterValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if v, ok := interface{}(m.GetFilterDisabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterValidationError{ + field: "FilterDisabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.ConfigType.(type) { + + case *ListenerFilter_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ListenerFilter_TypedConfig: + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ListenerFilterValidationError is the validation error returned by +// ListenerFilter.Validate if the designated constraints aren't met. +type ListenerFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenerFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenerFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenerFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenerFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenerFilterValidationError) ErrorName() string { return "ListenerFilterValidationError" } + +// Error satisfies the builtin error interface +func (e ListenerFilterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListenerFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenerFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenerFilterValidationError{} + +// Validate checks the field values on +// ListenerFilterChainMatchPredicate_MatchSet with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *ListenerFilterChainMatchPredicate_MatchSet) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRules()) < 2 { + return ListenerFilterChainMatchPredicate_MatchSetValidationError{ + field: "Rules", + reason: "value must contain at least 2 item(s)", + } + } + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerFilterChainMatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ListenerFilterChainMatchPredicate_MatchSetValidationError is the validation +// error returned by ListenerFilterChainMatchPredicate_MatchSet.Validate if +// the designated constraints aren't met. +type ListenerFilterChainMatchPredicate_MatchSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) ErrorName() string { + return "ListenerFilterChainMatchPredicate_MatchSetValidationError" +} + +// Error satisfies the builtin error interface +func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListenerFilterChainMatchPredicate_MatchSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenerFilterChainMatchPredicate_MatchSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenerFilterChainMatchPredicate_MatchSetValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go new file mode 100644 index 0000000000..bd5613cc2a --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/listener/quic_config.proto + +package envoy_api_v2_listener + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type QuicProtocolOptions struct { + MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` + IdleTimeout *duration.Duration `protobuf:"bytes,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` + CryptoHandshakeTimeout *duration.Duration `protobuf:"bytes,3,opt,name=crypto_handshake_timeout,json=cryptoHandshakeTimeout,proto3" json:"crypto_handshake_timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QuicProtocolOptions) Reset() { *m = QuicProtocolOptions{} } +func (m *QuicProtocolOptions) String() string { return proto.CompactTextString(m) } +func (*QuicProtocolOptions) ProtoMessage() {} +func (*QuicProtocolOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_1f6a4a402e708e40, []int{0} +} + +func (m *QuicProtocolOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QuicProtocolOptions.Unmarshal(m, b) +} +func (m *QuicProtocolOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QuicProtocolOptions.Marshal(b, m, deterministic) +} +func (m *QuicProtocolOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuicProtocolOptions.Merge(m, src) +} +func (m *QuicProtocolOptions) XXX_Size() int { + return xxx_messageInfo_QuicProtocolOptions.Size(m) +} +func (m *QuicProtocolOptions) XXX_DiscardUnknown() { + xxx_messageInfo_QuicProtocolOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_QuicProtocolOptions proto.InternalMessageInfo + +func (m *QuicProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { + if m != nil { + return m.MaxConcurrentStreams + } + return nil +} + +func (m *QuicProtocolOptions) GetIdleTimeout() *duration.Duration { + if m != nil { + return m.IdleTimeout + } + return nil +} + +func (m *QuicProtocolOptions) GetCryptoHandshakeTimeout() *duration.Duration { + if m != nil { + return m.CryptoHandshakeTimeout + } + return nil +} + +func init() { + proto.RegisterType((*QuicProtocolOptions)(nil), "envoy.api.v2.listener.QuicProtocolOptions") +} + +func init() { + proto.RegisterFile("envoy/api/v2/listener/quic_config.proto", fileDescriptor_1f6a4a402e708e40) +} + +var fileDescriptor_1f6a4a402e708e40 = []byte{ + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xb1, 0x4e, 0xeb, 0x30, + 0x14, 0x86, 0x95, 0x5e, 0xdd, 0x0e, 0xe9, 0x95, 0xee, 0x55, 0x2e, 0x94, 0x50, 0x01, 0x42, 0x30, + 0xc0, 0x64, 0x4b, 0xe9, 0xca, 0x42, 0x0b, 0x12, 0x48, 0x08, 0x4a, 0x0b, 0x5d, 0xa3, 0xd3, 0xc4, + 0x4d, 0x2d, 0x12, 0xdb, 0x38, 0x76, 0x68, 0x37, 0xde, 0x80, 0x85, 0x81, 0x67, 0xe0, 0x11, 0x78, + 0x02, 0x56, 0x5e, 0x83, 0x91, 0x19, 0x21, 0x14, 0x27, 0x81, 0xa1, 0x20, 0x46, 0xeb, 0xff, 0xbe, + 0x5f, 0x3e, 0xe7, 0xd8, 0x5b, 0x84, 0x65, 0x7c, 0x86, 0x41, 0x50, 0x9c, 0x79, 0x38, 0xa6, 0xa9, + 0x22, 0x8c, 0x48, 0x7c, 0xa9, 0x69, 0xe0, 0x07, 0x9c, 0x8d, 0x69, 0x84, 0x84, 0xe4, 0x8a, 0x3b, + 0x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xe2, 0x3a, 0xe5, 0xc5, 0xaa, 0xeb, 0xa0, 0xac, 0xfd, + 0x70, 0xfd, 0xf8, 0x54, 0xaf, 0xfd, 0xb3, 0xec, 0x4d, 0xca, 0x91, 0x81, 0x84, 0xe4, 0xd3, 0x19, + 0xfa, 0xf2, 0x9a, 0x9d, 0xbf, 0xf9, 0x2e, 0xbb, 0xa6, 0xc4, 0x6c, 0xb4, 0x67, 0xdd, 0xd7, 0x96, + 0xf6, 0x0d, 0xba, 0x2b, 0x28, 0x1a, 0x7a, 0xe8, 0xa8, 0x44, 0x8f, 0x07, 0xcf, 0xdf, 0x26, 0xa3, + 0xba, 0x99, 0xa0, 0xfd, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x12, 0xf9, 0x6d, 0x9e, 0x5d, 0x02, 0x00, + 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go new file mode 100644 index 0000000000..1707aa7d64 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/listener/quic_config.proto + +package envoy_api_v2_listener + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _quic_config_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on QuicProtocolOptions with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *QuicProtocolOptions) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetMaxConcurrentStreams()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicProtocolOptionsValidationError{ + field: "MaxConcurrentStreams", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicProtocolOptionsValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetCryptoHandshakeTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicProtocolOptionsValidationError{ + field: "CryptoHandshakeTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// 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{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go new file mode 100644 index 0000000000..4075ef0591 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go @@ -0,0 +1,180 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/listener/udp_listener_config.proto + +package envoy_api_v2_listener + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + _struct "github.com/golang/protobuf/ptypes/struct" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type UdpListenerConfig struct { + UdpListenerName string `protobuf:"bytes,1,opt,name=udp_listener_name,json=udpListenerName,proto3" json:"udp_listener_name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *UdpListenerConfig_Config + // *UdpListenerConfig_TypedConfig + ConfigType isUdpListenerConfig_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UdpListenerConfig) Reset() { *m = UdpListenerConfig{} } +func (m *UdpListenerConfig) String() string { return proto.CompactTextString(m) } +func (*UdpListenerConfig) ProtoMessage() {} +func (*UdpListenerConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_04a0b1c45e39fc83, []int{0} +} + +func (m *UdpListenerConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UdpListenerConfig.Unmarshal(m, b) +} +func (m *UdpListenerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UdpListenerConfig.Marshal(b, m, deterministic) +} +func (m *UdpListenerConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_UdpListenerConfig.Merge(m, src) +} +func (m *UdpListenerConfig) XXX_Size() int { + return xxx_messageInfo_UdpListenerConfig.Size(m) +} +func (m *UdpListenerConfig) XXX_DiscardUnknown() { + xxx_messageInfo_UdpListenerConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_UdpListenerConfig proto.InternalMessageInfo + +func (m *UdpListenerConfig) GetUdpListenerName() string { + if m != nil { + return m.UdpListenerName + } + return "" +} + +type isUdpListenerConfig_ConfigType interface { + isUdpListenerConfig_ConfigType() +} + +type UdpListenerConfig_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type UdpListenerConfig_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*UdpListenerConfig_Config) isUdpListenerConfig_ConfigType() {} + +func (*UdpListenerConfig_TypedConfig) isUdpListenerConfig_ConfigType() {} + +func (m *UdpListenerConfig) GetConfigType() isUdpListenerConfig_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *UdpListenerConfig) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*UdpListenerConfig_Config); ok { + return x.Config + } + return nil +} + +func (m *UdpListenerConfig) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*UdpListenerConfig_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*UdpListenerConfig) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*UdpListenerConfig_Config)(nil), + (*UdpListenerConfig_TypedConfig)(nil), + } +} + +type ActiveRawUdpListenerConfig struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ActiveRawUdpListenerConfig) Reset() { *m = ActiveRawUdpListenerConfig{} } +func (m *ActiveRawUdpListenerConfig) String() string { return proto.CompactTextString(m) } +func (*ActiveRawUdpListenerConfig) ProtoMessage() {} +func (*ActiveRawUdpListenerConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_04a0b1c45e39fc83, []int{1} +} + +func (m *ActiveRawUdpListenerConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ActiveRawUdpListenerConfig.Unmarshal(m, b) +} +func (m *ActiveRawUdpListenerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ActiveRawUdpListenerConfig.Marshal(b, m, deterministic) +} +func (m *ActiveRawUdpListenerConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_ActiveRawUdpListenerConfig.Merge(m, src) +} +func (m *ActiveRawUdpListenerConfig) XXX_Size() int { + return xxx_messageInfo_ActiveRawUdpListenerConfig.Size(m) +} +func (m *ActiveRawUdpListenerConfig) XXX_DiscardUnknown() { + xxx_messageInfo_ActiveRawUdpListenerConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_ActiveRawUdpListenerConfig proto.InternalMessageInfo + +func init() { + proto.RegisterType((*UdpListenerConfig)(nil), "envoy.api.v2.listener.UdpListenerConfig") + proto.RegisterType((*ActiveRawUdpListenerConfig)(nil), "envoy.api.v2.listener.ActiveRawUdpListenerConfig") +} + +func init() { + proto.RegisterFile("envoy/api/v2/listener/udp_listener_config.proto", fileDescriptor_04a0b1c45e39fc83) +} + +var fileDescriptor_04a0b1c45e39fc83 = []byte{ + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4a, 0xeb, 0x40, + 0x18, 0x85, 0x3b, 0xb9, 0xdc, 0xc2, 0x9d, 0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0x3e, + 0x84, 0x75, 0x53, 0xd0, 0xb1, 0x3a, 0xa0, 0xd7, 0xf0, 0x5a, 0xc8, 0xf0, 0xa2, 0x92, 0x17, 0x8d, + 0x35, 0xaf, 0x6f, 0x39, 0x60, 0x58, 0x0b, 0x0a, 0xb3, 0x7d, 0x04, 0xff, 0xab, 0x5c, 0xd2, 0xb0, + 0x58, 0xc7, 0xf9, 0xa3, 0xc3, 0x9b, 0x95, 0xf0, 0x80, 0xe7, 0xc3, 0x5a, 0xd0, 0xd0, 0x5e, 0x43, + 0xe7, 0xaf, 0xc1, 0x86, 0x09, 0x4d, 0x56, 0x7f, 0xbb, 0x6d, 0xe8, 0x0e, 0x66, 0x8a, 0x65, 0x34, + 0x20, 0x97, 0x95, 0x2a, 0xfe, 0x1d, 0x78, 0xbd, 0x7d, 0xbb, 0xf9, 0xeb, 0xda, 0x8e, 0x19, 0xbe, + 0x38, 0x46, 0x59, 0x0d, 0x65, 0xfd, 0x87, 0xeb, 0xa7, 0xe7, 0xba, 0xb5, 0x01, 0xe0, 0x3e, 0x13, + 0x48, 0x9b, 0x64, 0x2c, 0xae, 0x72, 0xf4, 0xe3, 0xa1, 0xfc, 0xed, 0xca, 0x13, 0xa3, 0x15, 0xea, + 0x08, 0xdc, 0x5b, 0xad, 0x13, 0x9d, 0x18, 0x48, 0x86, 0x2e, 0x3c, 0xf4, 0x31, 0xd2, 0xf8, 0xe5, + 0x57, 0x65, 0x5a, 0xd7, 0x3d, 0xfb, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x44, 0x9f, 0x13, + 0x47, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go new file mode 100644 index 0000000000..67c4be34cc --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/listener/udp_listener_config.proto + +package envoy_api_v2_listener + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _udp_listener_config_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on UdpListenerConfig with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *UdpListenerConfig) Validate() error { + if m == nil { + return nil + } + + // no validation rules for UdpListenerName + + switch m.ConfigType.(type) { + + case *UdpListenerConfig_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpListenerConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *UdpListenerConfig_TypedConfig: + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpListenerConfigValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// UdpListenerConfigValidationError is the validation error returned by +// UdpListenerConfig.Validate if the designated constraints aren't met. +type UdpListenerConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UdpListenerConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UdpListenerConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UdpListenerConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UdpListenerConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UdpListenerConfigValidationError) ErrorName() string { + return "UdpListenerConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e UdpListenerConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUdpListenerConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UdpListenerConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UdpListenerConfigValidationError{} + +// Validate checks the field values on ActiveRawUdpListenerConfig with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ActiveRawUdpListenerConfig) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// ActiveRawUdpListenerConfigValidationError is the validation error returned +// by ActiveRawUdpListenerConfig.Validate if the designated constraints aren't met. +type ActiveRawUdpListenerConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActiveRawUdpListenerConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActiveRawUdpListenerConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActiveRawUdpListenerConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActiveRawUdpListenerConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActiveRawUdpListenerConfigValidationError) ErrorName() string { + return "ActiveRawUdpListenerConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e ActiveRawUdpListenerConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sActiveRawUdpListenerConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActiveRawUdpListenerConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActiveRawUdpListenerConfigValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go index bd459b749d..630184048d 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go @@ -1,24 +1,21 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/rds.proto -package v2 +package envoy_api_v2 import ( - bytes "bytes" context "context" fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/googleapis/google/api" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + _ "github.com/golang/protobuf/ptypes/wrappers" + _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -30,375 +27,74 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// [#comment:next free field: 10] -type RouteConfiguration struct { - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.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 []route.VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts"` - // 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. - // [#not-implemented-hide:] - 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_api_msg_route.VirtualHost` or - // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*core.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_api_msg_route.VirtualHost` or - // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.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"` - // 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 which to override the default behavior in certain cases (for example when - // using CDS with a static route table). - ValidateClusters *types.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type RdsDummy struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RouteConfiguration) Reset() { *m = RouteConfiguration{} } -func (m *RouteConfiguration) String() string { return proto.CompactTextString(m) } -func (*RouteConfiguration) ProtoMessage() {} -func (*RouteConfiguration) Descriptor() ([]byte, []int) { +func (m *RdsDummy) Reset() { *m = RdsDummy{} } +func (m *RdsDummy) String() string { return proto.CompactTextString(m) } +func (*RdsDummy) ProtoMessage() {} +func (*RdsDummy) Descriptor() ([]byte, []int) { return fileDescriptor_78812f46dcff924a, []int{0} } -func (m *RouteConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (m *RdsDummy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RdsDummy.Unmarshal(m, b) } -func (m *RouteConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RouteConfiguration.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (m *RdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RdsDummy.Marshal(b, m, deterministic) } -func (m *RouteConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteConfiguration.Merge(m, src) +func (m *RdsDummy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RdsDummy.Merge(m, src) } -func (m *RouteConfiguration) XXX_Size() int { - return m.Size() +func (m *RdsDummy) XXX_Size() int { + return xxx_messageInfo_RdsDummy.Size(m) } -func (m *RouteConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_RouteConfiguration.DiscardUnknown(m) +func (m *RdsDummy) XXX_DiscardUnknown() { + xxx_messageInfo_RdsDummy.DiscardUnknown(m) } -var xxx_messageInfo_RouteConfiguration proto.InternalMessageInfo - -func (m *RouteConfiguration) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *RouteConfiguration) GetVirtualHosts() []route.VirtualHost { - if m != nil { - return m.VirtualHosts - } - return nil -} - -func (m *RouteConfiguration) GetVhds() *Vhds { - if m != nil { - return m.Vhds - } - return nil -} - -func (m *RouteConfiguration) GetInternalOnlyHeaders() []string { - if m != nil { - return m.InternalOnlyHeaders - } - return nil -} - -func (m *RouteConfiguration) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.ResponseHeadersToAdd - } - return nil -} - -func (m *RouteConfiguration) GetResponseHeadersToRemove() []string { - if m != nil { - return m.ResponseHeadersToRemove - } - return nil -} - -func (m *RouteConfiguration) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.RequestHeadersToAdd - } - return nil -} - -func (m *RouteConfiguration) GetRequestHeadersToRemove() []string { - if m != nil { - return m.RequestHeadersToRemove - } - return nil -} - -func (m *RouteConfiguration) GetValidateClusters() *types.BoolValue { - if m != nil { - return m.ValidateClusters - } - return nil -} - -// [#not-implemented-hide:] -type Vhds struct { - // Configuration source specifier for VHDS. - ConfigSource core.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Vhds) Reset() { *m = Vhds{} } -func (m *Vhds) String() string { return proto.CompactTextString(m) } -func (*Vhds) ProtoMessage() {} -func (*Vhds) Descriptor() ([]byte, []int) { - return fileDescriptor_78812f46dcff924a, []int{1} -} -func (m *Vhds) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Vhds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Vhds.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Vhds) XXX_Merge(src proto.Message) { - xxx_messageInfo_Vhds.Merge(m, src) -} -func (m *Vhds) XXX_Size() int { - return m.Size() -} -func (m *Vhds) XXX_DiscardUnknown() { - xxx_messageInfo_Vhds.DiscardUnknown(m) -} - -var xxx_messageInfo_Vhds proto.InternalMessageInfo - -func (m *Vhds) GetConfigSource() core.ConfigSource { - if m != nil { - return m.ConfigSource - } - return core.ConfigSource{} -} +var xxx_messageInfo_RdsDummy proto.InternalMessageInfo func init() { - proto.RegisterType((*RouteConfiguration)(nil), "envoy.api.v2.RouteConfiguration") - proto.RegisterType((*Vhds)(nil), "envoy.api.v2.Vhds") + proto.RegisterType((*RdsDummy)(nil), "envoy.api.v2.RdsDummy") } func init() { proto.RegisterFile("envoy/api/v2/rds.proto", fileDescriptor_78812f46dcff924a) } var fileDescriptor_78812f46dcff924a = []byte{ - // 673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 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, 0xb3, 0xaa, 0xd7, 0xcf, - 0xa9, 0x12, 0x68, 0xa2, 0xf4, 0xe6, 0xbf, 0x49, 0x85, 0xfa, 0x80, 0xab, 0xf7, 0x99, 0xb4, 0xdd, - 0xcb, 0x72, 0xdd, 0x7a, 0xf1, 0xf9, 0xfb, 0xdb, 0xd2, 0x46, 0x67, 0xa5, 0xf0, 0x39, 0xda, 0x52, - 0x4f, 0x55, 0x6c, 0xa1, 0x5b, 0xc6, 0x4b, 0x84, 0xaf, 0x8e, 0x3d, 0xd9, 0x89, 0x73, 0x74, 0xf0, - 0x92, 0x32, 0xdc, 0x1f, 0x7f, 0xc3, 0x97, 0x3d, 0x76, 0x6f, 0xfb, 0xdd, 0xa8, 0x89, 0xce, 0x46, - 0x4d, 0xf4, 0x69, 0xd4, 0x44, 0x5f, 0x47, 0x4d, 0x84, 0x1b, 0x1e, 0xa4, 0xfa, 0x90, 0xc3, 0xf3, - 0x61, 0xa1, 0x54, 0x6f, 0xce, 0x74, 0xc4, 0x41, 0x12, 0xbe, 0x03, 0xf4, 0x0a, 0xa1, 0xe3, 0x19, - 0x15, 0xc4, 0x3b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x13, 0x2b, 0xc3, 0xe7, 0x05, 0x00, - 0x00, -} - -func (this *RouteConfiguration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteConfiguration) - if !ok { - that2, ok := that.(RouteConfiguration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.VirtualHosts) != len(that1.VirtualHosts) { - return false - } - for i := range this.VirtualHosts { - if !this.VirtualHosts[i].Equal(&that1.VirtualHosts[i]) { - return false - } - } - if !this.Vhds.Equal(that1.Vhds) { - return false - } - if len(this.InternalOnlyHeaders) != len(that1.InternalOnlyHeaders) { - return false - } - for i := range this.InternalOnlyHeaders { - if this.InternalOnlyHeaders[i] != that1.InternalOnlyHeaders[i] { - return false - } - } - if len(this.ResponseHeadersToAdd) != len(that1.ResponseHeadersToAdd) { - return false - } - for i := range this.ResponseHeadersToAdd { - if !this.ResponseHeadersToAdd[i].Equal(that1.ResponseHeadersToAdd[i]) { - return false - } - } - if len(this.ResponseHeadersToRemove) != len(that1.ResponseHeadersToRemove) { - return false - } - for i := range this.ResponseHeadersToRemove { - if this.ResponseHeadersToRemove[i] != that1.ResponseHeadersToRemove[i] { - return false - } - } - if len(this.RequestHeadersToAdd) != len(that1.RequestHeadersToAdd) { - return false - } - for i := range this.RequestHeadersToAdd { - if !this.RequestHeadersToAdd[i].Equal(that1.RequestHeadersToAdd[i]) { - return false - } - } - if len(this.RequestHeadersToRemove) != len(that1.RequestHeadersToRemove) { - return false - } - for i := range this.RequestHeadersToRemove { - if this.RequestHeadersToRemove[i] != that1.RequestHeadersToRemove[i] { - return false - } - } - if !this.ValidateClusters.Equal(that1.ValidateClusters) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Vhds) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Vhds) - if !ok { - that2, ok := that.(Vhds) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ConfigSource.Equal(&that1.ConfigSource) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + // 432 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3d, 0x6f, 0xd3, 0x40, + 0x1c, 0xc6, 0xb9, 0x20, 0x12, 0x74, 0xc9, 0x00, 0x16, 0x84, 0xc8, 0x84, 0x24, 0x84, 0x57, 0x31, + 0xd8, 0xc8, 0xd9, 0x32, 0x86, 0x08, 0x31, 0x86, 0x44, 0x30, 0x22, 0x5d, 0xec, 0x8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, 0x80, 0x59, 0x63, 0x59, 0xd7, + 0x31, 0x1c, 0x9d, 0x05, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x78, 0xb9, 0xf4, 0x9e, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -504,6 +200,20 @@ type RouteDiscoveryServiceServer interface { FetchRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) } +// UnimplementedRouteDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedRouteDiscoveryServiceServer struct { +} + +func (*UnimplementedRouteDiscoveryServiceServer) StreamRoutes(srv RouteDiscoveryService_StreamRoutesServer) error { + return status.Errorf(codes.Unimplemented, "method StreamRoutes not implemented") +} +func (*UnimplementedRouteDiscoveryServiceServer) DeltaRoutes(srv RouteDiscoveryService_DeltaRoutesServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaRoutes not implemented") +} +func (*UnimplementedRouteDiscoveryServiceServer) FetchRoutes(ctx context.Context, req *DiscoveryRequest) (*DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchRoutes not implemented") +} + func RegisterRouteDiscoveryServiceServer(s *grpc.Server, srv RouteDiscoveryServiceServer) { s.RegisterService(&_RouteDiscoveryService_serviceDesc, srv) } @@ -655,6 +365,14 @@ type VirtualHostDiscoveryServiceServer interface { DeltaVirtualHosts(VirtualHostDiscoveryService_DeltaVirtualHostsServer) error } +// UnimplementedVirtualHostDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedVirtualHostDiscoveryServiceServer struct { +} + +func (*UnimplementedVirtualHostDiscoveryServiceServer) DeltaVirtualHosts(srv VirtualHostDiscoveryService_DeltaVirtualHostsServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaVirtualHosts not implemented") +} + func RegisterVirtualHostDiscoveryServiceServer(s *grpc.Server, srv VirtualHostDiscoveryServiceServer) { s.RegisterService(&_VirtualHostDiscoveryService_serviceDesc, srv) } @@ -699,810 +417,3 @@ var _VirtualHostDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, Metadata: "envoy/api/v2/rds.proto", } - -func (m *RouteConfiguration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteConfiguration) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRds(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.VirtualHosts) > 0 { - for _, msg := range m.VirtualHosts { - dAtA[i] = 0x12 - i++ - i = encodeVarintRds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.InternalOnlyHeaders) > 0 { - for _, s := range m.InternalOnlyHeaders { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, msg := range m.ResponseHeadersToAdd { - dAtA[i] = 0x22 - i++ - i = encodeVarintRds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.RequestHeadersToAdd) > 0 { - for _, msg := range m.RequestHeadersToAdd { - dAtA[i] = 0x32 - i++ - i = encodeVarintRds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.ValidateClusters != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintRds(dAtA, i, uint64(m.ValidateClusters.Size())) - n1, err := m.ValidateClusters.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - dAtA[i] = 0x42 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.Vhds != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintRds(dAtA, i, uint64(m.Vhds.Size())) - n2, err := m.Vhds.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Vhds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Vhds) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintRds(dAtA, i, uint64(m.ConfigSource.Size())) - n3, err := m.ConfigSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintRds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *RouteConfiguration) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRds(uint64(l)) - } - if len(m.VirtualHosts) > 0 { - for _, e := range m.VirtualHosts { - l = e.Size() - n += 1 + l + sovRds(uint64(l)) - } - } - if len(m.InternalOnlyHeaders) > 0 { - for _, s := range m.InternalOnlyHeaders { - l = len(s) - n += 1 + l + sovRds(uint64(l)) - } - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, e := range m.ResponseHeadersToAdd { - l = e.Size() - n += 1 + l + sovRds(uint64(l)) - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - l = len(s) - n += 1 + l + sovRds(uint64(l)) - } - } - if len(m.RequestHeadersToAdd) > 0 { - for _, e := range m.RequestHeadersToAdd { - l = e.Size() - n += 1 + l + sovRds(uint64(l)) - } - } - if m.ValidateClusters != nil { - l = m.ValidateClusters.Size() - n += 1 + l + sovRds(uint64(l)) - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - l = len(s) - n += 1 + l + sovRds(uint64(l)) - } - } - if m.Vhds != nil { - l = m.Vhds.Size() - n += 1 + l + sovRds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Vhds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConfigSource.Size() - n += 1 + l + sovRds(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozRds(x uint64) (n int) { - return sovRds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RouteConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteConfiguration: 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 ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRds - } - 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 VirtualHosts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VirtualHosts = append(m.VirtualHosts, route.VirtualHost{}) - if err := m.VirtualHosts[len(m.VirtualHosts)-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 InternalOnlyHeaders", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InternalOnlyHeaders = append(m.InternalOnlyHeaders, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToAdd = append(m.ResponseHeadersToAdd, &core.HeaderValueOption{}) - if err := m.ResponseHeadersToAdd[len(m.ResponseHeadersToAdd)-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 ResponseHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToRemove = append(m.ResponseHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToAdd = append(m.RequestHeadersToAdd, &core.HeaderValueOption{}) - if err := m.RequestHeadersToAdd[len(m.RequestHeadersToAdd)-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 ValidateClusters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidateClusters == nil { - m.ValidateClusters = &types.BoolValue{} - } - if err := m.ValidateClusters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToRemove = append(m.RequestHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vhds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vhds == nil { - m.Vhds = &Vhds{} - } - if err := m.Vhds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRds - } - 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 *Vhds) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Vhds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Vhds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigSource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConfigSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRds - } - 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 skipRds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRds - } - 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, ErrIntOverflowRds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRds - } - 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, ErrInvalidLengthRds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthRds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go index a4a6cc5f33..c1e18ced48 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/rds.proto -package v2 +package envoy_api_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,129 +30,25 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on RouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteConfiguration) Validate() error { +// define the regex for a UUID once up-front +var _rds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on RdsDummy with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *RdsDummy) Validate() error { if m == nil { return nil } - // no validation rules for Name - - for idx, item := range m.GetVirtualHosts() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetVhds() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - return RouteConfigurationValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - return RouteConfigurationValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetValidateClusters() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - return nil } -// RouteConfigurationValidationError is the validation error returned by -// RouteConfiguration.Validate if the designated constraints aren't met. -type RouteConfigurationValidationError struct { +// RdsDummyValidationError is the validation error returned by +// RdsDummy.Validate if the designated constraints aren't met. +type RdsDummyValidationError struct { field string reason string cause error @@ -160,24 +56,22 @@ type RouteConfigurationValidationError struct { } // Field function returns field value. -func (e RouteConfigurationValidationError) Field() string { return e.field } +func (e RdsDummyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RouteConfigurationValidationError) Reason() string { return e.reason } +func (e RdsDummyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RouteConfigurationValidationError) Cause() error { return e.cause } +func (e RdsDummyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RouteConfigurationValidationError) Key() bool { return e.key } +func (e RdsDummyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RouteConfigurationValidationError) ErrorName() string { - return "RouteConfigurationValidationError" -} +func (e RdsDummyValidationError) ErrorName() string { return "RdsDummyValidationError" } // Error satisfies the builtin error interface -func (e RouteConfigurationValidationError) Error() string { +func (e RdsDummyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -189,14 +83,14 @@ func (e RouteConfigurationValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRouteConfiguration.%s: %s%s", + "invalid %sRdsDummy.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RouteConfigurationValidationError{} +var _ error = RdsDummyValidationError{} var _ interface { Field() string @@ -204,83 +98,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RouteConfigurationValidationError{} - -// Validate checks the field values on Vhds with the rules defined in the proto -// definition for this message. If any rules are violated, an error is returned. -func (m *Vhds) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetConfigSource() - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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{} +} = RdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go new file mode 100644 index 0000000000..d66e8a2f54 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go @@ -0,0 +1,226 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/route.proto + +package envoy_api_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type RouteConfiguration struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + VirtualHosts []*route.VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts,omitempty"` + Vhds *Vhds `protobuf:"bytes,9,opt,name=vhds,proto3" json:"vhds,omitempty"` + InternalOnlyHeaders []string `protobuf:"bytes,3,rep,name=internal_only_headers,json=internalOnlyHeaders,proto3" json:"internal_only_headers,omitempty"` + ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + ResponseHeadersToRemove []string `protobuf:"bytes,5,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` + RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` + MostSpecificHeaderMutationsWins bool `protobuf:"varint,10,opt,name=most_specific_header_mutations_wins,json=mostSpecificHeaderMutationsWins,proto3" json:"most_specific_header_mutations_wins,omitempty"` + ValidateClusters *wrappers.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteConfiguration) Reset() { *m = RouteConfiguration{} } +func (m *RouteConfiguration) String() string { return proto.CompactTextString(m) } +func (*RouteConfiguration) ProtoMessage() {} +func (*RouteConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_1f33b4742f398551, []int{0} +} + +func (m *RouteConfiguration) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteConfiguration.Unmarshal(m, b) +} +func (m *RouteConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteConfiguration.Marshal(b, m, deterministic) +} +func (m *RouteConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteConfiguration.Merge(m, src) +} +func (m *RouteConfiguration) XXX_Size() int { + return xxx_messageInfo_RouteConfiguration.Size(m) +} +func (m *RouteConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_RouteConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteConfiguration proto.InternalMessageInfo + +func (m *RouteConfiguration) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *RouteConfiguration) GetVirtualHosts() []*route.VirtualHost { + if m != nil { + return m.VirtualHosts + } + return nil +} + +func (m *RouteConfiguration) GetVhds() *Vhds { + if m != nil { + return m.Vhds + } + return nil +} + +func (m *RouteConfiguration) GetInternalOnlyHeaders() []string { + if m != nil { + return m.InternalOnlyHeaders + } + return nil +} + +func (m *RouteConfiguration) GetResponseHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.ResponseHeadersToAdd + } + return nil +} + +func (m *RouteConfiguration) GetResponseHeadersToRemove() []string { + if m != nil { + return m.ResponseHeadersToRemove + } + return nil +} + +func (m *RouteConfiguration) GetRequestHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.RequestHeadersToAdd + } + return nil +} + +func (m *RouteConfiguration) GetRequestHeadersToRemove() []string { + if m != nil { + return m.RequestHeadersToRemove + } + return nil +} + +func (m *RouteConfiguration) GetMostSpecificHeaderMutationsWins() bool { + if m != nil { + return m.MostSpecificHeaderMutationsWins + } + return false +} + +func (m *RouteConfiguration) GetValidateClusters() *wrappers.BoolValue { + if m != nil { + return m.ValidateClusters + } + return nil +} + +type Vhds struct { + ConfigSource *core.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Vhds) Reset() { *m = Vhds{} } +func (m *Vhds) String() string { return proto.CompactTextString(m) } +func (*Vhds) ProtoMessage() {} +func (*Vhds) Descriptor() ([]byte, []int) { + return fileDescriptor_1f33b4742f398551, []int{1} +} + +func (m *Vhds) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Vhds.Unmarshal(m, b) +} +func (m *Vhds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Vhds.Marshal(b, m, deterministic) +} +func (m *Vhds) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vhds.Merge(m, src) +} +func (m *Vhds) XXX_Size() int { + return xxx_messageInfo_Vhds.Size(m) +} +func (m *Vhds) XXX_DiscardUnknown() { + xxx_messageInfo_Vhds.DiscardUnknown(m) +} + +var xxx_messageInfo_Vhds proto.InternalMessageInfo + +func (m *Vhds) GetConfigSource() *core.ConfigSource { + if m != nil { + return m.ConfigSource + } + return nil +} + +func init() { + proto.RegisterType((*RouteConfiguration)(nil), "envoy.api.v2.RouteConfiguration") + proto.RegisterType((*Vhds)(nil), "envoy.api.v2.Vhds") +} + +func init() { proto.RegisterFile("envoy/api/v2/route.proto", fileDescriptor_1f33b4742f398551) } + +var fileDescriptor_1f33b4742f398551 = []byte{ + // 610 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xe6, 0x9a, 0x1f, 0x4d, 0xae, 0xad, 0x14, 0xae, 0xb4, 0x31, 0x11, 0xd0, 0xa8, 0xfc, 0x50, + 0x58, 0x6c, 0x29, 0xfd, 0x0b, 0x70, 0x2b, 0x51, 0x09, 0x4a, 0x2b, 0x17, 0x85, 0xd1, 0xba, 0xda, + 0x97, 0xe4, 0x24, 0xe7, 0x9e, 0xb9, 0x3b, 0xbb, 0x64, 0x63, 0x66, 0x41, 0xea, 0xc4, 0xdf, 0xc2, + 0xc4, 0xd8, 0x95, 0x3f, 0x80, 0x9d, 0x99, 0x31, 0x03, 0x42, 0x3e, 0xdb, 0x50, 0x37, 0xed, 0xc2, + 0x12, 0xf9, 0xf2, 0xbe, 0xef, 0x7b, 0xdf, 0xbd, 0xfb, 0x1e, 0xb6, 0x98, 0x48, 0x61, 0xee, 0xd0, + 0x98, 0x3b, 0xe9, 0xd0, 0x91, 0x90, 0x68, 0x66, 0xc7, 0x12, 0x34, 0x90, 0x75, 0x53, 0xb1, 0x69, + 0xcc, 0xed, 0x74, 0xd8, 0x7b, 0x50, 0xc1, 0x05, 0x20, 0x99, 0x73, 0x46, 0x55, 0x81, 0xed, 0x3d, + 0x5d, 0xae, 0x06, 0x20, 0xc6, 0x7c, 0xe2, 0x2b, 0x48, 0x64, 0x50, 0xc2, 0x9e, 0x2f, 0x37, 0xcb, + 0x7f, 0xfd, 0x00, 0x66, 0x31, 0x08, 0x26, 0xb4, 0x2a, 0xa0, 0x8f, 0x26, 0x00, 0x93, 0x88, 0x39, + 0xe6, 0x74, 0x96, 0x8c, 0x9d, 0x73, 0x49, 0xe3, 0x98, 0xc9, 0xbf, 0xf5, 0x24, 0x8c, 0xa9, 0x43, + 0x85, 0x00, 0x4d, 0x35, 0x07, 0xa1, 0x9c, 0x19, 0x9f, 0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, 0xf5, 0xe5, 0xf7, 0xe7, 0x46, 0x97, 0x6c, 0xe5, 0xfc, 0xbc, + 0x56, 0x84, 0x3f, 0xdd, 0xfb, 0xfa, 0xf1, 0xf2, 0x7b, 0x73, 0xa5, 0x83, 0x70, 0x8f, 0x43, 0xde, + 0x21, 0x96, 0xf0, 0x61, 0x5e, 0x69, 0xe6, 0x62, 0xb3, 0x77, 0x27, 0xd9, 0x2d, 0x4e, 0xd0, 0x59, + 0xd3, 0x5c, 0x67, 0xef, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x12, 0x5f, 0x3d, 0xf9, 0xa1, 0x04, + 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go new file mode 100644 index 0000000000..0da80ece23 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go @@ -0,0 +1,310 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/route.proto + +package envoy_api_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _route_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on RouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RouteConfiguration) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + for idx, item := range m.GetVirtualHosts() { + _, _ = idx, item + + 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 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) { + return RouteConfigurationValidationError{ + field: fmt.Sprintf("InternalOnlyHeaders[%v]", idx), + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + } + + if len(m.GetResponseHeadersToAdd()) > 1000 { + return RouteConfigurationValidationError{ + field: "ResponseHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + 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) { + return RouteConfigurationValidationError{ + field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + } + + if len(m.GetRequestHeadersToAdd()) > 1000 { + return RouteConfigurationValidationError{ + field: "RequestHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetRequestHeadersToAdd() { + _, _ = idx, item + + 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) { + return RouteConfigurationValidationError{ + field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + } + + // no validation rules for MostSpecificHeaderMutationsWins + + 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, + } + } + } + + return nil +} + +// 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, an error is returned. +func (m *Vhds) Validate() error { + if m == nil { + return nil + } + + if m.GetConfigSource() == nil { + return VhdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + } + + 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, + } + } + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go index cce788c7df..58198b5de2 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go @@ -1,18518 +1,38 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/api/v2/route/route.proto -package route +package envoy_api_v2_route import ( - bytes "bytes" fmt "fmt" - io "io" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" math "math" - time "time" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _type "github.com/envoyproxy/go-control-plane/envoy/type" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -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 -) - -var VirtualHost_TlsRequirementType_name = map[int32]string{ - 0: "NONE", - 1: "EXTERNAL_ONLY", - 2: "ALL", -} - -var VirtualHost_TlsRequirementType_value = map[string]int32{ - "NONE": 0, - "EXTERNAL_ONLY": 1, - "ALL": 2, -} - -func (x VirtualHost_TlsRequirementType) String() string { - return proto.EnumName(VirtualHost_TlsRequirementType_name, int32(x)) -} - -func (VirtualHost_TlsRequirementType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []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 -) - -var RouteAction_ClusterNotFoundResponseCode_name = map[int32]string{ - 0: "SERVICE_UNAVAILABLE", - 1: "NOT_FOUND", -} - -var RouteAction_ClusterNotFoundResponseCode_value = map[string]int32{ - "SERVICE_UNAVAILABLE": 0, - "NOT_FOUND": 1, -} - -func (x RouteAction_ClusterNotFoundResponseCode) String() string { - return proto.EnumName(RouteAction_ClusterNotFoundResponseCode_name, int32(x)) -} - -func (RouteAction_ClusterNotFoundResponseCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 0} -} - -// Configures :ref:`internal redirect ` behavior. -type RouteAction_InternalRedirectAction int32 - -const ( - RouteAction_PASS_THROUGH_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 0 - RouteAction_HANDLE_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 1 -) - -var RouteAction_InternalRedirectAction_name = map[int32]string{ - 0: "PASS_THROUGH_INTERNAL_REDIRECT", - 1: "HANDLE_INTERNAL_REDIRECT", -} - -var RouteAction_InternalRedirectAction_value = map[string]int32{ - "PASS_THROUGH_INTERNAL_REDIRECT": 0, - "HANDLE_INTERNAL_REDIRECT": 1, -} - -func (x RouteAction_InternalRedirectAction) String() string { - return proto.EnumName(RouteAction_InternalRedirectAction_name, int32(x)) -} - -func (RouteAction_InternalRedirectAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 1} -} - -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 -) - -var RedirectAction_RedirectResponseCode_name = map[int32]string{ - 0: "MOVED_PERMANENTLY", - 1: "FOUND", - 2: "SEE_OTHER", - 3: "TEMPORARY_REDIRECT", - 4: "PERMANENT_REDIRECT", -} - -var RedirectAction_RedirectResponseCode_value = map[string]int32{ - "MOVED_PERMANENTLY": 0, - "FOUND": 1, - "SEE_OTHER": 2, - "TEMPORARY_REDIRECT": 3, - "PERMANENT_REDIRECT": 4, -} - -func (x RedirectAction_RedirectResponseCode) String() string { - return proto.EnumName(RedirectAction_RedirectResponseCode_name, int32(x)) -} - -func (RedirectAction_RedirectResponseCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{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. -// [#comment:next free field: 17] -type VirtualHost struct { - // 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 []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. - Routes []Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes"` - // 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.api.v2.route.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_api_msg_route.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.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_api_msg_route.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*core.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. - 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 filter name, such as - // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - PerFilterConfig map[string]*types.Struct `protobuf:"bytes,12,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The per_filter_config field can be used to provide virtual host-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - TypedPerFilterConfig map[string]*types.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. - IncludeRequestAttemptCount bool `protobuf:"varint,14,opt,name=include_request_attempt_count,json=includeRequestAttemptCount,proto3" json:"include_request_attempt_count,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"` - // 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). - // [#not-implemented-hide:] - HedgePolicy *HedgePolicy `protobuf:"bytes,17,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VirtualHost) Reset() { *m = VirtualHost{} } -func (m *VirtualHost) String() string { return proto.CompactTextString(m) } -func (*VirtualHost) ProtoMessage() {} -func (*VirtualHost) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{0} -} -func (m *VirtualHost) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VirtualHost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VirtualHost) XXX_Merge(src proto.Message) { - xxx_messageInfo_VirtualHost.Merge(m, src) -} -func (m *VirtualHost) XXX_Size() int { - return m.Size() -} -func (m *VirtualHost) XXX_DiscardUnknown() { - xxx_messageInfo_VirtualHost.DiscardUnknown(m) -} - -var xxx_messageInfo_VirtualHost proto.InternalMessageInfo - -func (m *VirtualHost) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *VirtualHost) GetDomains() []string { - if m != nil { - return m.Domains - } - return nil -} - -func (m *VirtualHost) GetRoutes() []Route { - if m != nil { - return m.Routes - } - return nil -} - -func (m *VirtualHost) GetRequireTls() VirtualHost_TlsRequirementType { - if m != nil { - return m.RequireTls - } - return VirtualHost_NONE -} - -func (m *VirtualHost) GetVirtualClusters() []*VirtualCluster { - if m != nil { - return m.VirtualClusters - } - return nil -} - -func (m *VirtualHost) GetRateLimits() []*RateLimit { - if m != nil { - return m.RateLimits - } - return nil -} - -func (m *VirtualHost) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.RequestHeadersToAdd - } - return nil -} - -func (m *VirtualHost) GetRequestHeadersToRemove() []string { - if m != nil { - return m.RequestHeadersToRemove - } - return nil -} - -func (m *VirtualHost) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.ResponseHeadersToAdd - } - return nil -} - -func (m *VirtualHost) GetResponseHeadersToRemove() []string { - if m != nil { - return m.ResponseHeadersToRemove - } - return nil -} - -func (m *VirtualHost) GetCors() *CorsPolicy { - if m != nil { - return m.Cors - } - return nil -} - -func (m *VirtualHost) GetPerFilterConfig() map[string]*types.Struct { - if m != nil { - return m.PerFilterConfig - } - return nil -} - -func (m *VirtualHost) GetTypedPerFilterConfig() map[string]*types.Any { - if m != nil { - return m.TypedPerFilterConfig - } - return nil -} - -func (m *VirtualHost) GetIncludeRequestAttemptCount() bool { - if m != nil { - return m.IncludeRequestAttemptCount - } - return false -} - -func (m *VirtualHost) GetRetryPolicy() *RetryPolicy { - if m != nil { - return m.RetryPolicy - } - return nil -} - -func (m *VirtualHost) GetHedgePolicy() *HedgePolicy { - if m != nil { - return m.HedgePolicy - } - 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 -// `. -// [#comment:next free field: 14] -type Route struct { - // Route matching parameters. - Match RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match"` - // Types that are valid to be assigned to Action: - // *Route_Route - // *Route_Redirect - // *Route_DirectResponse - 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.router*. - Metadata *core.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 filter name, such as - // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` for - // if and how it is utilized. - PerFilterConfig map[string]*types.Struct `protobuf:"bytes,8,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` for - // if and how it is utilized. - TypedPerFilterConfig map[string]*types.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_api_msg_route.VirtualHost` and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.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_api_msg_route.VirtualHost` and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - ResponseHeadersToAdd []*core.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Route) Reset() { *m = Route{} } -func (m *Route) String() string { return proto.CompactTextString(m) } -func (*Route) ProtoMessage() {} -func (*Route) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{1} -} -func (m *Route) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Route) XXX_Merge(src proto.Message) { - xxx_messageInfo_Route.Merge(m, src) -} -func (m *Route) XXX_Size() int { - return m.Size() -} -func (m *Route) XXX_DiscardUnknown() { - xxx_messageInfo_Route.DiscardUnknown(m) -} - -var xxx_messageInfo_Route proto.InternalMessageInfo - -type isRoute_Action interface { - isRoute_Action() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type Route_Route struct { - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3,oneof"` -} -type Route_Redirect struct { - Redirect *RedirectAction `protobuf:"bytes,3,opt,name=redirect,proto3,oneof"` -} -type Route_DirectResponse struct { - DirectResponse *DirectResponseAction `protobuf:"bytes,7,opt,name=direct_response,json=directResponse,proto3,oneof"` -} - -func (*Route_Route) isRoute_Action() {} -func (*Route_Redirect) isRoute_Action() {} -func (*Route_DirectResponse) isRoute_Action() {} - -func (m *Route) GetAction() isRoute_Action { - if m != nil { - return m.Action - } - return nil -} - -func (m *Route) GetMatch() RouteMatch { - if m != nil { - return m.Match - } - return RouteMatch{} -} - -func (m *Route) GetRoute() *RouteAction { - if x, ok := m.GetAction().(*Route_Route); ok { - return x.Route - } - return nil -} - -func (m *Route) GetRedirect() *RedirectAction { - if x, ok := m.GetAction().(*Route_Redirect); ok { - return x.Redirect - } - return nil -} - -func (m *Route) GetDirectResponse() *DirectResponseAction { - if x, ok := m.GetAction().(*Route_DirectResponse); ok { - return x.DirectResponse - } - return nil -} - -func (m *Route) GetMetadata() *core.Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *Route) GetDecorator() *Decorator { - if m != nil { - return m.Decorator - } - return nil -} - -func (m *Route) GetPerFilterConfig() map[string]*types.Struct { - if m != nil { - return m.PerFilterConfig - } - return nil -} - -func (m *Route) GetTypedPerFilterConfig() map[string]*types.Any { - if m != nil { - return m.TypedPerFilterConfig - } - return nil -} - -func (m *Route) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.RequestHeadersToAdd - } - return nil -} - -func (m *Route) GetRequestHeadersToRemove() []string { - if m != nil { - return m.RequestHeadersToRemove - } - return nil -} - -func (m *Route) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.ResponseHeadersToAdd - } - return nil -} - -func (m *Route) GetResponseHeadersToRemove() []string { - if m != nil { - return m.ResponseHeadersToRemove - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Route) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Route_OneofMarshaler, _Route_OneofUnmarshaler, _Route_OneofSizer, []interface{}{ - (*Route_Route)(nil), - (*Route_Redirect)(nil), - (*Route_DirectResponse)(nil), - } -} - -func _Route_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Route) - // action - switch x := m.Action.(type) { - case *Route_Route: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Route); err != nil { - return err - } - case *Route_Redirect: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Redirect); err != nil { - return err - } - case *Route_DirectResponse: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.DirectResponse); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Route.Action has unexpected type %T", x) - } - return nil -} - -func _Route_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Route) - switch tag { - case 2: // action.route - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RouteAction) - err := b.DecodeMessage(msg) - m.Action = &Route_Route{msg} - return true, err - case 3: // action.redirect - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RedirectAction) - err := b.DecodeMessage(msg) - m.Action = &Route_Redirect{msg} - return true, err - case 7: // action.direct_response - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DirectResponseAction) - err := b.DecodeMessage(msg) - m.Action = &Route_DirectResponse{msg} - return true, err - default: - return false, nil - } -} - -func _Route_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Route) - // action - switch x := m.Action.(type) { - case *Route_Route: - s := proto.Size(x.Route) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Route_Redirect: - s := proto.Size(x.Redirect) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Route_DirectResponse: - s := proto.Size(x.DirectResponse) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// 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. -// [#comment:next free field: 11] -type WeightedCluster struct { - // 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, which must be greater than 0. Defaults to 100. - TotalWeight *types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WeightedCluster) Reset() { *m = WeightedCluster{} } -func (m *WeightedCluster) String() string { return proto.CompactTextString(m) } -func (*WeightedCluster) ProtoMessage() {} -func (*WeightedCluster) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{2} -} -func (m *WeightedCluster) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WeightedCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WeightedCluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_WeightedCluster.Merge(m, src) -} -func (m *WeightedCluster) XXX_Size() int { - return m.Size() -} -func (m *WeightedCluster) XXX_DiscardUnknown() { - xxx_messageInfo_WeightedCluster.DiscardUnknown(m) -} - -var xxx_messageInfo_WeightedCluster proto.InternalMessageInfo - -func (m *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { - if m != nil { - return m.Clusters - } - return nil -} - -func (m *WeightedCluster) GetTotalWeight() *types.UInt32Value { - if m != nil { - return m.TotalWeight - } - return nil -} - -func (m *WeightedCluster) GetRuntimeKeyPrefix() string { - if m != nil { - return m.RuntimeKeyPrefix - } - return "" -} - -type WeightedCluster_ClusterWeight struct { - // 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"` - // An integer between 0 and :ref:`total_weight - // `. 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 add up to the total_weight, which defaults to 100. - Weight *types.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.MetadataMatch `, with values - // here taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *core.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_api_msg_route.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.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_api_msg_route.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_api_msg_route.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*core.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_api_msg_route.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 filter name, such as - // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - PerFilterConfig map[string]*types.Struct `protobuf:"bytes,8,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The per_filter_config field can be used to provide weighted cluster-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - TypedPerFilterConfig map[string]*types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WeightedCluster_ClusterWeight) Reset() { *m = WeightedCluster_ClusterWeight{} } -func (m *WeightedCluster_ClusterWeight) String() string { return proto.CompactTextString(m) } -func (*WeightedCluster_ClusterWeight) ProtoMessage() {} -func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{2, 0} -} -func (m *WeightedCluster_ClusterWeight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WeightedCluster_ClusterWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WeightedCluster_ClusterWeight) XXX_Merge(src proto.Message) { - xxx_messageInfo_WeightedCluster_ClusterWeight.Merge(m, src) -} -func (m *WeightedCluster_ClusterWeight) XXX_Size() int { - return m.Size() -} -func (m *WeightedCluster_ClusterWeight) XXX_DiscardUnknown() { - xxx_messageInfo_WeightedCluster_ClusterWeight.DiscardUnknown(m) -} - -var xxx_messageInfo_WeightedCluster_ClusterWeight proto.InternalMessageInfo - -func (m *WeightedCluster_ClusterWeight) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *WeightedCluster_ClusterWeight) GetWeight() *types.UInt32Value { - if m != nil { - return m.Weight - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetMetadataMatch() *core.Metadata { - if m != nil { - return m.MetadataMatch - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.RequestHeadersToAdd - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetRequestHeadersToRemove() []string { - if m != nil { - return m.RequestHeadersToRemove - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if m != nil { - return m.ResponseHeadersToAdd - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetResponseHeadersToRemove() []string { - if m != nil { - return m.ResponseHeadersToRemove - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetPerFilterConfig() map[string]*types.Struct { - if m != nil { - return m.PerFilterConfig - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetTypedPerFilterConfig() map[string]*types.Any { - if m != nil { - return m.TypedPerFilterConfig - } - return nil -} - -type RouteMatch struct { - // Types that are valid to be assigned to PathSpecifier: - // *RouteMatch_Prefix - // *RouteMatch_Path - // *RouteMatch_Regex - PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` - // Indicates that prefix/path matching should be case insensitive. The default - // is true. - CaseSensitive *types.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 *core.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. - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteMatch) Reset() { *m = RouteMatch{} } -func (m *RouteMatch) String() string { return proto.CompactTextString(m) } -func (*RouteMatch) ProtoMessage() {} -func (*RouteMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{3} -} -func (m *RouteMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteMatch.Merge(m, src) -} -func (m *RouteMatch) XXX_Size() int { - return m.Size() -} -func (m *RouteMatch) XXX_DiscardUnknown() { - xxx_messageInfo_RouteMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteMatch proto.InternalMessageInfo - -type isRouteMatch_PathSpecifier interface { - isRouteMatch_PathSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RouteMatch_Prefix struct { - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"` -} -type RouteMatch_Path struct { - Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"` -} -type RouteMatch_Regex struct { - Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` -} - -func (*RouteMatch_Prefix) isRouteMatch_PathSpecifier() {} -func (*RouteMatch_Path) isRouteMatch_PathSpecifier() {} -func (*RouteMatch_Regex) isRouteMatch_PathSpecifier() {} - -func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier { - if m != nil { - return m.PathSpecifier - } - return nil -} - -func (m *RouteMatch) GetPrefix() string { - if x, ok := m.GetPathSpecifier().(*RouteMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (m *RouteMatch) GetPath() string { - if x, ok := m.GetPathSpecifier().(*RouteMatch_Path); ok { - return x.Path - } - return "" -} - -func (m *RouteMatch) GetRegex() string { - if x, ok := m.GetPathSpecifier().(*RouteMatch_Regex); ok { - return x.Regex - } - return "" -} - -func (m *RouteMatch) GetCaseSensitive() *types.BoolValue { - if m != nil { - return m.CaseSensitive - } - return nil -} - -func (m *RouteMatch) GetRuntimeFraction() *core.RuntimeFractionalPercent { - if m != nil { - return m.RuntimeFraction - } - return nil -} - -func (m *RouteMatch) GetHeaders() []*HeaderMatcher { - if m != nil { - return m.Headers - } - return nil -} - -func (m *RouteMatch) GetQueryParameters() []*QueryParameterMatcher { - if m != nil { - return m.QueryParameters - } - return nil -} - -func (m *RouteMatch) GetGrpc() *RouteMatch_GrpcRouteMatchOptions { - if m != nil { - return m.Grpc - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RouteMatch) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RouteMatch_OneofMarshaler, _RouteMatch_OneofUnmarshaler, _RouteMatch_OneofSizer, []interface{}{ - (*RouteMatch_Prefix)(nil), - (*RouteMatch_Path)(nil), - (*RouteMatch_Regex)(nil), - } -} - -func _RouteMatch_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RouteMatch) - // path_specifier - switch x := m.PathSpecifier.(type) { - case *RouteMatch_Prefix: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Prefix) - case *RouteMatch_Path: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Path) - case *RouteMatch_Regex: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Regex) - case nil: - default: - return fmt.Errorf("RouteMatch.PathSpecifier has unexpected type %T", x) - } - return nil -} - -func _RouteMatch_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RouteMatch) - switch tag { - case 1: // path_specifier.prefix - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.PathSpecifier = &RouteMatch_Prefix{x} - return true, err - case 2: // path_specifier.path - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.PathSpecifier = &RouteMatch_Path{x} - return true, err - case 3: // path_specifier.regex - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.PathSpecifier = &RouteMatch_Regex{x} - return true, err - default: - return false, nil - } -} - -func _RouteMatch_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RouteMatch) - // path_specifier - switch x := m.PathSpecifier.(type) { - case *RouteMatch_Prefix: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Prefix))) - n += len(x.Prefix) - case *RouteMatch_Path: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Path))) - n += len(x.Path) - case *RouteMatch_Regex: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Regex))) - n += len(x.Regex) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type RouteMatch_GrpcRouteMatchOptions struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteMatch_GrpcRouteMatchOptions) Reset() { *m = RouteMatch_GrpcRouteMatchOptions{} } -func (m *RouteMatch_GrpcRouteMatchOptions) String() string { return proto.CompactTextString(m) } -func (*RouteMatch_GrpcRouteMatchOptions) ProtoMessage() {} -func (*RouteMatch_GrpcRouteMatchOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{3, 0} -} -func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.Merge(m, src) -} -func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Size() int { - return m.Size() -} -func (m *RouteMatch_GrpcRouteMatchOptions) XXX_DiscardUnknown() { - xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions proto.InternalMessageInfo - -// [#comment:next free field: 11] -type CorsPolicy struct { - // Specifies the origins that will be allowed to do CORS requests. - // - // An origin is allowed if either allow_origin or allow_origin_regex match. - AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin,proto3" json:"allow_origin,omitempty"` - // Specifies regex patterns that match allowed origins. - // - // An origin is allowed if either allow_origin or allow_origin_regex match. - AllowOriginRegex []string `protobuf:"bytes,8,rep,name=allow_origin_regex,json=allowOriginRegex,proto3" json:"allow_origin_regex,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 *types.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` - // Types that are valid to be assigned to EnabledSpecifier: - // *CorsPolicy_Enabled - // *CorsPolicy_FilterEnabled - EnabledSpecifier isCorsPolicy_EnabledSpecifier `protobuf_oneof:"enabled_specifier"` - // Specifies if CORS policies are evaluated and tracked when filter is off but - // does not enforce any policies. - // - // More information on how this can be controlled via runtime can be found - // :ref:`here `. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - ShadowEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CorsPolicy) Reset() { *m = CorsPolicy{} } -func (m *CorsPolicy) String() string { return proto.CompactTextString(m) } -func (*CorsPolicy) ProtoMessage() {} -func (*CorsPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{4} -} -func (m *CorsPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CorsPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CorsPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_CorsPolicy.Merge(m, src) -} -func (m *CorsPolicy) XXX_Size() int { - return m.Size() -} -func (m *CorsPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_CorsPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_CorsPolicy proto.InternalMessageInfo - -type isCorsPolicy_EnabledSpecifier interface { - isCorsPolicy_EnabledSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type CorsPolicy_Enabled struct { - Enabled *types.BoolValue `protobuf:"bytes,7,opt,name=enabled,proto3,oneof"` -} -type CorsPolicy_FilterEnabled struct { - FilterEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` -} - -func (*CorsPolicy_Enabled) isCorsPolicy_EnabledSpecifier() {} -func (*CorsPolicy_FilterEnabled) isCorsPolicy_EnabledSpecifier() {} - -func (m *CorsPolicy) GetEnabledSpecifier() isCorsPolicy_EnabledSpecifier { - if m != nil { - return m.EnabledSpecifier - } - return nil -} - -func (m *CorsPolicy) GetAllowOrigin() []string { - if m != nil { - return m.AllowOrigin - } - return nil -} - -func (m *CorsPolicy) GetAllowOriginRegex() []string { - if m != nil { - return m.AllowOriginRegex - } - return nil -} - -func (m *CorsPolicy) GetAllowMethods() string { - if m != nil { - return m.AllowMethods - } - return "" -} - -func (m *CorsPolicy) GetAllowHeaders() string { - if m != nil { - return m.AllowHeaders - } - return "" -} - -func (m *CorsPolicy) GetExposeHeaders() string { - if m != nil { - return m.ExposeHeaders - } - return "" -} - -func (m *CorsPolicy) GetMaxAge() string { - if m != nil { - return m.MaxAge - } - return "" -} - -func (m *CorsPolicy) GetAllowCredentials() *types.BoolValue { - if m != nil { - return m.AllowCredentials - } - return nil -} - -// Deprecated: Do not use. -func (m *CorsPolicy) GetEnabled() *types.BoolValue { - if x, ok := m.GetEnabledSpecifier().(*CorsPolicy_Enabled); ok { - return x.Enabled - } - return nil -} - -func (m *CorsPolicy) GetFilterEnabled() *core.RuntimeFractionalPercent { - if x, ok := m.GetEnabledSpecifier().(*CorsPolicy_FilterEnabled); ok { - return x.FilterEnabled - } - return nil -} - -func (m *CorsPolicy) GetShadowEnabled() *core.RuntimeFractionalPercent { - if m != nil { - return m.ShadowEnabled - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CorsPolicy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _CorsPolicy_OneofMarshaler, _CorsPolicy_OneofUnmarshaler, _CorsPolicy_OneofSizer, []interface{}{ - (*CorsPolicy_Enabled)(nil), - (*CorsPolicy_FilterEnabled)(nil), - } -} - -func _CorsPolicy_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CorsPolicy) - // enabled_specifier - switch x := m.EnabledSpecifier.(type) { - case *CorsPolicy_Enabled: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Enabled); err != nil { - return err - } - case *CorsPolicy_FilterEnabled: - _ = b.EncodeVarint(9<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.FilterEnabled); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("CorsPolicy.EnabledSpecifier has unexpected type %T", x) - } - return nil -} - -func _CorsPolicy_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CorsPolicy) - switch tag { - case 7: // enabled_specifier.enabled - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.BoolValue) - err := b.DecodeMessage(msg) - m.EnabledSpecifier = &CorsPolicy_Enabled{msg} - return true, err - case 9: // enabled_specifier.filter_enabled - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(core.RuntimeFractionalPercent) - err := b.DecodeMessage(msg) - m.EnabledSpecifier = &CorsPolicy_FilterEnabled{msg} - return true, err - default: - return false, nil - } -} - -func _CorsPolicy_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CorsPolicy) - // enabled_specifier - switch x := m.EnabledSpecifier.(type) { - case *CorsPolicy_Enabled: - s := proto.Size(x.Enabled) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *CorsPolicy_FilterEnabled: - s := proto.Size(x.FilterEnabled) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// [#comment:next free field: 27] -type RouteAction struct { - // Types that are valid to be assigned to ClusterSpecifier: - // *RouteAction_Cluster - // *RouteAction_ClusterHeader - // *RouteAction_WeightedClusters - 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.api.v2.route.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 *core.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. - // - // .. 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"` - // Types that are valid to be assigned to HostRewriteSpecifier: - // *RouteAction_HostRewrite - // *RouteAction_AutoHostRewrite - HostRewriteSpecifier isRouteAction_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` - // 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. - // - // .. 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 *time.Duration `protobuf:"bytes,8,opt,name=timeout,proto3,stdduration" 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. - IdleTimeout *time.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3,stdduration" json:"idle_timeout,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"` - // Indicates that the route has a request mirroring policy. - RequestMirrorPolicy *RouteAction_RequestMirrorPolicy `protobuf:"bytes,10,opt,name=request_mirror_policy,json=requestMirrorPolicy,proto3" json:"request_mirror_policy,omitempty"` - // Optionally specifies the :ref:`routing priority `. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - Priority core.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.api.v2.core.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. - IncludeVhRateLimits *types.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. - Cors *CorsPolicy `protobuf:"bytes,17,opt,name=cors,proto3" json:"cors,omitempty"` - // 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. - MaxGrpcTimeout *time.Duration `protobuf:"bytes,23,opt,name=max_grpc_timeout,json=maxGrpcTimeout,proto3,stdduration" json:"max_grpc_timeout,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 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). - GrpcTimeoutOffset *time.Duration `protobuf:"bytes,28,opt,name=grpc_timeout_offset,json=grpcTimeoutOffset,proto3,stdduration" json:"grpc_timeout_offset,omitempty"` - UpgradeConfigs []*RouteAction_UpgradeConfig `protobuf:"bytes,25,rep,name=upgrade_configs,json=upgradeConfigs,proto3" json:"upgrade_configs,omitempty"` - InternalRedirectAction RouteAction_InternalRedirectAction `protobuf:"varint,26,opt,name=internal_redirect_action,json=internalRedirectAction,proto3,enum=envoy.api.v2.route.RouteAction_InternalRedirectAction" json:"internal_redirect_action,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). - // [#not-implemented-hide:] - HedgePolicy *HedgePolicy `protobuf:"bytes,27,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction) Reset() { *m = RouteAction{} } -func (m *RouteAction) String() string { return proto.CompactTextString(m) } -func (*RouteAction) ProtoMessage() {} -func (*RouteAction) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5} -} -func (m *RouteAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction.Merge(m, src) -} -func (m *RouteAction) XXX_Size() int { - return m.Size() -} -func (m *RouteAction) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction proto.InternalMessageInfo - -type isRouteAction_ClusterSpecifier interface { - isRouteAction_ClusterSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} -type isRouteAction_HostRewriteSpecifier interface { - isRouteAction_HostRewriteSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RouteAction_Cluster struct { - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} -type RouteAction_ClusterHeader struct { - ClusterHeader string `protobuf:"bytes,2,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` -} -type RouteAction_WeightedClusters struct { - WeightedClusters *WeightedCluster `protobuf:"bytes,3,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} -type RouteAction_HostRewrite struct { - HostRewrite string `protobuf:"bytes,6,opt,name=host_rewrite,json=hostRewrite,proto3,oneof"` -} -type RouteAction_AutoHostRewrite struct { - AutoHostRewrite *types.BoolValue `protobuf:"bytes,7,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3,oneof"` -} - -func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} -func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} -func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} -func (*RouteAction_HostRewrite) isRouteAction_HostRewriteSpecifier() {} -func (*RouteAction_AutoHostRewrite) isRouteAction_HostRewriteSpecifier() {} - -func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} -func (m *RouteAction) GetHostRewriteSpecifier() isRouteAction_HostRewriteSpecifier { - if m != nil { - return m.HostRewriteSpecifier - } - return nil -} - -func (m *RouteAction) GetCluster() string { - if x, ok := m.GetClusterSpecifier().(*RouteAction_Cluster); ok { - return x.Cluster - } - return "" -} - -func (m *RouteAction) GetClusterHeader() string { - if x, ok := m.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { - return x.ClusterHeader - } - return "" -} - -func (m *RouteAction) GetWeightedClusters() *WeightedCluster { - if x, ok := m.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (m *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFoundResponseCode { - if m != nil { - return m.ClusterNotFoundResponseCode - } - return RouteAction_SERVICE_UNAVAILABLE -} - -func (m *RouteAction) GetMetadataMatch() *core.Metadata { - if m != nil { - return m.MetadataMatch - } - return nil -} - -func (m *RouteAction) GetPrefixRewrite() string { - if m != nil { - return m.PrefixRewrite - } - return "" -} - -func (m *RouteAction) GetHostRewrite() string { - if x, ok := m.GetHostRewriteSpecifier().(*RouteAction_HostRewrite); ok { - return x.HostRewrite - } - return "" -} - -func (m *RouteAction) GetAutoHostRewrite() *types.BoolValue { - if x, ok := m.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewrite); ok { - return x.AutoHostRewrite - } - return nil -} - -func (m *RouteAction) GetTimeout() *time.Duration { - if m != nil { - return m.Timeout - } - return nil -} - -func (m *RouteAction) GetIdleTimeout() *time.Duration { - if m != nil { - return m.IdleTimeout - } - return nil -} - -func (m *RouteAction) GetRetryPolicy() *RetryPolicy { - if m != nil { - return m.RetryPolicy - } - return nil -} - -func (m *RouteAction) GetRequestMirrorPolicy() *RouteAction_RequestMirrorPolicy { - if m != nil { - return m.RequestMirrorPolicy - } - return nil -} - -func (m *RouteAction) GetPriority() core.RoutingPriority { - if m != nil { - return m.Priority - } - return core.RoutingPriority_DEFAULT -} - -func (m *RouteAction) GetRateLimits() []*RateLimit { - if m != nil { - return m.RateLimits - } - return nil -} - -func (m *RouteAction) GetIncludeVhRateLimits() *types.BoolValue { - if m != nil { - return m.IncludeVhRateLimits - } - return nil -} - -func (m *RouteAction) GetHashPolicy() []*RouteAction_HashPolicy { - if m != nil { - return m.HashPolicy - } - return nil -} - -func (m *RouteAction) GetCors() *CorsPolicy { - if m != nil { - return m.Cors - } - return nil -} - -func (m *RouteAction) GetMaxGrpcTimeout() *time.Duration { - if m != nil { - return m.MaxGrpcTimeout - } - return nil -} - -func (m *RouteAction) GetGrpcTimeoutOffset() *time.Duration { - if m != nil { - return m.GrpcTimeoutOffset - } - return nil -} - -func (m *RouteAction) GetUpgradeConfigs() []*RouteAction_UpgradeConfig { - if m != nil { - return m.UpgradeConfigs - } - return nil -} - -func (m *RouteAction) GetInternalRedirectAction() RouteAction_InternalRedirectAction { - if m != nil { - return m.InternalRedirectAction - } - return RouteAction_PASS_THROUGH_INTERNAL_REDIRECT -} - -func (m *RouteAction) GetHedgePolicy() *HedgePolicy { - if m != nil { - return m.HedgePolicy - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RouteAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RouteAction_OneofMarshaler, _RouteAction_OneofUnmarshaler, _RouteAction_OneofSizer, []interface{}{ - (*RouteAction_Cluster)(nil), - (*RouteAction_ClusterHeader)(nil), - (*RouteAction_WeightedClusters)(nil), - (*RouteAction_HostRewrite)(nil), - (*RouteAction_AutoHostRewrite)(nil), - } -} - -func _RouteAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RouteAction) - // cluster_specifier - switch x := m.ClusterSpecifier.(type) { - case *RouteAction_Cluster: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Cluster) - case *RouteAction_ClusterHeader: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.ClusterHeader) - case *RouteAction_WeightedClusters: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.WeightedClusters); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("RouteAction.ClusterSpecifier has unexpected type %T", x) - } - // host_rewrite_specifier - switch x := m.HostRewriteSpecifier.(type) { - case *RouteAction_HostRewrite: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.HostRewrite) - case *RouteAction_AutoHostRewrite: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.AutoHostRewrite); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("RouteAction.HostRewriteSpecifier has unexpected type %T", x) - } - return nil -} - -func _RouteAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RouteAction) - switch tag { - case 1: // cluster_specifier.cluster - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.ClusterSpecifier = &RouteAction_Cluster{x} - return true, err - case 2: // cluster_specifier.cluster_header - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.ClusterSpecifier = &RouteAction_ClusterHeader{x} - return true, err - case 3: // cluster_specifier.weighted_clusters - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(WeightedCluster) - err := b.DecodeMessage(msg) - m.ClusterSpecifier = &RouteAction_WeightedClusters{msg} - return true, err - case 6: // host_rewrite_specifier.host_rewrite - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HostRewriteSpecifier = &RouteAction_HostRewrite{x} - return true, err - case 7: // host_rewrite_specifier.auto_host_rewrite - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.BoolValue) - err := b.DecodeMessage(msg) - m.HostRewriteSpecifier = &RouteAction_AutoHostRewrite{msg} - return true, err - default: - return false, nil - } -} - -func _RouteAction_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RouteAction) - // cluster_specifier - switch x := m.ClusterSpecifier.(type) { - case *RouteAction_Cluster: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Cluster))) - n += len(x.Cluster) - case *RouteAction_ClusterHeader: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.ClusterHeader))) - n += len(x.ClusterHeader) - case *RouteAction_WeightedClusters: - s := proto.Size(x.WeightedClusters) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // host_rewrite_specifier - switch x := m.HostRewriteSpecifier.(type) { - case *RouteAction_HostRewrite: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.HostRewrite))) - n += len(x.HostRewrite) - case *RouteAction_AutoHostRewrite: - s := proto.Size(x.AutoHostRewrite) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// 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*. -type RouteAction_RequestMirrorPolicy struct { - // 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"` - // If not specified, all requests to the target cluster will be mirrored. If - // specified, Envoy will lookup the runtime key to get the % of requests to - // mirror. Valid values are from 0 to 10000, allowing for increments of - // 0.01% of requests to be mirrored. If the runtime key is specified in the - // configuration but not present in runtime, 0 is the default and thus 0% of - // requests will be mirrored. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`runtime_fraction - // ` field instead. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` // Deprecated: Do not use. - // If both :ref:`runtime_key - // ` and this field are 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. - // - // .. note:: - // - // Parsing this field is implemented such that the runtime key's data 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. This is behaviour is different to that of the deprecated `runtime_key` field, - // where the implicit denominator is 10000. - RuntimeFraction *core.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction_RequestMirrorPolicy) Reset() { *m = RouteAction_RequestMirrorPolicy{} } -func (m *RouteAction_RequestMirrorPolicy) String() string { return proto.CompactTextString(m) } -func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} -func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 0} -} -func (m *RouteAction_RequestMirrorPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction_RequestMirrorPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction_RequestMirrorPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction_RequestMirrorPolicy.Merge(m, src) -} -func (m *RouteAction_RequestMirrorPolicy) XXX_Size() int { - return m.Size() -} -func (m *RouteAction_RequestMirrorPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction_RequestMirrorPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction_RequestMirrorPolicy proto.InternalMessageInfo - -func (m *RouteAction_RequestMirrorPolicy) GetCluster() string { - if m != nil { - return m.Cluster - } - return "" -} - -// Deprecated: Do not use. -func (m *RouteAction_RequestMirrorPolicy) GetRuntimeKey() string { - if m != nil { - return m.RuntimeKey - } - return "" -} - -func (m *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *core.RuntimeFractionalPercent { - if m != nil { - return m.RuntimeFraction - } - return nil -} - -// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer -// `. -type RouteAction_HashPolicy struct { - // Types that are valid to be assigned to PolicySpecifier: - // *RouteAction_HashPolicy_Header_ - // *RouteAction_HashPolicy_Cookie_ - // *RouteAction_HashPolicy_ConnectionProperties_ - PolicySpecifier isRouteAction_HashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` - // The flag that shortcircuits 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction_HashPolicy) Reset() { *m = RouteAction_HashPolicy{} } -func (m *RouteAction_HashPolicy) String() string { return proto.CompactTextString(m) } -func (*RouteAction_HashPolicy) ProtoMessage() {} -func (*RouteAction_HashPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 1} -} -func (m *RouteAction_HashPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction_HashPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction_HashPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction_HashPolicy.Merge(m, src) -} -func (m *RouteAction_HashPolicy) XXX_Size() int { - return m.Size() -} -func (m *RouteAction_HashPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction_HashPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction_HashPolicy proto.InternalMessageInfo - -type isRouteAction_HashPolicy_PolicySpecifier interface { - isRouteAction_HashPolicy_PolicySpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RouteAction_HashPolicy_Header_ struct { - Header *RouteAction_HashPolicy_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} -type RouteAction_HashPolicy_Cookie_ struct { - Cookie *RouteAction_HashPolicy_Cookie `protobuf:"bytes,2,opt,name=cookie,proto3,oneof"` -} -type RouteAction_HashPolicy_ConnectionProperties_ struct { - ConnectionProperties *RouteAction_HashPolicy_ConnectionProperties `protobuf:"bytes,3,opt,name=connection_properties,json=connectionProperties,proto3,oneof"` -} - -func (*RouteAction_HashPolicy_Header_) isRouteAction_HashPolicy_PolicySpecifier() {} -func (*RouteAction_HashPolicy_Cookie_) isRouteAction_HashPolicy_PolicySpecifier() {} -func (*RouteAction_HashPolicy_ConnectionProperties_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (m *RouteAction_HashPolicy) GetPolicySpecifier() isRouteAction_HashPolicy_PolicySpecifier { - if m != nil { - return m.PolicySpecifier - } - return nil -} - -func (m *RouteAction_HashPolicy) GetHeader() *RouteAction_HashPolicy_Header { - if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_Header_); ok { - return x.Header - } - return nil -} - -func (m *RouteAction_HashPolicy) GetCookie() *RouteAction_HashPolicy_Cookie { - if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_Cookie_); ok { - return x.Cookie - } - return nil -} - -func (m *RouteAction_HashPolicy) GetConnectionProperties() *RouteAction_HashPolicy_ConnectionProperties { - if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_ConnectionProperties_); ok { - return x.ConnectionProperties - } - return nil -} - -func (m *RouteAction_HashPolicy) GetTerminal() bool { - if m != nil { - return m.Terminal - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RouteAction_HashPolicy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RouteAction_HashPolicy_OneofMarshaler, _RouteAction_HashPolicy_OneofUnmarshaler, _RouteAction_HashPolicy_OneofSizer, []interface{}{ - (*RouteAction_HashPolicy_Header_)(nil), - (*RouteAction_HashPolicy_Cookie_)(nil), - (*RouteAction_HashPolicy_ConnectionProperties_)(nil), - } -} - -func _RouteAction_HashPolicy_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RouteAction_HashPolicy) - // policy_specifier - switch x := m.PolicySpecifier.(type) { - case *RouteAction_HashPolicy_Header_: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Header); err != nil { - return err - } - case *RouteAction_HashPolicy_Cookie_: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Cookie); err != nil { - return err - } - case *RouteAction_HashPolicy_ConnectionProperties_: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ConnectionProperties); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("RouteAction_HashPolicy.PolicySpecifier has unexpected type %T", x) - } - return nil -} - -func _RouteAction_HashPolicy_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RouteAction_HashPolicy) - switch tag { - case 1: // policy_specifier.header - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RouteAction_HashPolicy_Header) - err := b.DecodeMessage(msg) - m.PolicySpecifier = &RouteAction_HashPolicy_Header_{msg} - return true, err - case 2: // policy_specifier.cookie - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RouteAction_HashPolicy_Cookie) - err := b.DecodeMessage(msg) - m.PolicySpecifier = &RouteAction_HashPolicy_Cookie_{msg} - return true, err - case 3: // policy_specifier.connection_properties - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RouteAction_HashPolicy_ConnectionProperties) - err := b.DecodeMessage(msg) - m.PolicySpecifier = &RouteAction_HashPolicy_ConnectionProperties_{msg} - return true, err - default: - return false, nil - } -} - -func _RouteAction_HashPolicy_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RouteAction_HashPolicy) - // policy_specifier - switch x := m.PolicySpecifier.(type) { - case *RouteAction_HashPolicy_Header_: - s := proto.Size(x.Header) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RouteAction_HashPolicy_Cookie_: - s := proto.Size(x.Cookie) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RouteAction_HashPolicy_ConnectionProperties_: - s := proto.Size(x.ConnectionProperties) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type RouteAction_HashPolicy_Header struct { - // 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction_HashPolicy_Header) Reset() { *m = RouteAction_HashPolicy_Header{} } -func (m *RouteAction_HashPolicy_Header) String() string { return proto.CompactTextString(m) } -func (*RouteAction_HashPolicy_Header) ProtoMessage() {} -func (*RouteAction_HashPolicy_Header) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 1, 0} -} -func (m *RouteAction_HashPolicy_Header) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction_HashPolicy_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction_HashPolicy_Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction_HashPolicy_Header.Merge(m, src) -} -func (m *RouteAction_HashPolicy_Header) XXX_Size() int { - return m.Size() -} -func (m *RouteAction_HashPolicy_Header) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction_HashPolicy_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction_HashPolicy_Header proto.InternalMessageInfo - -func (m *RouteAction_HashPolicy_Header) GetHeaderName() string { - if m != nil { - return m.HeaderName - } - 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 { - // 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 *time.Duration `protobuf:"bytes,2,opt,name=ttl,proto3,stdduration" 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction_HashPolicy_Cookie) Reset() { *m = RouteAction_HashPolicy_Cookie{} } -func (m *RouteAction_HashPolicy_Cookie) String() string { return proto.CompactTextString(m) } -func (*RouteAction_HashPolicy_Cookie) ProtoMessage() {} -func (*RouteAction_HashPolicy_Cookie) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 1, 1} -} -func (m *RouteAction_HashPolicy_Cookie) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction_HashPolicy_Cookie) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction_HashPolicy_Cookie) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction_HashPolicy_Cookie.Merge(m, src) -} -func (m *RouteAction_HashPolicy_Cookie) XXX_Size() int { - return m.Size() -} -func (m *RouteAction_HashPolicy_Cookie) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction_HashPolicy_Cookie.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction_HashPolicy_Cookie proto.InternalMessageInfo - -func (m *RouteAction_HashPolicy_Cookie) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *RouteAction_HashPolicy_Cookie) GetTtl() *time.Duration { - if m != nil { - return m.Ttl - } - return nil -} - -func (m *RouteAction_HashPolicy_Cookie) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -type RouteAction_HashPolicy_ConnectionProperties struct { - // Hash on source IP address. - SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction_HashPolicy_ConnectionProperties) Reset() { - *m = RouteAction_HashPolicy_ConnectionProperties{} -} -func (m *RouteAction_HashPolicy_ConnectionProperties) String() string { - return proto.CompactTextString(m) -} -func (*RouteAction_HashPolicy_ConnectionProperties) ProtoMessage() {} -func (*RouteAction_HashPolicy_ConnectionProperties) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 1, 2} -} -func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.Merge(m, src) -} -func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Size() int { - return m.Size() -} -func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties proto.InternalMessageInfo - -func (m *RouteAction_HashPolicy_ConnectionProperties) GetSourceIp() bool { - if m != nil { - return m.SourceIp - } - return false -} - -// 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 { - // 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 *types.BoolValue `protobuf:"bytes,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteAction_UpgradeConfig) Reset() { *m = RouteAction_UpgradeConfig{} } -func (m *RouteAction_UpgradeConfig) String() string { return proto.CompactTextString(m) } -func (*RouteAction_UpgradeConfig) ProtoMessage() {} -func (*RouteAction_UpgradeConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{5, 2} -} -func (m *RouteAction_UpgradeConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RouteAction_UpgradeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RouteAction_UpgradeConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteAction_UpgradeConfig.Merge(m, src) -} -func (m *RouteAction_UpgradeConfig) XXX_Size() int { - return m.Size() -} -func (m *RouteAction_UpgradeConfig) XXX_DiscardUnknown() { - xxx_messageInfo_RouteAction_UpgradeConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteAction_UpgradeConfig proto.InternalMessageInfo - -func (m *RouteAction_UpgradeConfig) GetUpgradeType() string { - if m != nil { - return m.UpgradeType - } - return "" -} - -func (m *RouteAction_UpgradeConfig) GetEnabled() *types.BoolValue { - if m != nil { - return m.Enabled - } - return nil -} - -// HTTP retry :ref:`architecture overview `. -// [#comment:next free field: 9] -type RetryPolicy struct { - // 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 *types.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` - // Specifies a non-zero upstream timeout per retry 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 *time.Duration `protobuf:"bytes,3,opt,name=per_try_timeout,json=perTryTimeout,proto3,stdduration" json:"per_try_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"` - // 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 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryPolicy) Reset() { *m = RetryPolicy{} } -func (m *RetryPolicy) String() string { return proto.CompactTextString(m) } -func (*RetryPolicy) ProtoMessage() {} -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{6} -} -func (m *RetryPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RetryPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryPolicy.Merge(m, src) -} -func (m *RetryPolicy) XXX_Size() int { - return m.Size() -} -func (m *RetryPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_RetryPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryPolicy proto.InternalMessageInfo - -func (m *RetryPolicy) GetRetryOn() string { - if m != nil { - return m.RetryOn - } - return "" -} - -func (m *RetryPolicy) GetNumRetries() *types.UInt32Value { - if m != nil { - return m.NumRetries - } - return nil -} - -func (m *RetryPolicy) GetPerTryTimeout() *time.Duration { - if m != nil { - return m.PerTryTimeout - } - return nil -} - -func (m *RetryPolicy) GetRetryPriority() *RetryPolicy_RetryPriority { - if m != nil { - return m.RetryPriority - } - return nil -} - -func (m *RetryPolicy) GetRetryHostPredicate() []*RetryPolicy_RetryHostPredicate { - if m != nil { - return m.RetryHostPredicate - } - return nil -} - -func (m *RetryPolicy) GetHostSelectionRetryMaxAttempts() int64 { - if m != nil { - return m.HostSelectionRetryMaxAttempts - } - return 0 -} - -func (m *RetryPolicy) GetRetriableStatusCodes() []uint32 { - if m != nil { - return m.RetriableStatusCodes - } - return nil -} - -func (m *RetryPolicy) GetRetryBackOff() *RetryPolicy_RetryBackOff { - if m != nil { - return m.RetryBackOff - } - return nil -} - -type RetryPolicy_RetryPriority struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are valid to be assigned to ConfigType: - // *RetryPolicy_RetryPriority_Config - // *RetryPolicy_RetryPriority_TypedConfig - ConfigType isRetryPolicy_RetryPriority_ConfigType `protobuf_oneof:"config_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryPolicy_RetryPriority) Reset() { *m = RetryPolicy_RetryPriority{} } -func (m *RetryPolicy_RetryPriority) String() string { return proto.CompactTextString(m) } -func (*RetryPolicy_RetryPriority) ProtoMessage() {} -func (*RetryPolicy_RetryPriority) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{6, 0} -} -func (m *RetryPolicy_RetryPriority) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryPolicy_RetryPriority) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RetryPolicy_RetryPriority) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryPolicy_RetryPriority.Merge(m, src) -} -func (m *RetryPolicy_RetryPriority) XXX_Size() int { - return m.Size() -} -func (m *RetryPolicy_RetryPriority) XXX_DiscardUnknown() { - xxx_messageInfo_RetryPolicy_RetryPriority.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryPolicy_RetryPriority proto.InternalMessageInfo - -type isRetryPolicy_RetryPriority_ConfigType interface { - isRetryPolicy_RetryPriority_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RetryPolicy_RetryPriority_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type RetryPolicy_RetryPriority_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryPriority_Config) isRetryPolicy_RetryPriority_ConfigType() {} -func (*RetryPolicy_RetryPriority_TypedConfig) isRetryPolicy_RetryPriority_ConfigType() {} - -func (m *RetryPolicy_RetryPriority) GetConfigType() isRetryPolicy_RetryPriority_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (m *RetryPolicy_RetryPriority) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *RetryPolicy_RetryPriority) GetConfig() *types.Struct { - if x, ok := m.GetConfigType().(*RetryPolicy_RetryPriority_Config); ok { - return x.Config - } - return nil -} - -func (m *RetryPolicy_RetryPriority) GetTypedConfig() *types.Any { - if x, ok := m.GetConfigType().(*RetryPolicy_RetryPriority_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RetryPolicy_RetryPriority) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RetryPolicy_RetryPriority_OneofMarshaler, _RetryPolicy_RetryPriority_OneofUnmarshaler, _RetryPolicy_RetryPriority_OneofSizer, []interface{}{ - (*RetryPolicy_RetryPriority_Config)(nil), - (*RetryPolicy_RetryPriority_TypedConfig)(nil), - } -} - -func _RetryPolicy_RetryPriority_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RetryPolicy_RetryPriority) - // config_type - switch x := m.ConfigType.(type) { - case *RetryPolicy_RetryPriority_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *RetryPolicy_RetryPriority_TypedConfig: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("RetryPolicy_RetryPriority.ConfigType has unexpected type %T", x) - } - return nil -} - -func _RetryPolicy_RetryPriority_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RetryPolicy_RetryPriority) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &RetryPolicy_RetryPriority_Config{msg} - return true, err - case 3: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &RetryPolicy_RetryPriority_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _RetryPolicy_RetryPriority_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RetryPolicy_RetryPriority) - // config_type - switch x := m.ConfigType.(type) { - case *RetryPolicy_RetryPriority_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RetryPolicy_RetryPriority_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type RetryPolicy_RetryHostPredicate struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are valid to be assigned to ConfigType: - // *RetryPolicy_RetryHostPredicate_Config - // *RetryPolicy_RetryHostPredicate_TypedConfig - ConfigType isRetryPolicy_RetryHostPredicate_ConfigType `protobuf_oneof:"config_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryPolicy_RetryHostPredicate) Reset() { *m = RetryPolicy_RetryHostPredicate{} } -func (m *RetryPolicy_RetryHostPredicate) String() string { return proto.CompactTextString(m) } -func (*RetryPolicy_RetryHostPredicate) ProtoMessage() {} -func (*RetryPolicy_RetryHostPredicate) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{6, 1} -} -func (m *RetryPolicy_RetryHostPredicate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryPolicy_RetryHostPredicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RetryPolicy_RetryHostPredicate) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryPolicy_RetryHostPredicate.Merge(m, src) -} -func (m *RetryPolicy_RetryHostPredicate) XXX_Size() int { - return m.Size() -} -func (m *RetryPolicy_RetryHostPredicate) XXX_DiscardUnknown() { - xxx_messageInfo_RetryPolicy_RetryHostPredicate.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryPolicy_RetryHostPredicate proto.InternalMessageInfo - -type isRetryPolicy_RetryHostPredicate_ConfigType interface { - isRetryPolicy_RetryHostPredicate_ConfigType() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RetryPolicy_RetryHostPredicate_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type RetryPolicy_RetryHostPredicate_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryHostPredicate_Config) isRetryPolicy_RetryHostPredicate_ConfigType() {} -func (*RetryPolicy_RetryHostPredicate_TypedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() {} - -func (m *RetryPolicy_RetryHostPredicate) GetConfigType() isRetryPolicy_RetryHostPredicate_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (m *RetryPolicy_RetryHostPredicate) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *RetryPolicy_RetryHostPredicate) GetConfig() *types.Struct { - if x, ok := m.GetConfigType().(*RetryPolicy_RetryHostPredicate_Config); ok { - return x.Config - } - return nil -} - -func (m *RetryPolicy_RetryHostPredicate) GetTypedConfig() *types.Any { - if x, ok := m.GetConfigType().(*RetryPolicy_RetryHostPredicate_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RetryPolicy_RetryHostPredicate) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RetryPolicy_RetryHostPredicate_OneofMarshaler, _RetryPolicy_RetryHostPredicate_OneofUnmarshaler, _RetryPolicy_RetryHostPredicate_OneofSizer, []interface{}{ - (*RetryPolicy_RetryHostPredicate_Config)(nil), - (*RetryPolicy_RetryHostPredicate_TypedConfig)(nil), - } -} - -func _RetryPolicy_RetryHostPredicate_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RetryPolicy_RetryHostPredicate) - // config_type - switch x := m.ConfigType.(type) { - case *RetryPolicy_RetryHostPredicate_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *RetryPolicy_RetryHostPredicate_TypedConfig: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("RetryPolicy_RetryHostPredicate.ConfigType has unexpected type %T", x) - } - return nil -} - -func _RetryPolicy_RetryHostPredicate_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RetryPolicy_RetryHostPredicate) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &RetryPolicy_RetryHostPredicate_Config{msg} - return true, err - case 3: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &RetryPolicy_RetryHostPredicate_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _RetryPolicy_RetryHostPredicate_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RetryPolicy_RetryHostPredicate) - // config_type - switch x := m.ConfigType.(type) { - case *RetryPolicy_RetryHostPredicate_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RetryPolicy_RetryHostPredicate_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type RetryPolicy_RetryBackOff struct { - // 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 *time.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3,stdduration" 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 *time.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3,stdduration" json:"max_interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryPolicy_RetryBackOff) Reset() { *m = RetryPolicy_RetryBackOff{} } -func (m *RetryPolicy_RetryBackOff) String() string { return proto.CompactTextString(m) } -func (*RetryPolicy_RetryBackOff) ProtoMessage() {} -func (*RetryPolicy_RetryBackOff) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{6, 2} -} -func (m *RetryPolicy_RetryBackOff) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryPolicy_RetryBackOff) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RetryPolicy_RetryBackOff) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryPolicy_RetryBackOff.Merge(m, src) -} -func (m *RetryPolicy_RetryBackOff) XXX_Size() int { - return m.Size() -} -func (m *RetryPolicy_RetryBackOff) XXX_DiscardUnknown() { - xxx_messageInfo_RetryPolicy_RetryBackOff.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryPolicy_RetryBackOff proto.InternalMessageInfo - -func (m *RetryPolicy_RetryBackOff) GetBaseInterval() *time.Duration { - if m != nil { - return m.BaseInterval - } - return nil -} - -func (m *RetryPolicy_RetryBackOff) GetMaxInterval() *time.Duration { - if m != nil { - return m.MaxInterval - } - return nil -} - -// HTTP request hedging TODO(mpuncel) docs -// [#not-implemented-hide:] -type HedgePolicy struct { - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // Defaults to 1. - InitialRequests *types.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. - AdditionalRequestChance *_type.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 will only occur if the retry policy also indicates that a - // timed out request should be retried. 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HedgePolicy) Reset() { *m = HedgePolicy{} } -func (m *HedgePolicy) String() string { return proto.CompactTextString(m) } -func (*HedgePolicy) ProtoMessage() {} -func (*HedgePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{7} -} -func (m *HedgePolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HedgePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HedgePolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_HedgePolicy.Merge(m, src) -} -func (m *HedgePolicy) XXX_Size() int { - return m.Size() -} -func (m *HedgePolicy) XXX_DiscardUnknown() { - xxx_messageInfo_HedgePolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_HedgePolicy proto.InternalMessageInfo - -func (m *HedgePolicy) GetInitialRequests() *types.UInt32Value { - if m != nil { - return m.InitialRequests - } - return nil -} - -func (m *HedgePolicy) GetAdditionalRequestChance() *_type.FractionalPercent { - if m != nil { - return m.AdditionalRequestChance - } - return nil -} - -func (m *HedgePolicy) GetHedgeOnPerTryTimeout() bool { - if m != nil { - return m.HedgeOnPerTryTimeout - } - return false -} - -type RedirectAction struct { - // 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 valid to be assigned 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 valid to be assigned to PathRewriteSpecifier: - // *RedirectAction_PathRedirect - // *RedirectAction_PrefixRewrite - 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.api.v2.route.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedirectAction) Reset() { *m = RedirectAction{} } -func (m *RedirectAction) String() string { return proto.CompactTextString(m) } -func (*RedirectAction) ProtoMessage() {} -func (*RedirectAction) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{8} -} -func (m *RedirectAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedirectAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RedirectAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedirectAction.Merge(m, src) -} -func (m *RedirectAction) XXX_Size() int { - return m.Size() -} -func (m *RedirectAction) XXX_DiscardUnknown() { - xxx_messageInfo_RedirectAction.DiscardUnknown(m) -} - -var xxx_messageInfo_RedirectAction proto.InternalMessageInfo - -type isRedirectAction_SchemeRewriteSpecifier interface { - isRedirectAction_SchemeRewriteSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} -type isRedirectAction_PathRewriteSpecifier interface { - isRedirectAction_PathRewriteSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RedirectAction_HttpsRedirect struct { - HttpsRedirect bool `protobuf:"varint,4,opt,name=https_redirect,json=httpsRedirect,proto3,oneof"` -} -type RedirectAction_SchemeRedirect struct { - SchemeRedirect string `protobuf:"bytes,7,opt,name=scheme_redirect,json=schemeRedirect,proto3,oneof"` -} -type RedirectAction_PathRedirect struct { - PathRedirect string `protobuf:"bytes,2,opt,name=path_redirect,json=pathRedirect,proto3,oneof"` -} -type RedirectAction_PrefixRewrite struct { - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` -} - -func (*RedirectAction_HttpsRedirect) isRedirectAction_SchemeRewriteSpecifier() {} -func (*RedirectAction_SchemeRedirect) isRedirectAction_SchemeRewriteSpecifier() {} -func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} -func (*RedirectAction_PrefixRewrite) isRedirectAction_PathRewriteSpecifier() {} - -func (m *RedirectAction) GetSchemeRewriteSpecifier() isRedirectAction_SchemeRewriteSpecifier { - if m != nil { - return m.SchemeRewriteSpecifier - } - return nil -} -func (m *RedirectAction) GetPathRewriteSpecifier() isRedirectAction_PathRewriteSpecifier { - if m != nil { - return m.PathRewriteSpecifier - } - return nil -} - -func (m *RedirectAction) GetHttpsRedirect() bool { - if x, ok := m.GetSchemeRewriteSpecifier().(*RedirectAction_HttpsRedirect); ok { - return x.HttpsRedirect - } - return false -} - -func (m *RedirectAction) GetSchemeRedirect() string { - if x, ok := m.GetSchemeRewriteSpecifier().(*RedirectAction_SchemeRedirect); ok { - return x.SchemeRedirect - } - return "" -} - -func (m *RedirectAction) GetHostRedirect() string { - if m != nil { - return m.HostRedirect - } - return "" -} - -func (m *RedirectAction) GetPortRedirect() uint32 { - if m != nil { - return m.PortRedirect - } - return 0 -} - -func (m *RedirectAction) GetPathRedirect() string { - if x, ok := m.GetPathRewriteSpecifier().(*RedirectAction_PathRedirect); ok { - return x.PathRedirect - } - return "" -} - -func (m *RedirectAction) GetPrefixRewrite() string { - if x, ok := m.GetPathRewriteSpecifier().(*RedirectAction_PrefixRewrite); ok { - return x.PrefixRewrite - } - return "" -} - -func (m *RedirectAction) GetResponseCode() RedirectAction_RedirectResponseCode { - if m != nil { - return m.ResponseCode - } - return RedirectAction_MOVED_PERMANENTLY -} - -func (m *RedirectAction) GetStripQuery() bool { - if m != nil { - return m.StripQuery - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RedirectAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RedirectAction_OneofMarshaler, _RedirectAction_OneofUnmarshaler, _RedirectAction_OneofSizer, []interface{}{ - (*RedirectAction_HttpsRedirect)(nil), - (*RedirectAction_SchemeRedirect)(nil), - (*RedirectAction_PathRedirect)(nil), - (*RedirectAction_PrefixRewrite)(nil), - } -} - -func _RedirectAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RedirectAction) - // scheme_rewrite_specifier - switch x := m.SchemeRewriteSpecifier.(type) { - case *RedirectAction_HttpsRedirect: - t := uint64(0) - if x.HttpsRedirect { - t = 1 - } - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *RedirectAction_SchemeRedirect: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.SchemeRedirect) - case nil: - default: - return fmt.Errorf("RedirectAction.SchemeRewriteSpecifier has unexpected type %T", x) - } - // path_rewrite_specifier - switch x := m.PathRewriteSpecifier.(type) { - case *RedirectAction_PathRedirect: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.PathRedirect) - case *RedirectAction_PrefixRewrite: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.PrefixRewrite) - case nil: - default: - return fmt.Errorf("RedirectAction.PathRewriteSpecifier has unexpected type %T", x) - } - return nil -} - -func _RedirectAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RedirectAction) - switch tag { - case 4: // scheme_rewrite_specifier.https_redirect - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.SchemeRewriteSpecifier = &RedirectAction_HttpsRedirect{x != 0} - return true, err - case 7: // scheme_rewrite_specifier.scheme_redirect - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.SchemeRewriteSpecifier = &RedirectAction_SchemeRedirect{x} - return true, err - case 2: // path_rewrite_specifier.path_redirect - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.PathRewriteSpecifier = &RedirectAction_PathRedirect{x} - return true, err - case 5: // path_rewrite_specifier.prefix_rewrite - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.PathRewriteSpecifier = &RedirectAction_PrefixRewrite{x} - return true, err - default: - return false, nil - } -} - -func _RedirectAction_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RedirectAction) - // scheme_rewrite_specifier - switch x := m.SchemeRewriteSpecifier.(type) { - case *RedirectAction_HttpsRedirect: - n += 1 // tag and wire - n += 1 - case *RedirectAction_SchemeRedirect: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.SchemeRedirect))) - n += len(x.SchemeRedirect) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // path_rewrite_specifier - switch x := m.PathRewriteSpecifier.(type) { - case *RedirectAction_PathRedirect: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.PathRedirect))) - n += len(x.PathRedirect) - case *RedirectAction_PrefixRewrite: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.PrefixRewrite))) - n += len(x.PrefixRewrite) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type DirectResponseAction struct { - // 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_api_msg_route.Route`, :ref:`envoy_api_msg_RouteConfiguration` or - // :ref:`envoy_api_msg_route.VirtualHost`. - Body *core.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DirectResponseAction) Reset() { *m = DirectResponseAction{} } -func (m *DirectResponseAction) String() string { return proto.CompactTextString(m) } -func (*DirectResponseAction) ProtoMessage() {} -func (*DirectResponseAction) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{9} -} -func (m *DirectResponseAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DirectResponseAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DirectResponseAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_DirectResponseAction.Merge(m, src) -} -func (m *DirectResponseAction) XXX_Size() int { - return m.Size() -} -func (m *DirectResponseAction) XXX_DiscardUnknown() { - xxx_messageInfo_DirectResponseAction.DiscardUnknown(m) -} - -var xxx_messageInfo_DirectResponseAction proto.InternalMessageInfo - -func (m *DirectResponseAction) GetStatus() uint32 { - if m != nil { - return m.Status - } - return 0 -} - -func (m *DirectResponseAction) GetBody() *core.DataSource { - if m != nil { - return m.Body - } - return nil -} - -type Decorator struct { - // 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Decorator) Reset() { *m = Decorator{} } -func (m *Decorator) String() string { return proto.CompactTextString(m) } -func (*Decorator) ProtoMessage() {} -func (*Decorator) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{10} -} -func (m *Decorator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Decorator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Decorator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Decorator.Merge(m, src) -} -func (m *Decorator) XXX_Size() int { - return m.Size() -} -func (m *Decorator) XXX_DiscardUnknown() { - xxx_messageInfo_Decorator.DiscardUnknown(m) -} - -var xxx_messageInfo_Decorator proto.InternalMessageInfo - -func (m *Decorator) GetOperation() string { - if m != nil { - return m.Operation - } - return "" -} - -// 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 { - // Specifies a regex pattern to use for matching requests. The entire path of the request - // must match the regex. The regex grammar used is defined `here - // `_. - // - // Examples: - // - // * The regex */rides/\d+* matches the path */rides/0* - // * The regex */rides/\d+* matches the path */rides/123* - // * The regex */rides/\d+* does not match the path */rides/123/456* - Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,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"` - // Optionally specifies the HTTP method to match on. For example GET, PUT, - // etc. - // [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once - // https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] - Method core.RequestMethod `protobuf:"varint,3,opt,name=method,proto3,enum=envoy.api.v2.core.RequestMethod" json:"method,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VirtualCluster) Reset() { *m = VirtualCluster{} } -func (m *VirtualCluster) String() string { return proto.CompactTextString(m) } -func (*VirtualCluster) ProtoMessage() {} -func (*VirtualCluster) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{11} -} -func (m *VirtualCluster) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VirtualCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VirtualCluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_VirtualCluster.Merge(m, src) -} -func (m *VirtualCluster) XXX_Size() int { - return m.Size() -} -func (m *VirtualCluster) XXX_DiscardUnknown() { - xxx_messageInfo_VirtualCluster.DiscardUnknown(m) -} - -var xxx_messageInfo_VirtualCluster proto.InternalMessageInfo - -func (m *VirtualCluster) GetPattern() string { - if m != nil { - return m.Pattern - } - return "" -} - -func (m *VirtualCluster) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *VirtualCluster) GetMethod() core.RequestMethod { - if m != nil { - return m.Method - } - return core.METHOD_UNSPECIFIED -} - -// Global rate limiting :ref:`architecture overview `. -type RateLimit struct { - // 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 *types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit) Reset() { *m = RateLimit{} } -func (m *RateLimit) String() string { return proto.CompactTextString(m) } -func (*RateLimit) ProtoMessage() {} -func (*RateLimit) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12} -} -func (m *RateLimit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit.Merge(m, src) -} -func (m *RateLimit) XXX_Size() int { - return m.Size() -} -func (m *RateLimit) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit proto.InternalMessageInfo - -func (m *RateLimit) GetStage() *types.UInt32Value { - if m != nil { - return m.Stage - } - return nil -} - -func (m *RateLimit) GetDisableKey() string { - if m != nil { - return m.DisableKey - } - return "" -} - -func (m *RateLimit) GetActions() []*RateLimit_Action { - if m != nil { - return m.Actions - } - return nil -} - -type RateLimit_Action struct { - // Types that are valid to be assigned to ActionSpecifier: - // *RateLimit_Action_SourceCluster_ - // *RateLimit_Action_DestinationCluster_ - // *RateLimit_Action_RequestHeaders_ - // *RateLimit_Action_RemoteAddress_ - // *RateLimit_Action_GenericKey_ - // *RateLimit_Action_HeaderValueMatch_ - ActionSpecifier isRateLimit_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action) Reset() { *m = RateLimit_Action{} } -func (m *RateLimit_Action) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action) ProtoMessage() {} -func (*RateLimit_Action) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0} -} -func (m *RateLimit_Action) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action.Merge(m, src) -} -func (m *RateLimit_Action) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action proto.InternalMessageInfo - -type isRateLimit_Action_ActionSpecifier interface { - isRateLimit_Action_ActionSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type RateLimit_Action_SourceCluster_ struct { - SourceCluster *RateLimit_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` -} -type RateLimit_Action_DestinationCluster_ struct { - DestinationCluster *RateLimit_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` -} -type RateLimit_Action_RequestHeaders_ struct { - RequestHeaders *RateLimit_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` -} -type RateLimit_Action_RemoteAddress_ struct { - RemoteAddress *RateLimit_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` -} -type RateLimit_Action_GenericKey_ struct { - GenericKey *RateLimit_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` -} -type RateLimit_Action_HeaderValueMatch_ struct { - HeaderValueMatch *RateLimit_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,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 (m *RateLimit_Action) GetActionSpecifier() isRateLimit_Action_ActionSpecifier { - if m != nil { - return m.ActionSpecifier - } - return nil -} - -func (m *RateLimit_Action) GetSourceCluster() *RateLimit_Action_SourceCluster { - if x, ok := m.GetActionSpecifier().(*RateLimit_Action_SourceCluster_); ok { - return x.SourceCluster - } - return nil -} - -func (m *RateLimit_Action) GetDestinationCluster() *RateLimit_Action_DestinationCluster { - if x, ok := m.GetActionSpecifier().(*RateLimit_Action_DestinationCluster_); ok { - return x.DestinationCluster - } - return nil -} - -func (m *RateLimit_Action) GetRequestHeaders() *RateLimit_Action_RequestHeaders { - if x, ok := m.GetActionSpecifier().(*RateLimit_Action_RequestHeaders_); ok { - return x.RequestHeaders - } - return nil -} - -func (m *RateLimit_Action) GetRemoteAddress() *RateLimit_Action_RemoteAddress { - if x, ok := m.GetActionSpecifier().(*RateLimit_Action_RemoteAddress_); ok { - return x.RemoteAddress - } - return nil -} - -func (m *RateLimit_Action) GetGenericKey() *RateLimit_Action_GenericKey { - if x, ok := m.GetActionSpecifier().(*RateLimit_Action_GenericKey_); ok { - return x.GenericKey - } - return nil -} - -func (m *RateLimit_Action) GetHeaderValueMatch() *RateLimit_Action_HeaderValueMatch { - if x, ok := m.GetActionSpecifier().(*RateLimit_Action_HeaderValueMatch_); ok { - return x.HeaderValueMatch - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*RateLimit_Action) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _RateLimit_Action_OneofMarshaler, _RateLimit_Action_OneofUnmarshaler, _RateLimit_Action_OneofSizer, []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), - } -} - -func _RateLimit_Action_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*RateLimit_Action) - // action_specifier - switch x := m.ActionSpecifier.(type) { - case *RateLimit_Action_SourceCluster_: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SourceCluster); err != nil { - return err - } - case *RateLimit_Action_DestinationCluster_: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.DestinationCluster); err != nil { - return err - } - case *RateLimit_Action_RequestHeaders_: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.RequestHeaders); err != nil { - return err - } - case *RateLimit_Action_RemoteAddress_: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.RemoteAddress); err != nil { - return err - } - case *RateLimit_Action_GenericKey_: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GenericKey); err != nil { - return err - } - case *RateLimit_Action_HeaderValueMatch_: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.HeaderValueMatch); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("RateLimit_Action.ActionSpecifier has unexpected type %T", x) - } - return nil -} - -func _RateLimit_Action_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*RateLimit_Action) - switch tag { - case 1: // action_specifier.source_cluster - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RateLimit_Action_SourceCluster) - err := b.DecodeMessage(msg) - m.ActionSpecifier = &RateLimit_Action_SourceCluster_{msg} - return true, err - case 2: // action_specifier.destination_cluster - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RateLimit_Action_DestinationCluster) - err := b.DecodeMessage(msg) - m.ActionSpecifier = &RateLimit_Action_DestinationCluster_{msg} - return true, err - case 3: // action_specifier.request_headers - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RateLimit_Action_RequestHeaders) - err := b.DecodeMessage(msg) - m.ActionSpecifier = &RateLimit_Action_RequestHeaders_{msg} - return true, err - case 4: // action_specifier.remote_address - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RateLimit_Action_RemoteAddress) - err := b.DecodeMessage(msg) - m.ActionSpecifier = &RateLimit_Action_RemoteAddress_{msg} - return true, err - case 5: // action_specifier.generic_key - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RateLimit_Action_GenericKey) - err := b.DecodeMessage(msg) - m.ActionSpecifier = &RateLimit_Action_GenericKey_{msg} - return true, err - case 6: // action_specifier.header_value_match - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RateLimit_Action_HeaderValueMatch) - err := b.DecodeMessage(msg) - m.ActionSpecifier = &RateLimit_Action_HeaderValueMatch_{msg} - return true, err - default: - return false, nil - } -} - -func _RateLimit_Action_OneofSizer(msg proto.Message) (n int) { - m := msg.(*RateLimit_Action) - // action_specifier - switch x := m.ActionSpecifier.(type) { - case *RateLimit_Action_SourceCluster_: - s := proto.Size(x.SourceCluster) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RateLimit_Action_DestinationCluster_: - s := proto.Size(x.DestinationCluster) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RateLimit_Action_RequestHeaders_: - s := proto.Size(x.RequestHeaders) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RateLimit_Action_RemoteAddress_: - s := proto.Size(x.RemoteAddress) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RateLimit_Action_GenericKey_: - s := proto.Size(x.GenericKey) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *RateLimit_Action_HeaderValueMatch_: - s := proto.Size(x.HeaderValueMatch) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// 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 { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action_SourceCluster) Reset() { *m = RateLimit_Action_SourceCluster{} } -func (m *RateLimit_Action_SourceCluster) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action_SourceCluster) ProtoMessage() {} -func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0, 0} -} -func (m *RateLimit_Action_SourceCluster) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action_SourceCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action_SourceCluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action_SourceCluster.Merge(m, src) -} -func (m *RateLimit_Action_SourceCluster) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action_SourceCluster) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action_SourceCluster.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action_SourceCluster proto.InternalMessageInfo - -// 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 { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action_DestinationCluster) Reset() { *m = RateLimit_Action_DestinationCluster{} } -func (m *RateLimit_Action_DestinationCluster) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action_DestinationCluster) ProtoMessage() {} -func (*RateLimit_Action_DestinationCluster) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0, 1} -} -func (m *RateLimit_Action_DestinationCluster) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action_DestinationCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action_DestinationCluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action_DestinationCluster.Merge(m, src) -} -func (m *RateLimit_Action_DestinationCluster) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action_DestinationCluster) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action_DestinationCluster.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action_DestinationCluster proto.InternalMessageInfo - -// 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 { - // 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action_RequestHeaders) Reset() { *m = RateLimit_Action_RequestHeaders{} } -func (m *RateLimit_Action_RequestHeaders) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action_RequestHeaders) ProtoMessage() {} -func (*RateLimit_Action_RequestHeaders) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0, 2} -} -func (m *RateLimit_Action_RequestHeaders) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action_RequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action_RequestHeaders) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action_RequestHeaders.Merge(m, src) -} -func (m *RateLimit_Action_RequestHeaders) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action_RequestHeaders) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action_RequestHeaders.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action_RequestHeaders proto.InternalMessageInfo - -func (m *RateLimit_Action_RequestHeaders) GetHeaderName() string { - if m != nil { - return m.HeaderName - } - return "" -} - -func (m *RateLimit_Action_RequestHeaders) GetDescriptorKey() string { - if m != nil { - return m.DescriptorKey - } - return "" -} - -// 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 { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action_RemoteAddress) Reset() { *m = RateLimit_Action_RemoteAddress{} } -func (m *RateLimit_Action_RemoteAddress) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action_RemoteAddress) ProtoMessage() {} -func (*RateLimit_Action_RemoteAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0, 3} -} -func (m *RateLimit_Action_RemoteAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action_RemoteAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action_RemoteAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action_RemoteAddress.Merge(m, src) -} -func (m *RateLimit_Action_RemoteAddress) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action_RemoteAddress) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action_RemoteAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action_RemoteAddress proto.InternalMessageInfo - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("generic_key", "") -type RateLimit_Action_GenericKey struct { - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action_GenericKey) Reset() { *m = RateLimit_Action_GenericKey{} } -func (m *RateLimit_Action_GenericKey) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action_GenericKey) ProtoMessage() {} -func (*RateLimit_Action_GenericKey) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0, 4} -} -func (m *RateLimit_Action_GenericKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action_GenericKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action_GenericKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action_GenericKey.Merge(m, src) -} -func (m *RateLimit_Action_GenericKey) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action_GenericKey) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action_GenericKey.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action_GenericKey proto.InternalMessageInfo - -func (m *RateLimit_Action_GenericKey) GetDescriptorValue() string { - if m != nil { - return m.DescriptorValue - } - return "" -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("header_match", "") -type RateLimit_Action_HeaderValueMatch struct { - // 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 *types.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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RateLimit_Action_HeaderValueMatch) Reset() { *m = RateLimit_Action_HeaderValueMatch{} } -func (m *RateLimit_Action_HeaderValueMatch) String() string { return proto.CompactTextString(m) } -func (*RateLimit_Action_HeaderValueMatch) ProtoMessage() {} -func (*RateLimit_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{12, 0, 5} -} -func (m *RateLimit_Action_HeaderValueMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateLimit_Action_HeaderValueMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RateLimit_Action_HeaderValueMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateLimit_Action_HeaderValueMatch.Merge(m, src) -} -func (m *RateLimit_Action_HeaderValueMatch) XXX_Size() int { - return m.Size() -} -func (m *RateLimit_Action_HeaderValueMatch) XXX_DiscardUnknown() { - xxx_messageInfo_RateLimit_Action_HeaderValueMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_RateLimit_Action_HeaderValueMatch proto.InternalMessageInfo - -func (m *RateLimit_Action_HeaderValueMatch) GetDescriptorValue() string { - if m != nil { - return m.DescriptorValue - } - return "" -} - -func (m *RateLimit_Action_HeaderValueMatch) GetExpectMatch() *types.BoolValue { - if m != nil { - return m.ExpectMatch - } - return nil -} - -func (m *RateLimit_Action_HeaderValueMatch) GetHeaders() []*HeaderMatcher { - if m != nil { - return m.Headers - } - 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", -// "exact_match": "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. -// -type HeaderMatcher struct { - // 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 valid to be assigned to HeaderMatchSpecifier: - // *HeaderMatcher_ExactMatch - // *HeaderMatcher_RegexMatch - // *HeaderMatcher_RangeMatch - // *HeaderMatcher_PresentMatch - // *HeaderMatcher_PrefixMatch - // *HeaderMatcher_SuffixMatch - 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HeaderMatcher) Reset() { *m = HeaderMatcher{} } -func (m *HeaderMatcher) String() string { return proto.CompactTextString(m) } -func (*HeaderMatcher) ProtoMessage() {} -func (*HeaderMatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{13} -} -func (m *HeaderMatcher) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeaderMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *HeaderMatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeaderMatcher.Merge(m, src) -} -func (m *HeaderMatcher) XXX_Size() int { - return m.Size() -} -func (m *HeaderMatcher) XXX_DiscardUnknown() { - xxx_messageInfo_HeaderMatcher.DiscardUnknown(m) -} - -var xxx_messageInfo_HeaderMatcher proto.InternalMessageInfo - -type isHeaderMatcher_HeaderMatchSpecifier interface { - isHeaderMatcher_HeaderMatchSpecifier() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type HeaderMatcher_ExactMatch struct { - ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` -} -type HeaderMatcher_RegexMatch struct { - RegexMatch string `protobuf:"bytes,5,opt,name=regex_match,json=regexMatch,proto3,oneof"` -} -type HeaderMatcher_RangeMatch struct { - RangeMatch *_type.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` -} -type HeaderMatcher_PresentMatch struct { - PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3,oneof"` -} -type HeaderMatcher_PrefixMatch struct { - PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3,oneof"` -} -type HeaderMatcher_SuffixMatch struct { - SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3,oneof"` -} - -func (*HeaderMatcher_ExactMatch) isHeaderMatcher_HeaderMatchSpecifier() {} -func (*HeaderMatcher_RegexMatch) isHeaderMatcher_HeaderMatchSpecifier() {} -func (*HeaderMatcher_RangeMatch) isHeaderMatcher_HeaderMatchSpecifier() {} -func (*HeaderMatcher_PresentMatch) isHeaderMatcher_HeaderMatchSpecifier() {} -func (*HeaderMatcher_PrefixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} -func (*HeaderMatcher_SuffixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier { - if m != nil { - return m.HeaderMatchSpecifier - } - return nil -} - -func (m *HeaderMatcher) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *HeaderMatcher) GetExactMatch() string { - if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_ExactMatch); ok { - return x.ExactMatch - } - return "" -} - -func (m *HeaderMatcher) GetRegexMatch() string { - if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_RegexMatch); ok { - return x.RegexMatch - } - return "" -} - -func (m *HeaderMatcher) GetRangeMatch() *_type.Int64Range { - if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_RangeMatch); ok { - return x.RangeMatch - } - return nil -} - -func (m *HeaderMatcher) GetPresentMatch() bool { - if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -func (m *HeaderMatcher) GetPrefixMatch() string { - if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_PrefixMatch); ok { - return x.PrefixMatch - } - return "" -} - -func (m *HeaderMatcher) GetSuffixMatch() string { - if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_SuffixMatch); ok { - return x.SuffixMatch - } - return "" -} - -func (m *HeaderMatcher) GetInvertMatch() bool { - if m != nil { - return m.InvertMatch - } - return false -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HeaderMatcher) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HeaderMatcher_OneofMarshaler, _HeaderMatcher_OneofUnmarshaler, _HeaderMatcher_OneofSizer, []interface{}{ - (*HeaderMatcher_ExactMatch)(nil), - (*HeaderMatcher_RegexMatch)(nil), - (*HeaderMatcher_RangeMatch)(nil), - (*HeaderMatcher_PresentMatch)(nil), - (*HeaderMatcher_PrefixMatch)(nil), - (*HeaderMatcher_SuffixMatch)(nil), - } -} - -func _HeaderMatcher_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HeaderMatcher) - // header_match_specifier - switch x := m.HeaderMatchSpecifier.(type) { - case *HeaderMatcher_ExactMatch: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.ExactMatch) - case *HeaderMatcher_RegexMatch: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.RegexMatch) - case *HeaderMatcher_RangeMatch: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.RangeMatch); err != nil { - return err - } - case *HeaderMatcher_PresentMatch: - t := uint64(0) - if x.PresentMatch { - t = 1 - } - _ = b.EncodeVarint(7<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *HeaderMatcher_PrefixMatch: - _ = b.EncodeVarint(9<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.PrefixMatch) - case *HeaderMatcher_SuffixMatch: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.SuffixMatch) - case nil: - default: - return fmt.Errorf("HeaderMatcher.HeaderMatchSpecifier has unexpected type %T", x) - } - return nil -} - -func _HeaderMatcher_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HeaderMatcher) - switch tag { - case 4: // header_match_specifier.exact_match - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HeaderMatchSpecifier = &HeaderMatcher_ExactMatch{x} - return true, err - case 5: // header_match_specifier.regex_match - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HeaderMatchSpecifier = &HeaderMatcher_RegexMatch{x} - return true, err - case 6: // header_match_specifier.range_match - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(_type.Int64Range) - err := b.DecodeMessage(msg) - m.HeaderMatchSpecifier = &HeaderMatcher_RangeMatch{msg} - return true, err - case 7: // header_match_specifier.present_match - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.HeaderMatchSpecifier = &HeaderMatcher_PresentMatch{x != 0} - return true, err - case 9: // header_match_specifier.prefix_match - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HeaderMatchSpecifier = &HeaderMatcher_PrefixMatch{x} - return true, err - case 10: // header_match_specifier.suffix_match - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.HeaderMatchSpecifier = &HeaderMatcher_SuffixMatch{x} - return true, err - default: - return false, nil - } -} - -func _HeaderMatcher_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HeaderMatcher) - // header_match_specifier - switch x := m.HeaderMatchSpecifier.(type) { - case *HeaderMatcher_ExactMatch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.ExactMatch))) - n += len(x.ExactMatch) - case *HeaderMatcher_RegexMatch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.RegexMatch))) - n += len(x.RegexMatch) - case *HeaderMatcher_RangeMatch: - s := proto.Size(x.RangeMatch) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HeaderMatcher_PresentMatch: - n += 1 // tag and wire - n += 1 - case *HeaderMatcher_PrefixMatch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.PrefixMatch))) - n += len(x.PrefixMatch) - case *HeaderMatcher_SuffixMatch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.SuffixMatch))) - n += len(x.SuffixMatch) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// 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. -type QueryParameterMatcher struct { - // 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"` - // Specifies the value of the key. If the value is absent, a request - // that contains the key in its query string will match, whether the - // key appears with a value (e.g., "?debug=true") or not (e.g., "?debug") - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // Specifies whether the query parameter value is a regular expression. - // Defaults to false. The entire query parameter value (i.e., the part to - // the right of the equals sign in "key=value") must match the regex. - // E.g., the regex "\d+$" will match "123" but not "a123" or "123a". - Regex *types.BoolValue `protobuf:"bytes,4,opt,name=regex,proto3" json:"regex,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *QueryParameterMatcher) Reset() { *m = QueryParameterMatcher{} } -func (m *QueryParameterMatcher) String() string { return proto.CompactTextString(m) } -func (*QueryParameterMatcher) ProtoMessage() {} -func (*QueryParameterMatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_7dc2895fb75d9d41, []int{14} -} -func (m *QueryParameterMatcher) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParameterMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *QueryParameterMatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParameterMatcher.Merge(m, src) -} -func (m *QueryParameterMatcher) XXX_Size() int { - return m.Size() -} -func (m *QueryParameterMatcher) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParameterMatcher.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParameterMatcher proto.InternalMessageInfo - -func (m *QueryParameterMatcher) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *QueryParameterMatcher) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func (m *QueryParameterMatcher) GetRegex() *types.BoolValue { - if m != nil { - return m.Regex - } - return nil -} - -func init() { - proto.RegisterEnum("envoy.api.v2.route.VirtualHost_TlsRequirementType", VirtualHost_TlsRequirementType_name, VirtualHost_TlsRequirementType_value) - proto.RegisterEnum("envoy.api.v2.route.RouteAction_ClusterNotFoundResponseCode", RouteAction_ClusterNotFoundResponseCode_name, RouteAction_ClusterNotFoundResponseCode_value) - proto.RegisterEnum("envoy.api.v2.route.RouteAction_InternalRedirectAction", RouteAction_InternalRedirectAction_name, RouteAction_InternalRedirectAction_value) - proto.RegisterEnum("envoy.api.v2.route.RedirectAction_RedirectResponseCode", RedirectAction_RedirectResponseCode_name, RedirectAction_RedirectResponseCode_value) - proto.RegisterType((*VirtualHost)(nil), "envoy.api.v2.route.VirtualHost") - proto.RegisterMapType((map[string]*types.Struct)(nil), "envoy.api.v2.route.VirtualHost.PerFilterConfigEntry") - proto.RegisterMapType((map[string]*types.Any)(nil), "envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry") - proto.RegisterType((*Route)(nil), "envoy.api.v2.route.Route") - proto.RegisterMapType((map[string]*types.Struct)(nil), "envoy.api.v2.route.Route.PerFilterConfigEntry") - proto.RegisterMapType((map[string]*types.Any)(nil), "envoy.api.v2.route.Route.TypedPerFilterConfigEntry") - proto.RegisterType((*WeightedCluster)(nil), "envoy.api.v2.route.WeightedCluster") - proto.RegisterType((*WeightedCluster_ClusterWeight)(nil), "envoy.api.v2.route.WeightedCluster.ClusterWeight") - proto.RegisterMapType((map[string]*types.Struct)(nil), "envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry") - proto.RegisterMapType((map[string]*types.Any)(nil), "envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry") - proto.RegisterType((*RouteMatch)(nil), "envoy.api.v2.route.RouteMatch") - proto.RegisterType((*RouteMatch_GrpcRouteMatchOptions)(nil), "envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions") - proto.RegisterType((*CorsPolicy)(nil), "envoy.api.v2.route.CorsPolicy") - proto.RegisterType((*RouteAction)(nil), "envoy.api.v2.route.RouteAction") - proto.RegisterType((*RouteAction_RequestMirrorPolicy)(nil), "envoy.api.v2.route.RouteAction.RequestMirrorPolicy") - proto.RegisterType((*RouteAction_HashPolicy)(nil), "envoy.api.v2.route.RouteAction.HashPolicy") - proto.RegisterType((*RouteAction_HashPolicy_Header)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.Header") - proto.RegisterType((*RouteAction_HashPolicy_Cookie)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.Cookie") - proto.RegisterType((*RouteAction_HashPolicy_ConnectionProperties)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties") - proto.RegisterType((*RouteAction_UpgradeConfig)(nil), "envoy.api.v2.route.RouteAction.UpgradeConfig") - proto.RegisterType((*RetryPolicy)(nil), "envoy.api.v2.route.RetryPolicy") - proto.RegisterType((*RetryPolicy_RetryPriority)(nil), "envoy.api.v2.route.RetryPolicy.RetryPriority") - proto.RegisterType((*RetryPolicy_RetryHostPredicate)(nil), "envoy.api.v2.route.RetryPolicy.RetryHostPredicate") - proto.RegisterType((*RetryPolicy_RetryBackOff)(nil), "envoy.api.v2.route.RetryPolicy.RetryBackOff") - proto.RegisterType((*HedgePolicy)(nil), "envoy.api.v2.route.HedgePolicy") - proto.RegisterType((*RedirectAction)(nil), "envoy.api.v2.route.RedirectAction") - proto.RegisterType((*DirectResponseAction)(nil), "envoy.api.v2.route.DirectResponseAction") - proto.RegisterType((*Decorator)(nil), "envoy.api.v2.route.Decorator") - proto.RegisterType((*VirtualCluster)(nil), "envoy.api.v2.route.VirtualCluster") - proto.RegisterType((*RateLimit)(nil), "envoy.api.v2.route.RateLimit") - proto.RegisterType((*RateLimit_Action)(nil), "envoy.api.v2.route.RateLimit.Action") - proto.RegisterType((*RateLimit_Action_SourceCluster)(nil), "envoy.api.v2.route.RateLimit.Action.SourceCluster") - proto.RegisterType((*RateLimit_Action_DestinationCluster)(nil), "envoy.api.v2.route.RateLimit.Action.DestinationCluster") - proto.RegisterType((*RateLimit_Action_RequestHeaders)(nil), "envoy.api.v2.route.RateLimit.Action.RequestHeaders") - proto.RegisterType((*RateLimit_Action_RemoteAddress)(nil), "envoy.api.v2.route.RateLimit.Action.RemoteAddress") - proto.RegisterType((*RateLimit_Action_GenericKey)(nil), "envoy.api.v2.route.RateLimit.Action.GenericKey") - proto.RegisterType((*RateLimit_Action_HeaderValueMatch)(nil), "envoy.api.v2.route.RateLimit.Action.HeaderValueMatch") - proto.RegisterType((*HeaderMatcher)(nil), "envoy.api.v2.route.HeaderMatcher") - proto.RegisterType((*QueryParameterMatcher)(nil), "envoy.api.v2.route.QueryParameterMatcher") -} +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("envoy/api/v2/route/route.proto", fileDescriptor_7dc2895fb75d9d41) } var fileDescriptor_7dc2895fb75d9d41 = []byte{ - // 3722 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x5a, 0x4d, 0x70, 0xdb, 0x48, - 0x76, 0x16, 0x44, 0x8a, 0x04, 0x1f, 0x48, 0x0a, 0x6a, 0xc9, 0x12, 0x45, 0x7b, 0x64, 0x99, 0x9e, - 0xc9, 0x68, 0x9d, 0x1d, 0x6a, 0x47, 0x56, 0xc6, 0x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b, 0x78, 0x21, 0xea, 0x3d, 0xe6, 0x9d, 0xcc, 0x96, 0x7d, - 0x96, 0xfc, 0x88, 0x01, 0x5f, 0x99, 0xad, 0xd7, 0x2c, 0x3e, 0x4b, 0xc6, 0xf9, 0xed, 0x89, 0xbe, - 0xaf, 0x6e, 0xb6, 0x5e, 0x1f, 0x9e, 0x9e, 0x62, 0xc1, 0x17, 0xe5, 0x5b, 0xf9, 0xef, 0x14, 0x28, - 0x0c, 0x2d, 0xed, 0x78, 0x8f, 0x93, 0x91, 0xf5, 0xa9, 0xeb, 0x6b, 0x40, 0xc2, 0x2f, 0xf3, 0xc3, - 0xff, 0x18, 0xf2, 0xa2, 0xc6, 0x25, 0x05, 0x53, 0x57, 0x97, 0x76, 0x9a, 0x53, 0x58, 0xe3, 0x58, - 0xe1, 0x37, 0xea, 0x05, 0xd0, 0x84, 0x10, 0x77, 0x1b, 0xe5, 0x9f, 0x2a, 0x80, 0x46, 0x37, 0xeb, - 0xff, 0xf4, 0x94, 0xff, 0x41, 0x81, 0xfc, 0xe0, 0xfa, 0xa3, 0x23, 0x28, 0xbc, 0x32, 0x7d, 0x62, - 0x70, 0xae, 0x71, 0x66, 0x76, 0x65, 0x18, 0xbd, 0xe6, 0x20, 0xe9, 0xec, 0x20, 0xb1, 0x8f, 0xca, - 0xfe, 0x44, 0x49, 0xab, 0xca, 0x83, 0x29, 0x9c, 0x67, 0x1a, 0x76, 0xa4, 0x02, 0xb4, 0x07, 0x79, - 0x66, 0x82, 0x91, 0xc2, 0xb1, 0xd1, 0xa0, 0x18, 0x2a, 0x9c, 0xf9, 0x89, 0x32, 0xfd, 0x60, 0x0a, - 0x6b, 0x3d, 0xf3, 0x3c, 0xd4, 0x56, 0xf9, 0x2f, 0x05, 0xb4, 0x01, 0x16, 0x83, 0x30, 0xe8, 0xb6, - 0x63, 0x07, 0x36, 0x67, 0x5b, 0x9c, 0xbf, 0xf8, 0x72, 0xca, 0x13, 0x57, 0xe2, 0x67, 0xa5, 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xe5, - 0x0b, 0xf1, 0x13, 0xbc, 0x3f, 0x51, 0x94, 0x57, 0x19, 0x3e, 0xd4, 0xc3, 0xff, 0x09, 0x00, 0x00, - 0xff, 0xff, 0x3f, 0xad, 0xa9, 0xc1, 0xd0, 0x2e, 0x00, 0x00, + // 151 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0xd2, 0x2f, 0xca, 0x2f, 0x2d, 0x49, 0x85, 0x90, + 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x42, 0x60, 0x79, 0xbd, 0xc4, 0x82, 0x4c, 0xbd, 0x32, + 0x23, 0x3d, 0xb0, 0x8c, 0x94, 0x6c, 0x69, 0x4a, 0x41, 0xa2, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, + 0x62, 0x49, 0x66, 0x7e, 0x5e, 0xb1, 0x7e, 0x71, 0x49, 0x62, 0x49, 0x69, 0x31, 0x44, 0x8b, 0x94, + 0x26, 0x2e, 0x23, 0xe3, 0x93, 0xf3, 0x73, 0x0b, 0xf2, 0xf3, 0x52, 0xf3, 0x4a, 0xa0, 0x4a, 0x9d, + 0x2c, 0x76, 0x35, 0x9c, 0xb8, 0xc8, 0xc6, 0x24, 0xc0, 0xc8, 0xa5, 0x90, 0x99, 0xaf, 0x07, 0xd6, + 0x57, 0x50, 0x94, 0x5f, 0x51, 0xa9, 0x87, 0x69, 0xab, 0x13, 0x57, 0x10, 0x88, 0x0a, 0x00, 0xe9, + 0x0b, 0x60, 0x0c, 0x60, 0x4c, 0x62, 0x03, 0x1b, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x79, + 0xe9, 0x54, 0x84, 0xc2, 0x00, 0x00, 0x00, } - -func (this *VirtualHost) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VirtualHost) - if !ok { - that2, ok := that.(VirtualHost) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Domains) != len(that1.Domains) { - return false - } - for i := range this.Domains { - if this.Domains[i] != that1.Domains[i] { - return false - } - } - if len(this.Routes) != len(that1.Routes) { - return false - } - for i := range this.Routes { - if !this.Routes[i].Equal(&that1.Routes[i]) { - return false - } - } - if this.RequireTls != that1.RequireTls { - return false - } - if len(this.VirtualClusters) != len(that1.VirtualClusters) { - return false - } - for i := range this.VirtualClusters { - if !this.VirtualClusters[i].Equal(that1.VirtualClusters[i]) { - return false - } - } - if len(this.RateLimits) != len(that1.RateLimits) { - return false - } - for i := range this.RateLimits { - if !this.RateLimits[i].Equal(that1.RateLimits[i]) { - return false - } - } - if len(this.RequestHeadersToAdd) != len(that1.RequestHeadersToAdd) { - return false - } - for i := range this.RequestHeadersToAdd { - if !this.RequestHeadersToAdd[i].Equal(that1.RequestHeadersToAdd[i]) { - return false - } - } - if len(this.RequestHeadersToRemove) != len(that1.RequestHeadersToRemove) { - return false - } - for i := range this.RequestHeadersToRemove { - if this.RequestHeadersToRemove[i] != that1.RequestHeadersToRemove[i] { - return false - } - } - if len(this.ResponseHeadersToAdd) != len(that1.ResponseHeadersToAdd) { - return false - } - for i := range this.ResponseHeadersToAdd { - if !this.ResponseHeadersToAdd[i].Equal(that1.ResponseHeadersToAdd[i]) { - return false - } - } - if len(this.ResponseHeadersToRemove) != len(that1.ResponseHeadersToRemove) { - return false - } - for i := range this.ResponseHeadersToRemove { - if this.ResponseHeadersToRemove[i] != that1.ResponseHeadersToRemove[i] { - return false - } - } - if !this.Cors.Equal(that1.Cors) { - return false - } - if len(this.PerFilterConfig) != len(that1.PerFilterConfig) { - return false - } - for i := range this.PerFilterConfig { - if !this.PerFilterConfig[i].Equal(that1.PerFilterConfig[i]) { - return false - } - } - if len(this.TypedPerFilterConfig) != len(that1.TypedPerFilterConfig) { - return false - } - for i := range this.TypedPerFilterConfig { - if !this.TypedPerFilterConfig[i].Equal(that1.TypedPerFilterConfig[i]) { - return false - } - } - if this.IncludeRequestAttemptCount != that1.IncludeRequestAttemptCount { - return false - } - if !this.RetryPolicy.Equal(that1.RetryPolicy) { - return false - } - if !this.HedgePolicy.Equal(that1.HedgePolicy) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Route) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Route) - if !ok { - that2, ok := that.(Route) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Match.Equal(&that1.Match) { - return false - } - if that1.Action == nil { - if this.Action != nil { - return false - } - } else if this.Action == nil { - return false - } else if !this.Action.Equal(that1.Action) { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !this.Decorator.Equal(that1.Decorator) { - return false - } - if len(this.PerFilterConfig) != len(that1.PerFilterConfig) { - return false - } - for i := range this.PerFilterConfig { - if !this.PerFilterConfig[i].Equal(that1.PerFilterConfig[i]) { - return false - } - } - if len(this.TypedPerFilterConfig) != len(that1.TypedPerFilterConfig) { - return false - } - for i := range this.TypedPerFilterConfig { - if !this.TypedPerFilterConfig[i].Equal(that1.TypedPerFilterConfig[i]) { - return false - } - } - if len(this.RequestHeadersToAdd) != len(that1.RequestHeadersToAdd) { - return false - } - for i := range this.RequestHeadersToAdd { - if !this.RequestHeadersToAdd[i].Equal(that1.RequestHeadersToAdd[i]) { - return false - } - } - if len(this.RequestHeadersToRemove) != len(that1.RequestHeadersToRemove) { - return false - } - for i := range this.RequestHeadersToRemove { - if this.RequestHeadersToRemove[i] != that1.RequestHeadersToRemove[i] { - return false - } - } - if len(this.ResponseHeadersToAdd) != len(that1.ResponseHeadersToAdd) { - return false - } - for i := range this.ResponseHeadersToAdd { - if !this.ResponseHeadersToAdd[i].Equal(that1.ResponseHeadersToAdd[i]) { - return false - } - } - if len(this.ResponseHeadersToRemove) != len(that1.ResponseHeadersToRemove) { - return false - } - for i := range this.ResponseHeadersToRemove { - if this.ResponseHeadersToRemove[i] != that1.ResponseHeadersToRemove[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Route_Route) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Route_Route) - if !ok { - that2, ok := that.(Route_Route) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Route.Equal(that1.Route) { - return false - } - return true -} -func (this *Route_Redirect) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Route_Redirect) - if !ok { - that2, ok := that.(Route_Redirect) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Redirect.Equal(that1.Redirect) { - return false - } - return true -} -func (this *Route_DirectResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Route_DirectResponse) - if !ok { - that2, ok := that.(Route_DirectResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.DirectResponse.Equal(that1.DirectResponse) { - return false - } - return true -} -func (this *WeightedCluster) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*WeightedCluster) - if !ok { - that2, ok := that.(WeightedCluster) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Clusters) != len(that1.Clusters) { - return false - } - for i := range this.Clusters { - if !this.Clusters[i].Equal(that1.Clusters[i]) { - return false - } - } - if !this.TotalWeight.Equal(that1.TotalWeight) { - return false - } - if this.RuntimeKeyPrefix != that1.RuntimeKeyPrefix { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *WeightedCluster_ClusterWeight) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*WeightedCluster_ClusterWeight) - if !ok { - that2, ok := that.(WeightedCluster_ClusterWeight) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !this.Weight.Equal(that1.Weight) { - return false - } - if !this.MetadataMatch.Equal(that1.MetadataMatch) { - return false - } - if len(this.RequestHeadersToAdd) != len(that1.RequestHeadersToAdd) { - return false - } - for i := range this.RequestHeadersToAdd { - if !this.RequestHeadersToAdd[i].Equal(that1.RequestHeadersToAdd[i]) { - return false - } - } - if len(this.RequestHeadersToRemove) != len(that1.RequestHeadersToRemove) { - return false - } - for i := range this.RequestHeadersToRemove { - if this.RequestHeadersToRemove[i] != that1.RequestHeadersToRemove[i] { - return false - } - } - if len(this.ResponseHeadersToAdd) != len(that1.ResponseHeadersToAdd) { - return false - } - for i := range this.ResponseHeadersToAdd { - if !this.ResponseHeadersToAdd[i].Equal(that1.ResponseHeadersToAdd[i]) { - return false - } - } - if len(this.ResponseHeadersToRemove) != len(that1.ResponseHeadersToRemove) { - return false - } - for i := range this.ResponseHeadersToRemove { - if this.ResponseHeadersToRemove[i] != that1.ResponseHeadersToRemove[i] { - return false - } - } - if len(this.PerFilterConfig) != len(that1.PerFilterConfig) { - return false - } - for i := range this.PerFilterConfig { - if !this.PerFilterConfig[i].Equal(that1.PerFilterConfig[i]) { - return false - } - } - if len(this.TypedPerFilterConfig) != len(that1.TypedPerFilterConfig) { - return false - } - for i := range this.TypedPerFilterConfig { - if !this.TypedPerFilterConfig[i].Equal(that1.TypedPerFilterConfig[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteMatch) - if !ok { - that2, ok := that.(RouteMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.PathSpecifier == nil { - if this.PathSpecifier != nil { - return false - } - } else if this.PathSpecifier == nil { - return false - } else if !this.PathSpecifier.Equal(that1.PathSpecifier) { - return false - } - if !this.CaseSensitive.Equal(that1.CaseSensitive) { - return false - } - if !this.RuntimeFraction.Equal(that1.RuntimeFraction) { - return false - } - if len(this.Headers) != len(that1.Headers) { - return false - } - for i := range this.Headers { - if !this.Headers[i].Equal(that1.Headers[i]) { - return false - } - } - if len(this.QueryParameters) != len(that1.QueryParameters) { - return false - } - for i := range this.QueryParameters { - if !this.QueryParameters[i].Equal(that1.QueryParameters[i]) { - return false - } - } - if !this.Grpc.Equal(that1.Grpc) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteMatch_Prefix) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteMatch_Prefix) - if !ok { - that2, ok := that.(RouteMatch_Prefix) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Prefix != that1.Prefix { - return false - } - return true -} -func (this *RouteMatch_Path) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteMatch_Path) - if !ok { - that2, ok := that.(RouteMatch_Path) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - return true -} -func (this *RouteMatch_Regex) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteMatch_Regex) - if !ok { - that2, ok := that.(RouteMatch_Regex) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Regex != that1.Regex { - return false - } - return true -} -func (this *RouteMatch_GrpcRouteMatchOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteMatch_GrpcRouteMatchOptions) - if !ok { - that2, ok := that.(RouteMatch_GrpcRouteMatchOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CorsPolicy) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CorsPolicy) - if !ok { - that2, ok := that.(CorsPolicy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.AllowOrigin) != len(that1.AllowOrigin) { - return false - } - for i := range this.AllowOrigin { - if this.AllowOrigin[i] != that1.AllowOrigin[i] { - return false - } - } - if len(this.AllowOriginRegex) != len(that1.AllowOriginRegex) { - return false - } - for i := range this.AllowOriginRegex { - if this.AllowOriginRegex[i] != that1.AllowOriginRegex[i] { - return false - } - } - if this.AllowMethods != that1.AllowMethods { - return false - } - if this.AllowHeaders != that1.AllowHeaders { - return false - } - if this.ExposeHeaders != that1.ExposeHeaders { - return false - } - if this.MaxAge != that1.MaxAge { - return false - } - if !this.AllowCredentials.Equal(that1.AllowCredentials) { - return false - } - if that1.EnabledSpecifier == nil { - if this.EnabledSpecifier != nil { - return false - } - } else if this.EnabledSpecifier == nil { - return false - } else if !this.EnabledSpecifier.Equal(that1.EnabledSpecifier) { - return false - } - if !this.ShadowEnabled.Equal(that1.ShadowEnabled) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CorsPolicy_Enabled) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CorsPolicy_Enabled) - if !ok { - that2, ok := that.(CorsPolicy_Enabled) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Enabled.Equal(that1.Enabled) { - return false - } - return true -} -func (this *CorsPolicy_FilterEnabled) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CorsPolicy_FilterEnabled) - if !ok { - that2, ok := that.(CorsPolicy_FilterEnabled) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.FilterEnabled.Equal(that1.FilterEnabled) { - return false - } - return true -} -func (this *RouteAction) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction) - if !ok { - that2, ok := that.(RouteAction) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.ClusterSpecifier == nil { - if this.ClusterSpecifier != nil { - return false - } - } else if this.ClusterSpecifier == nil { - return false - } else if !this.ClusterSpecifier.Equal(that1.ClusterSpecifier) { - return false - } - if this.ClusterNotFoundResponseCode != that1.ClusterNotFoundResponseCode { - return false - } - if !this.MetadataMatch.Equal(that1.MetadataMatch) { - return false - } - if this.PrefixRewrite != that1.PrefixRewrite { - return false - } - if that1.HostRewriteSpecifier == nil { - if this.HostRewriteSpecifier != nil { - return false - } - } else if this.HostRewriteSpecifier == nil { - return false - } else if !this.HostRewriteSpecifier.Equal(that1.HostRewriteSpecifier) { - return false - } - if this.Timeout != nil && that1.Timeout != nil { - if *this.Timeout != *that1.Timeout { - return false - } - } else if this.Timeout != nil { - return false - } else if that1.Timeout != nil { - return false - } - if this.IdleTimeout != nil && that1.IdleTimeout != nil { - if *this.IdleTimeout != *that1.IdleTimeout { - return false - } - } else if this.IdleTimeout != nil { - return false - } else if that1.IdleTimeout != nil { - return false - } - if !this.RetryPolicy.Equal(that1.RetryPolicy) { - return false - } - if !this.RequestMirrorPolicy.Equal(that1.RequestMirrorPolicy) { - return false - } - if this.Priority != that1.Priority { - return false - } - if len(this.RateLimits) != len(that1.RateLimits) { - return false - } - for i := range this.RateLimits { - if !this.RateLimits[i].Equal(that1.RateLimits[i]) { - return false - } - } - if !this.IncludeVhRateLimits.Equal(that1.IncludeVhRateLimits) { - return false - } - if len(this.HashPolicy) != len(that1.HashPolicy) { - return false - } - for i := range this.HashPolicy { - if !this.HashPolicy[i].Equal(that1.HashPolicy[i]) { - return false - } - } - if !this.Cors.Equal(that1.Cors) { - return false - } - if this.MaxGrpcTimeout != nil && that1.MaxGrpcTimeout != nil { - if *this.MaxGrpcTimeout != *that1.MaxGrpcTimeout { - return false - } - } else if this.MaxGrpcTimeout != nil { - return false - } else if that1.MaxGrpcTimeout != nil { - return false - } - if this.GrpcTimeoutOffset != nil && that1.GrpcTimeoutOffset != nil { - if *this.GrpcTimeoutOffset != *that1.GrpcTimeoutOffset { - return false - } - } else if this.GrpcTimeoutOffset != nil { - return false - } else if that1.GrpcTimeoutOffset != nil { - return false - } - if len(this.UpgradeConfigs) != len(that1.UpgradeConfigs) { - return false - } - for i := range this.UpgradeConfigs { - if !this.UpgradeConfigs[i].Equal(that1.UpgradeConfigs[i]) { - return false - } - } - if this.InternalRedirectAction != that1.InternalRedirectAction { - return false - } - if !this.HedgePolicy.Equal(that1.HedgePolicy) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteAction_Cluster) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_Cluster) - if !ok { - that2, ok := that.(RouteAction_Cluster) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Cluster != that1.Cluster { - return false - } - return true -} -func (this *RouteAction_ClusterHeader) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_ClusterHeader) - if !ok { - that2, ok := that.(RouteAction_ClusterHeader) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ClusterHeader != that1.ClusterHeader { - return false - } - return true -} -func (this *RouteAction_WeightedClusters) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_WeightedClusters) - if !ok { - that2, ok := that.(RouteAction_WeightedClusters) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.WeightedClusters.Equal(that1.WeightedClusters) { - return false - } - return true -} -func (this *RouteAction_HostRewrite) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HostRewrite) - if !ok { - that2, ok := that.(RouteAction_HostRewrite) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.HostRewrite != that1.HostRewrite { - return false - } - return true -} -func (this *RouteAction_AutoHostRewrite) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_AutoHostRewrite) - if !ok { - that2, ok := that.(RouteAction_AutoHostRewrite) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.AutoHostRewrite.Equal(that1.AutoHostRewrite) { - return false - } - return true -} -func (this *RouteAction_RequestMirrorPolicy) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_RequestMirrorPolicy) - if !ok { - that2, ok := that.(RouteAction_RequestMirrorPolicy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Cluster != that1.Cluster { - return false - } - if this.RuntimeKey != that1.RuntimeKey { - return false - } - if !this.RuntimeFraction.Equal(that1.RuntimeFraction) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteAction_HashPolicy) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy) - if !ok { - that2, ok := that.(RouteAction_HashPolicy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.PolicySpecifier == nil { - if this.PolicySpecifier != nil { - return false - } - } else if this.PolicySpecifier == nil { - return false - } else if !this.PolicySpecifier.Equal(that1.PolicySpecifier) { - return false - } - if this.Terminal != that1.Terminal { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteAction_HashPolicy_Header_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy_Header_) - if !ok { - that2, ok := that.(RouteAction_HashPolicy_Header_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Header.Equal(that1.Header) { - return false - } - return true -} -func (this *RouteAction_HashPolicy_Cookie_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy_Cookie_) - if !ok { - that2, ok := that.(RouteAction_HashPolicy_Cookie_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Cookie.Equal(that1.Cookie) { - return false - } - return true -} -func (this *RouteAction_HashPolicy_ConnectionProperties_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy_ConnectionProperties_) - if !ok { - that2, ok := that.(RouteAction_HashPolicy_ConnectionProperties_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ConnectionProperties.Equal(that1.ConnectionProperties) { - return false - } - return true -} -func (this *RouteAction_HashPolicy_Header) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy_Header) - if !ok { - that2, ok := that.(RouteAction_HashPolicy_Header) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.HeaderName != that1.HeaderName { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteAction_HashPolicy_Cookie) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy_Cookie) - if !ok { - that2, ok := that.(RouteAction_HashPolicy_Cookie) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Ttl != nil && that1.Ttl != nil { - if *this.Ttl != *that1.Ttl { - return false - } - } else if this.Ttl != nil { - return false - } else if that1.Ttl != nil { - return false - } - if this.Path != that1.Path { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteAction_HashPolicy_ConnectionProperties) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_HashPolicy_ConnectionProperties) - if !ok { - that2, ok := that.(RouteAction_HashPolicy_ConnectionProperties) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SourceIp != that1.SourceIp { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RouteAction_UpgradeConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RouteAction_UpgradeConfig) - if !ok { - that2, ok := that.(RouteAction_UpgradeConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UpgradeType != that1.UpgradeType { - return false - } - if !this.Enabled.Equal(that1.Enabled) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RetryPolicy) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy) - if !ok { - that2, ok := that.(RetryPolicy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RetryOn != that1.RetryOn { - return false - } - if !this.NumRetries.Equal(that1.NumRetries) { - return false - } - if this.PerTryTimeout != nil && that1.PerTryTimeout != nil { - if *this.PerTryTimeout != *that1.PerTryTimeout { - return false - } - } else if this.PerTryTimeout != nil { - return false - } else if that1.PerTryTimeout != nil { - return false - } - if !this.RetryPriority.Equal(that1.RetryPriority) { - return false - } - if len(this.RetryHostPredicate) != len(that1.RetryHostPredicate) { - return false - } - for i := range this.RetryHostPredicate { - if !this.RetryHostPredicate[i].Equal(that1.RetryHostPredicate[i]) { - return false - } - } - if this.HostSelectionRetryMaxAttempts != that1.HostSelectionRetryMaxAttempts { - return false - } - if len(this.RetriableStatusCodes) != len(that1.RetriableStatusCodes) { - return false - } - for i := range this.RetriableStatusCodes { - if this.RetriableStatusCodes[i] != that1.RetriableStatusCodes[i] { - return false - } - } - if !this.RetryBackOff.Equal(that1.RetryBackOff) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RetryPolicy_RetryPriority) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryPriority) - if !ok { - that2, ok := that.(RetryPolicy_RetryPriority) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RetryPolicy_RetryPriority_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryPriority_Config) - if !ok { - that2, ok := that.(RetryPolicy_RetryPriority_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *RetryPolicy_RetryPriority_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryPriority_TypedConfig) - if !ok { - that2, ok := that.(RetryPolicy_RetryPriority_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (this *RetryPolicy_RetryHostPredicate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryHostPredicate) - if !ok { - that2, ok := that.(RetryPolicy_RetryHostPredicate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.ConfigType == nil { - if this.ConfigType != nil { - return false - } - } else if this.ConfigType == nil { - return false - } else if !this.ConfigType.Equal(that1.ConfigType) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RetryPolicy_RetryHostPredicate_Config) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryHostPredicate_Config) - if !ok { - that2, ok := that.(RetryPolicy_RetryHostPredicate_Config) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - return true -} -func (this *RetryPolicy_RetryHostPredicate_TypedConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryHostPredicate_TypedConfig) - if !ok { - that2, ok := that.(RetryPolicy_RetryHostPredicate_TypedConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.TypedConfig.Equal(that1.TypedConfig) { - return false - } - return true -} -func (this *RetryPolicy_RetryBackOff) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryPolicy_RetryBackOff) - if !ok { - that2, ok := that.(RetryPolicy_RetryBackOff) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BaseInterval != nil && that1.BaseInterval != nil { - if *this.BaseInterval != *that1.BaseInterval { - return false - } - } else if this.BaseInterval != nil { - return false - } else if that1.BaseInterval != nil { - return false - } - if this.MaxInterval != nil && that1.MaxInterval != nil { - if *this.MaxInterval != *that1.MaxInterval { - return false - } - } else if this.MaxInterval != nil { - return false - } else if that1.MaxInterval != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HedgePolicy) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HedgePolicy) - if !ok { - that2, ok := that.(HedgePolicy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.InitialRequests.Equal(that1.InitialRequests) { - return false - } - if !this.AdditionalRequestChance.Equal(that1.AdditionalRequestChance) { - return false - } - if this.HedgeOnPerTryTimeout != that1.HedgeOnPerTryTimeout { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RedirectAction) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedirectAction) - if !ok { - that2, ok := that.(RedirectAction) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.SchemeRewriteSpecifier == nil { - if this.SchemeRewriteSpecifier != nil { - return false - } - } else if this.SchemeRewriteSpecifier == nil { - return false - } else if !this.SchemeRewriteSpecifier.Equal(that1.SchemeRewriteSpecifier) { - return false - } - if this.HostRedirect != that1.HostRedirect { - return false - } - if this.PortRedirect != that1.PortRedirect { - return false - } - if that1.PathRewriteSpecifier == nil { - if this.PathRewriteSpecifier != nil { - return false - } - } else if this.PathRewriteSpecifier == nil { - return false - } else if !this.PathRewriteSpecifier.Equal(that1.PathRewriteSpecifier) { - return false - } - if this.ResponseCode != that1.ResponseCode { - return false - } - if this.StripQuery != that1.StripQuery { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RedirectAction_HttpsRedirect) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedirectAction_HttpsRedirect) - if !ok { - that2, ok := that.(RedirectAction_HttpsRedirect) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.HttpsRedirect != that1.HttpsRedirect { - return false - } - return true -} -func (this *RedirectAction_SchemeRedirect) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedirectAction_SchemeRedirect) - if !ok { - that2, ok := that.(RedirectAction_SchemeRedirect) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SchemeRedirect != that1.SchemeRedirect { - return false - } - return true -} -func (this *RedirectAction_PathRedirect) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedirectAction_PathRedirect) - if !ok { - that2, ok := that.(RedirectAction_PathRedirect) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PathRedirect != that1.PathRedirect { - return false - } - return true -} -func (this *RedirectAction_PrefixRewrite) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RedirectAction_PrefixRewrite) - if !ok { - that2, ok := that.(RedirectAction_PrefixRewrite) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PrefixRewrite != that1.PrefixRewrite { - return false - } - return true -} -func (this *DirectResponseAction) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DirectResponseAction) - if !ok { - that2, ok := that.(DirectResponseAction) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Status != that1.Status { - return false - } - if !this.Body.Equal(that1.Body) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Decorator) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Decorator) - if !ok { - that2, ok := that.(Decorator) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Operation != that1.Operation { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *VirtualCluster) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VirtualCluster) - if !ok { - that2, ok := that.(VirtualCluster) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Pattern != that1.Pattern { - return false - } - if this.Name != that1.Name { - return false - } - if this.Method != that1.Method { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit) - if !ok { - that2, ok := that.(RateLimit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Stage.Equal(that1.Stage) { - return false - } - if this.DisableKey != that1.DisableKey { - return false - } - if len(this.Actions) != len(that1.Actions) { - return false - } - for i := range this.Actions { - if !this.Actions[i].Equal(that1.Actions[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action) - if !ok { - that2, ok := that.(RateLimit_Action) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.ActionSpecifier == nil { - if this.ActionSpecifier != nil { - return false - } - } else if this.ActionSpecifier == nil { - return false - } else if !this.ActionSpecifier.Equal(that1.ActionSpecifier) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action_SourceCluster_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_SourceCluster_) - if !ok { - that2, ok := that.(RateLimit_Action_SourceCluster_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.SourceCluster.Equal(that1.SourceCluster) { - return false - } - return true -} -func (this *RateLimit_Action_DestinationCluster_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_DestinationCluster_) - if !ok { - that2, ok := that.(RateLimit_Action_DestinationCluster_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.DestinationCluster.Equal(that1.DestinationCluster) { - return false - } - return true -} -func (this *RateLimit_Action_RequestHeaders_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_RequestHeaders_) - if !ok { - that2, ok := that.(RateLimit_Action_RequestHeaders_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RequestHeaders.Equal(that1.RequestHeaders) { - return false - } - return true -} -func (this *RateLimit_Action_RemoteAddress_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_RemoteAddress_) - if !ok { - that2, ok := that.(RateLimit_Action_RemoteAddress_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RemoteAddress.Equal(that1.RemoteAddress) { - return false - } - return true -} -func (this *RateLimit_Action_GenericKey_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_GenericKey_) - if !ok { - that2, ok := that.(RateLimit_Action_GenericKey_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.GenericKey.Equal(that1.GenericKey) { - return false - } - return true -} -func (this *RateLimit_Action_HeaderValueMatch_) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_HeaderValueMatch_) - if !ok { - that2, ok := that.(RateLimit_Action_HeaderValueMatch_) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.HeaderValueMatch.Equal(that1.HeaderValueMatch) { - return false - } - return true -} -func (this *RateLimit_Action_SourceCluster) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_SourceCluster) - if !ok { - that2, ok := that.(RateLimit_Action_SourceCluster) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action_DestinationCluster) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_DestinationCluster) - if !ok { - that2, ok := that.(RateLimit_Action_DestinationCluster) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action_RequestHeaders) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_RequestHeaders) - if !ok { - that2, ok := that.(RateLimit_Action_RequestHeaders) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.HeaderName != that1.HeaderName { - return false - } - if this.DescriptorKey != that1.DescriptorKey { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action_RemoteAddress) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_RemoteAddress) - if !ok { - that2, ok := that.(RateLimit_Action_RemoteAddress) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action_GenericKey) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_GenericKey) - if !ok { - that2, ok := that.(RateLimit_Action_GenericKey) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DescriptorValue != that1.DescriptorValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RateLimit_Action_HeaderValueMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RateLimit_Action_HeaderValueMatch) - if !ok { - that2, ok := that.(RateLimit_Action_HeaderValueMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DescriptorValue != that1.DescriptorValue { - return false - } - if !this.ExpectMatch.Equal(that1.ExpectMatch) { - return false - } - if len(this.Headers) != len(that1.Headers) { - return false - } - for i := range this.Headers { - if !this.Headers[i].Equal(that1.Headers[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HeaderMatcher) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher) - if !ok { - that2, ok := that.(HeaderMatcher) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if that1.HeaderMatchSpecifier == nil { - if this.HeaderMatchSpecifier != nil { - return false - } - } else if this.HeaderMatchSpecifier == nil { - return false - } else if !this.HeaderMatchSpecifier.Equal(that1.HeaderMatchSpecifier) { - return false - } - if this.InvertMatch != that1.InvertMatch { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HeaderMatcher_ExactMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher_ExactMatch) - if !ok { - that2, ok := that.(HeaderMatcher_ExactMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ExactMatch != that1.ExactMatch { - return false - } - return true -} -func (this *HeaderMatcher_RegexMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher_RegexMatch) - if !ok { - that2, ok := that.(HeaderMatcher_RegexMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RegexMatch != that1.RegexMatch { - return false - } - return true -} -func (this *HeaderMatcher_RangeMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher_RangeMatch) - if !ok { - that2, ok := that.(HeaderMatcher_RangeMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RangeMatch.Equal(that1.RangeMatch) { - return false - } - return true -} -func (this *HeaderMatcher_PresentMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher_PresentMatch) - if !ok { - that2, ok := that.(HeaderMatcher_PresentMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PresentMatch != that1.PresentMatch { - return false - } - return true -} -func (this *HeaderMatcher_PrefixMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher_PrefixMatch) - if !ok { - that2, ok := that.(HeaderMatcher_PrefixMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PrefixMatch != that1.PrefixMatch { - return false - } - return true -} -func (this *HeaderMatcher_SuffixMatch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HeaderMatcher_SuffixMatch) - if !ok { - that2, ok := that.(HeaderMatcher_SuffixMatch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SuffixMatch != that1.SuffixMatch { - return false - } - return true -} -func (this *QueryParameterMatcher) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QueryParameterMatcher) - if !ok { - that2, ok := that.(QueryParameterMatcher) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Value != that1.Value { - return false - } - if !this.Regex.Equal(that1.Regex) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *VirtualHost) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VirtualHost) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Domains) > 0 { - for _, s := range m.Domains { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Routes) > 0 { - for _, msg := range m.Routes { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.RequireTls != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RequireTls)) - } - if len(m.VirtualClusters) > 0 { - for _, msg := range m.VirtualClusters { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.RateLimits) > 0 { - for _, msg := range m.RateLimits { - dAtA[i] = 0x32 - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.RequestHeadersToAdd) > 0 { - for _, msg := range m.RequestHeadersToAdd { - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Cors != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Cors.Size())) - n1, err := m.Cors.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, msg := range m.ResponseHeadersToAdd { - dAtA[i] = 0x52 - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - dAtA[i] = 0x5a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.PerFilterConfig) > 0 { - keysForPerFilterConfig := make([]string, 0, len(m.PerFilterConfig)) - for k, _ := range m.PerFilterConfig { - keysForPerFilterConfig = append(keysForPerFilterConfig, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForPerFilterConfig) - for _, k := range keysForPerFilterConfig { - dAtA[i] = 0x62 - i++ - v := m.PerFilterConfig[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovRoute(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovRoute(uint64(len(k))) + msgSize - i = encodeVarintRoute(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(v.Size())) - n2, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - dAtA[i] = 0x6a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.IncludeRequestAttemptCount { - dAtA[i] = 0x70 - i++ - if m.IncludeRequestAttemptCount { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.TypedPerFilterConfig) > 0 { - keysForTypedPerFilterConfig := make([]string, 0, len(m.TypedPerFilterConfig)) - for k, _ := range m.TypedPerFilterConfig { - keysForTypedPerFilterConfig = append(keysForTypedPerFilterConfig, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForTypedPerFilterConfig) - for _, k := range keysForTypedPerFilterConfig { - dAtA[i] = 0x7a - i++ - v := m.TypedPerFilterConfig[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovRoute(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovRoute(uint64(len(k))) + msgSize - i = encodeVarintRoute(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(v.Size())) - n3, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - } - } - if m.RetryPolicy != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RetryPolicy.Size())) - n4, err := m.RetryPolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.HedgePolicy != nil { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.HedgePolicy.Size())) - n5, err := m.HedgePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Route) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Route) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Match.Size())) - n6, err := m.Match.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - if m.Action != nil { - nn7, err := m.Action.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn7 - } - if m.Metadata != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Metadata.Size())) - n8, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Decorator != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Decorator.Size())) - n9, err := m.Decorator.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if len(m.PerFilterConfig) > 0 { - keysForPerFilterConfig := make([]string, 0, len(m.PerFilterConfig)) - for k, _ := range m.PerFilterConfig { - keysForPerFilterConfig = append(keysForPerFilterConfig, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForPerFilterConfig) - for _, k := range keysForPerFilterConfig { - dAtA[i] = 0x42 - i++ - v := m.PerFilterConfig[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovRoute(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovRoute(uint64(len(k))) + msgSize - i = encodeVarintRoute(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(v.Size())) - n10, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - } - } - if len(m.RequestHeadersToAdd) > 0 { - for _, msg := range m.RequestHeadersToAdd { - dAtA[i] = 0x4a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, msg := range m.ResponseHeadersToAdd { - dAtA[i] = 0x52 - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - dAtA[i] = 0x5a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - dAtA[i] = 0x62 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.TypedPerFilterConfig) > 0 { - keysForTypedPerFilterConfig := make([]string, 0, len(m.TypedPerFilterConfig)) - for k, _ := range m.TypedPerFilterConfig { - keysForTypedPerFilterConfig = append(keysForTypedPerFilterConfig, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForTypedPerFilterConfig) - for _, k := range keysForTypedPerFilterConfig { - dAtA[i] = 0x6a - i++ - v := m.TypedPerFilterConfig[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovRoute(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovRoute(uint64(len(k))) + msgSize - i = encodeVarintRoute(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(v.Size())) - n11, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Route_Route) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Route != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Route.Size())) - n12, err := m.Route.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - return i, nil -} -func (m *Route_Redirect) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Redirect != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Redirect.Size())) - n13, err := m.Redirect.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - return i, nil -} -func (m *Route_DirectResponse) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.DirectResponse != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.DirectResponse.Size())) - n14, err := m.DirectResponse.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - return i, nil -} -func (m *WeightedCluster) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WeightedCluster) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Clusters) > 0 { - for _, msg := range m.Clusters { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.RuntimeKeyPrefix) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.RuntimeKeyPrefix))) - i += copy(dAtA[i:], m.RuntimeKeyPrefix) - } - if m.TotalWeight != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.TotalWeight.Size())) - n15, err := m.TotalWeight.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *WeightedCluster_ClusterWeight) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WeightedCluster_ClusterWeight) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Weight != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Weight.Size())) - n16, err := m.Weight.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.MetadataMatch != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.MetadataMatch.Size())) - n17, err := m.MetadataMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if len(m.RequestHeadersToAdd) > 0 { - for _, msg := range m.RequestHeadersToAdd { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, msg := range m.ResponseHeadersToAdd { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.PerFilterConfig) > 0 { - keysForPerFilterConfig := make([]string, 0, len(m.PerFilterConfig)) - for k, _ := range m.PerFilterConfig { - keysForPerFilterConfig = append(keysForPerFilterConfig, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForPerFilterConfig) - for _, k := range keysForPerFilterConfig { - dAtA[i] = 0x42 - i++ - v := m.PerFilterConfig[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovRoute(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovRoute(uint64(len(k))) + msgSize - i = encodeVarintRoute(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(v.Size())) - n18, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - } - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - dAtA[i] = 0x4a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.TypedPerFilterConfig) > 0 { - keysForTypedPerFilterConfig := make([]string, 0, len(m.TypedPerFilterConfig)) - for k, _ := range m.TypedPerFilterConfig { - keysForTypedPerFilterConfig = append(keysForTypedPerFilterConfig, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForTypedPerFilterConfig) - for _, k := range keysForTypedPerFilterConfig { - dAtA[i] = 0x52 - i++ - v := m.TypedPerFilterConfig[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovRoute(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovRoute(uint64(len(k))) + msgSize - i = encodeVarintRoute(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(v.Size())) - n19, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteMatch) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.PathSpecifier != nil { - nn20, err := m.PathSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn20 - } - if m.CaseSensitive != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.CaseSensitive.Size())) - n21, err := m.CaseSensitive.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - if len(m.Headers) > 0 { - for _, msg := range m.Headers { - dAtA[i] = 0x32 - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.QueryParameters) > 0 { - for _, msg := range m.QueryParameters { - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Grpc != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Grpc.Size())) - n22, err := m.Grpc.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - if m.RuntimeFraction != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RuntimeFraction.Size())) - n23, err := m.RuntimeFraction.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteMatch_Prefix) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Prefix))) - i += copy(dAtA[i:], m.Prefix) - return i, nil -} -func (m *RouteMatch_Path) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - return i, nil -} -func (m *RouteMatch_Regex) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Regex))) - i += copy(dAtA[i:], m.Regex) - return i, nil -} -func (m *RouteMatch_GrpcRouteMatchOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteMatch_GrpcRouteMatchOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CorsPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CorsPolicy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.AllowOrigin) > 0 { - for _, s := range m.AllowOrigin { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.AllowMethods) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.AllowMethods))) - i += copy(dAtA[i:], m.AllowMethods) - } - if len(m.AllowHeaders) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.AllowHeaders))) - i += copy(dAtA[i:], m.AllowHeaders) - } - if len(m.ExposeHeaders) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.ExposeHeaders))) - i += copy(dAtA[i:], m.ExposeHeaders) - } - if len(m.MaxAge) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.MaxAge))) - i += copy(dAtA[i:], m.MaxAge) - } - if m.AllowCredentials != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.AllowCredentials.Size())) - n24, err := m.AllowCredentials.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - if m.EnabledSpecifier != nil { - nn25, err := m.EnabledSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn25 - } - if len(m.AllowOriginRegex) > 0 { - for _, s := range m.AllowOriginRegex { - dAtA[i] = 0x42 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.ShadowEnabled != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.ShadowEnabled.Size())) - n26, err := m.ShadowEnabled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CorsPolicy_Enabled) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Enabled != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Enabled.Size())) - n27, err := m.Enabled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - return i, nil -} -func (m *CorsPolicy_FilterEnabled) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.FilterEnabled != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.FilterEnabled.Size())) - n28, err := m.FilterEnabled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n28 - } - return i, nil -} -func (m *RouteAction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ClusterSpecifier != nil { - nn29, err := m.ClusterSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn29 - } - if m.MetadataMatch != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.MetadataMatch.Size())) - n30, err := m.MetadataMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 - } - if len(m.PrefixRewrite) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.PrefixRewrite))) - i += copy(dAtA[i:], m.PrefixRewrite) - } - if m.HostRewriteSpecifier != nil { - nn31, err := m.HostRewriteSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn31 - } - if m.Timeout != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout))) - n32, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Timeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n32 - } - if m.RetryPolicy != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RetryPolicy.Size())) - n33, err := m.RetryPolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n33 - } - if m.RequestMirrorPolicy != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RequestMirrorPolicy.Size())) - n34, err := m.RequestMirrorPolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n34 - } - if m.Priority != 0 { - dAtA[i] = 0x58 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Priority)) - } - if len(m.RateLimits) > 0 { - for _, msg := range m.RateLimits { - dAtA[i] = 0x6a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.IncludeVhRateLimits != nil { - dAtA[i] = 0x72 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.IncludeVhRateLimits.Size())) - n35, err := m.IncludeVhRateLimits.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n35 - } - if len(m.HashPolicy) > 0 { - for _, msg := range m.HashPolicy { - dAtA[i] = 0x7a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Cors != nil { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Cors.Size())) - n36, err := m.Cors.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n36 - } - if m.ClusterNotFoundResponseCode != 0 { - dAtA[i] = 0xa0 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.ClusterNotFoundResponseCode)) - } - if m.MaxGrpcTimeout != nil { - dAtA[i] = 0xba - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MaxGrpcTimeout))) - n37, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MaxGrpcTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n37 - } - if m.IdleTimeout != nil { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout))) - n38, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.IdleTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n38 - } - if len(m.UpgradeConfigs) > 0 { - for _, msg := range m.UpgradeConfigs { - dAtA[i] = 0xca - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.InternalRedirectAction != 0 { - dAtA[i] = 0xd0 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.InternalRedirectAction)) - } - if m.HedgePolicy != nil { - dAtA[i] = 0xda - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.HedgePolicy.Size())) - n39, err := m.HedgePolicy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n39 - } - if m.GrpcTimeoutOffset != nil { - dAtA[i] = 0xe2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.GrpcTimeoutOffset))) - n40, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.GrpcTimeoutOffset, dAtA[i:]) - if err != nil { - return 0, err - } - i += n40 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteAction_Cluster) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Cluster))) - i += copy(dAtA[i:], m.Cluster) - return i, nil -} -func (m *RouteAction_ClusterHeader) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.ClusterHeader))) - i += copy(dAtA[i:], m.ClusterHeader) - return i, nil -} -func (m *RouteAction_WeightedClusters) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.WeightedClusters != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.WeightedClusters.Size())) - n41, err := m.WeightedClusters.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n41 - } - return i, nil -} -func (m *RouteAction_HostRewrite) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x32 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.HostRewrite))) - i += copy(dAtA[i:], m.HostRewrite) - return i, nil -} -func (m *RouteAction_AutoHostRewrite) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.AutoHostRewrite != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.AutoHostRewrite.Size())) - n42, err := m.AutoHostRewrite.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n42 - } - return i, nil -} -func (m *RouteAction_RequestMirrorPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction_RequestMirrorPolicy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Cluster) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Cluster))) - i += copy(dAtA[i:], m.Cluster) - } - if len(m.RuntimeKey) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.RuntimeKey))) - i += copy(dAtA[i:], m.RuntimeKey) - } - if m.RuntimeFraction != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RuntimeFraction.Size())) - n43, err := m.RuntimeFraction.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n43 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteAction_HashPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction_HashPolicy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.PolicySpecifier != nil { - nn44, err := m.PolicySpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn44 - } - if m.Terminal { - dAtA[i] = 0x20 - i++ - if m.Terminal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteAction_HashPolicy_Header_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Header != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Header.Size())) - n45, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n45 - } - return i, nil -} -func (m *RouteAction_HashPolicy_Cookie_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Cookie != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Cookie.Size())) - n46, err := m.Cookie.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n46 - } - return i, nil -} -func (m *RouteAction_HashPolicy_ConnectionProperties_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ConnectionProperties != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.ConnectionProperties.Size())) - n47, err := m.ConnectionProperties.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n47 - } - return i, nil -} -func (m *RouteAction_HashPolicy_Header) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction_HashPolicy_Header) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.HeaderName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.HeaderName))) - i += copy(dAtA[i:], m.HeaderName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteAction_HashPolicy_Cookie) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction_HashPolicy_Cookie) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Ttl != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Ttl))) - n48, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Ttl, dAtA[i:]) - if err != nil { - return 0, err - } - i += n48 - } - if len(m.Path) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteAction_HashPolicy_ConnectionProperties) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction_HashPolicy_ConnectionProperties) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.SourceIp { - dAtA[i] = 0x8 - i++ - if m.SourceIp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RouteAction_UpgradeConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteAction_UpgradeConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.UpgradeType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.UpgradeType))) - i += copy(dAtA[i:], m.UpgradeType) - } - if m.Enabled != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Enabled.Size())) - n49, err := m.Enabled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n49 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RetryPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryPolicy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.RetryOn) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.RetryOn))) - i += copy(dAtA[i:], m.RetryOn) - } - if m.NumRetries != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.NumRetries.Size())) - n50, err := m.NumRetries.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n50 - } - if m.PerTryTimeout != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.PerTryTimeout))) - n51, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.PerTryTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n51 - } - if m.RetryPriority != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RetryPriority.Size())) - n52, err := m.RetryPriority.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n52 - } - if len(m.RetryHostPredicate) > 0 { - for _, msg := range m.RetryHostPredicate { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.HostSelectionRetryMaxAttempts != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.HostSelectionRetryMaxAttempts)) - } - if len(m.RetriableStatusCodes) > 0 { - dAtA54 := make([]byte, len(m.RetriableStatusCodes)*10) - var j53 int - for _, num := range m.RetriableStatusCodes { - for num >= 1<<7 { - dAtA54[j53] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j53++ - } - dAtA54[j53] = uint8(num) - j53++ - } - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(j53)) - i += copy(dAtA[i:], dAtA54[:j53]) - } - if m.RetryBackOff != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RetryBackOff.Size())) - n55, err := m.RetryBackOff.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n55 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RetryPolicy_RetryPriority) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryPolicy_RetryPriority) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn56, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn56 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RetryPolicy_RetryPriority_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Config.Size())) - n57, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n57 - } - return i, nil -} -func (m *RetryPolicy_RetryPriority_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.TypedConfig.Size())) - n58, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n58 - } - return i, nil -} -func (m *RetryPolicy_RetryHostPredicate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryPolicy_RetryHostPredicate) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn59, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn59 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RetryPolicy_RetryHostPredicate_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Config.Size())) - n60, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n60 - } - return i, nil -} -func (m *RetryPolicy_RetryHostPredicate_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.TypedConfig.Size())) - n61, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n61 - } - return i, nil -} -func (m *RetryPolicy_RetryBackOff) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryPolicy_RetryBackOff) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.BaseInterval != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.BaseInterval))) - n62, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.BaseInterval, dAtA[i:]) - if err != nil { - return 0, err - } - i += n62 - } - if m.MaxInterval != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MaxInterval))) - n63, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MaxInterval, dAtA[i:]) - if err != nil { - return 0, err - } - i += n63 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HedgePolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HedgePolicy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.InitialRequests != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.InitialRequests.Size())) - n64, err := m.InitialRequests.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n64 - } - if m.AdditionalRequestChance != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.AdditionalRequestChance.Size())) - n65, err := m.AdditionalRequestChance.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n65 - } - if m.HedgeOnPerTryTimeout { - dAtA[i] = 0x18 - i++ - if m.HedgeOnPerTryTimeout { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RedirectAction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedirectAction) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.HostRedirect) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.HostRedirect))) - i += copy(dAtA[i:], m.HostRedirect) - } - if m.PathRewriteSpecifier != nil { - nn66, err := m.PathRewriteSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn66 - } - if m.ResponseCode != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.ResponseCode)) - } - if m.SchemeRewriteSpecifier != nil { - nn67, err := m.SchemeRewriteSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn67 - } - if m.StripQuery { - dAtA[i] = 0x30 - i++ - if m.StripQuery { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.PortRedirect != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.PortRedirect)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RedirectAction_PathRedirect) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.PathRedirect))) - i += copy(dAtA[i:], m.PathRedirect) - return i, nil -} -func (m *RedirectAction_HttpsRedirect) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x20 - i++ - if m.HttpsRedirect { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *RedirectAction_PrefixRewrite) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.PrefixRewrite))) - i += copy(dAtA[i:], m.PrefixRewrite) - return i, nil -} -func (m *RedirectAction_SchemeRedirect) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x3a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.SchemeRedirect))) - i += copy(dAtA[i:], m.SchemeRedirect) - return i, nil -} -func (m *DirectResponseAction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DirectResponseAction) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Status != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Status)) - } - if m.Body != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Body.Size())) - n68, err := m.Body.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n68 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Decorator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Decorator) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Operation) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Operation))) - i += copy(dAtA[i:], m.Operation) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *VirtualCluster) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VirtualCluster) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Pattern) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Pattern))) - i += copy(dAtA[i:], m.Pattern) - } - if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Method != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Method)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Stage != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Stage.Size())) - n69, err := m.Stage.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n69 - } - if len(m.DisableKey) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.DisableKey))) - i += copy(dAtA[i:], m.DisableKey) - } - if len(m.Actions) > 0 { - for _, msg := range m.Actions { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ActionSpecifier != nil { - nn70, err := m.ActionSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn70 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action_SourceCluster_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.SourceCluster != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.SourceCluster.Size())) - n71, err := m.SourceCluster.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n71 - } - return i, nil -} -func (m *RateLimit_Action_DestinationCluster_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.DestinationCluster != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.DestinationCluster.Size())) - n72, err := m.DestinationCluster.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n72 - } - return i, nil -} -func (m *RateLimit_Action_RequestHeaders_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.RequestHeaders != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RequestHeaders.Size())) - n73, err := m.RequestHeaders.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n73 - } - return i, nil -} -func (m *RateLimit_Action_RemoteAddress_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.RemoteAddress != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RemoteAddress.Size())) - n74, err := m.RemoteAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n74 - } - return i, nil -} -func (m *RateLimit_Action_GenericKey_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GenericKey != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.GenericKey.Size())) - n75, err := m.GenericKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n75 - } - return i, nil -} -func (m *RateLimit_Action_HeaderValueMatch_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.HeaderValueMatch != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.HeaderValueMatch.Size())) - n76, err := m.HeaderValueMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n76 - } - return i, nil -} -func (m *RateLimit_Action_SourceCluster) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action_SourceCluster) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action_DestinationCluster) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action_DestinationCluster) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action_RequestHeaders) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action_RequestHeaders) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.HeaderName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.HeaderName))) - i += copy(dAtA[i:], m.HeaderName) - } - if len(m.DescriptorKey) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.DescriptorKey))) - i += copy(dAtA[i:], m.DescriptorKey) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action_RemoteAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action_RemoteAddress) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action_GenericKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action_GenericKey) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DescriptorValue) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.DescriptorValue))) - i += copy(dAtA[i:], m.DescriptorValue) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RateLimit_Action_HeaderValueMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimit_Action_HeaderValueMatch) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DescriptorValue) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.DescriptorValue))) - i += copy(dAtA[i:], m.DescriptorValue) - } - if m.ExpectMatch != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.ExpectMatch.Size())) - n77, err := m.ExpectMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n77 - } - if len(m.Headers) > 0 { - for _, msg := range m.Headers { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HeaderMatcher) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HeaderMatcher) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.HeaderMatchSpecifier != nil { - nn78, err := m.HeaderMatchSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn78 - } - if m.InvertMatch { - dAtA[i] = 0x40 - i++ - if m.InvertMatch { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HeaderMatcher_ExactMatch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.ExactMatch))) - i += copy(dAtA[i:], m.ExactMatch) - return i, nil -} -func (m *HeaderMatcher_RegexMatch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x2a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.RegexMatch))) - i += copy(dAtA[i:], m.RegexMatch) - return i, nil -} -func (m *HeaderMatcher_RangeMatch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.RangeMatch != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.RangeMatch.Size())) - n79, err := m.RangeMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n79 - } - return i, nil -} -func (m *HeaderMatcher_PresentMatch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x38 - i++ - if m.PresentMatch { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} -func (m *HeaderMatcher_PrefixMatch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x4a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.PrefixMatch))) - i += copy(dAtA[i:], m.PrefixMatch) - return i, nil -} -func (m *HeaderMatcher_SuffixMatch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x52 - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.SuffixMatch))) - i += copy(dAtA[i:], m.SuffixMatch) - return i, nil -} -func (m *QueryParameterMatcher) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParameterMatcher) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Value) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintRoute(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if m.Regex != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintRoute(dAtA, i, uint64(m.Regex.Size())) - n80, err := m.Regex.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n80 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintRoute(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *VirtualHost) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.Domains) > 0 { - for _, s := range m.Domains { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.Routes) > 0 { - for _, e := range m.Routes { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.RequireTls != 0 { - n += 1 + sovRoute(uint64(m.RequireTls)) - } - if len(m.VirtualClusters) > 0 { - for _, e := range m.VirtualClusters { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.RateLimits) > 0 { - for _, e := range m.RateLimits { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.RequestHeadersToAdd) > 0 { - for _, e := range m.RequestHeadersToAdd { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.Cors != nil { - l = m.Cors.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, e := range m.ResponseHeadersToAdd { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.PerFilterConfig) > 0 { - for k, v := range m.PerFilterConfig { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovRoute(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovRoute(uint64(len(k))) + l - n += mapEntrySize + 1 + sovRoute(uint64(mapEntrySize)) - } - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.IncludeRequestAttemptCount { - n += 2 - } - if len(m.TypedPerFilterConfig) > 0 { - for k, v := range m.TypedPerFilterConfig { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovRoute(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovRoute(uint64(len(k))) + l - n += mapEntrySize + 1 + sovRoute(uint64(mapEntrySize)) - } - } - if m.RetryPolicy != nil { - l = m.RetryPolicy.Size() - n += 2 + l + sovRoute(uint64(l)) - } - if m.HedgePolicy != nil { - l = m.HedgePolicy.Size() - n += 2 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Route) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Match.Size() - n += 1 + l + sovRoute(uint64(l)) - if m.Action != nil { - n += m.Action.Size() - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.Decorator != nil { - l = m.Decorator.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.PerFilterConfig) > 0 { - for k, v := range m.PerFilterConfig { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovRoute(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovRoute(uint64(len(k))) + l - n += mapEntrySize + 1 + sovRoute(uint64(mapEntrySize)) - } - } - if len(m.RequestHeadersToAdd) > 0 { - for _, e := range m.RequestHeadersToAdd { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, e := range m.ResponseHeadersToAdd { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.TypedPerFilterConfig) > 0 { - for k, v := range m.TypedPerFilterConfig { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovRoute(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovRoute(uint64(len(k))) + l - n += mapEntrySize + 1 + sovRoute(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Route_Route) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Route != nil { - l = m.Route.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *Route_Redirect) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Redirect != nil { - l = m.Redirect.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *Route_DirectResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DirectResponse != nil { - l = m.DirectResponse.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *WeightedCluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Clusters) > 0 { - for _, e := range m.Clusters { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - l = len(m.RuntimeKeyPrefix) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.TotalWeight != nil { - l = m.TotalWeight.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WeightedCluster_ClusterWeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.Weight != nil { - l = m.Weight.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.MetadataMatch != nil { - l = m.MetadataMatch.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.RequestHeadersToAdd) > 0 { - for _, e := range m.RequestHeadersToAdd { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, e := range m.ResponseHeadersToAdd { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.ResponseHeadersToRemove) > 0 { - for _, s := range m.ResponseHeadersToRemove { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.PerFilterConfig) > 0 { - for k, v := range m.PerFilterConfig { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovRoute(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovRoute(uint64(len(k))) + l - n += mapEntrySize + 1 + sovRoute(uint64(mapEntrySize)) - } - } - if len(m.RequestHeadersToRemove) > 0 { - for _, s := range m.RequestHeadersToRemove { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.TypedPerFilterConfig) > 0 { - for k, v := range m.TypedPerFilterConfig { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovRoute(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovRoute(uint64(len(k))) + l - n += mapEntrySize + 1 + sovRoute(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PathSpecifier != nil { - n += m.PathSpecifier.Size() - } - if m.CaseSensitive != nil { - l = m.CaseSensitive.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.Headers) > 0 { - for _, e := range m.Headers { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if len(m.QueryParameters) > 0 { - for _, e := range m.QueryParameters { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.Grpc != nil { - l = m.Grpc.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.RuntimeFraction != nil { - l = m.RuntimeFraction.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteMatch_Prefix) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RouteMatch_Path) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RouteMatch_Regex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Regex) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RouteMatch_GrpcRouteMatchOptions) 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 *CorsPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AllowOrigin) > 0 { - for _, s := range m.AllowOrigin { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - l = len(m.AllowMethods) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.AllowHeaders) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.ExposeHeaders) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.MaxAge) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.AllowCredentials != nil { - l = m.AllowCredentials.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.EnabledSpecifier != nil { - n += m.EnabledSpecifier.Size() - } - if len(m.AllowOriginRegex) > 0 { - for _, s := range m.AllowOriginRegex { - l = len(s) - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.ShadowEnabled != nil { - l = m.ShadowEnabled.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CorsPolicy_Enabled) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Enabled != nil { - l = m.Enabled.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *CorsPolicy_FilterEnabled) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FilterEnabled != nil { - l = m.FilterEnabled.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RouteAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClusterSpecifier != nil { - n += m.ClusterSpecifier.Size() - } - if m.MetadataMatch != nil { - l = m.MetadataMatch.Size() - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.PrefixRewrite) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.HostRewriteSpecifier != nil { - n += m.HostRewriteSpecifier.Size() - } - if m.Timeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout) - n += 1 + l + sovRoute(uint64(l)) - } - if m.RetryPolicy != nil { - l = m.RetryPolicy.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.RequestMirrorPolicy != nil { - l = m.RequestMirrorPolicy.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.Priority != 0 { - n += 1 + sovRoute(uint64(m.Priority)) - } - if len(m.RateLimits) > 0 { - for _, e := range m.RateLimits { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.IncludeVhRateLimits != nil { - l = m.IncludeVhRateLimits.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.HashPolicy) > 0 { - for _, e := range m.HashPolicy { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.Cors != nil { - l = m.Cors.Size() - n += 2 + l + sovRoute(uint64(l)) - } - if m.ClusterNotFoundResponseCode != 0 { - n += 2 + sovRoute(uint64(m.ClusterNotFoundResponseCode)) - } - if m.MaxGrpcTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MaxGrpcTimeout) - n += 2 + l + sovRoute(uint64(l)) - } - if m.IdleTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout) - n += 2 + l + sovRoute(uint64(l)) - } - if len(m.UpgradeConfigs) > 0 { - for _, e := range m.UpgradeConfigs { - l = e.Size() - n += 2 + l + sovRoute(uint64(l)) - } - } - if m.InternalRedirectAction != 0 { - n += 2 + sovRoute(uint64(m.InternalRedirectAction)) - } - if m.HedgePolicy != nil { - l = m.HedgePolicy.Size() - n += 2 + l + sovRoute(uint64(l)) - } - if m.GrpcTimeoutOffset != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.GrpcTimeoutOffset) - n += 2 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteAction_Cluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cluster) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RouteAction_ClusterHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClusterHeader) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RouteAction_WeightedClusters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.WeightedClusters != nil { - l = m.WeightedClusters.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RouteAction_HostRewrite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostRewrite) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RouteAction_AutoHostRewrite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AutoHostRewrite != nil { - l = m.AutoHostRewrite.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RouteAction_RequestMirrorPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cluster) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.RuntimeKey) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.RuntimeFraction != nil { - l = m.RuntimeFraction.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteAction_HashPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PolicySpecifier != nil { - n += m.PolicySpecifier.Size() - } - if m.Terminal { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteAction_HashPolicy_Header_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RouteAction_HashPolicy_Cookie_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Cookie != nil { - l = m.Cookie.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RouteAction_HashPolicy_ConnectionProperties_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConnectionProperties != nil { - l = m.ConnectionProperties.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RouteAction_HashPolicy_Header) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HeaderName) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteAction_HashPolicy_Cookie) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.Ttl != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Ttl) - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteAction_HashPolicy_ConnectionProperties) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SourceIp { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RouteAction_UpgradeConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UpgradeType) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.Enabled != nil { - l = m.Enabled.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RetryPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RetryOn) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.NumRetries != nil { - l = m.NumRetries.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.PerTryTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.PerTryTimeout) - n += 1 + l + sovRoute(uint64(l)) - } - if m.RetryPriority != nil { - l = m.RetryPriority.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.RetryHostPredicate) > 0 { - for _, e := range m.RetryHostPredicate { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.HostSelectionRetryMaxAttempts != 0 { - n += 1 + sovRoute(uint64(m.HostSelectionRetryMaxAttempts)) - } - if len(m.RetriableStatusCodes) > 0 { - l = 0 - for _, e := range m.RetriableStatusCodes { - l += sovRoute(uint64(e)) - } - n += 1 + sovRoute(uint64(l)) + l - } - if m.RetryBackOff != nil { - l = m.RetryBackOff.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RetryPolicy_RetryPriority) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RetryPolicy_RetryPriority_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RetryPolicy_RetryPriority_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RetryPolicy_RetryHostPredicate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RetryPolicy_RetryHostPredicate_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RetryPolicy_RetryHostPredicate_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RetryPolicy_RetryBackOff) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BaseInterval != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.BaseInterval) - n += 1 + l + sovRoute(uint64(l)) - } - if m.MaxInterval != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MaxInterval) - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HedgePolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InitialRequests != nil { - l = m.InitialRequests.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.AdditionalRequestChance != nil { - l = m.AdditionalRequestChance.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.HedgeOnPerTryTimeout { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedirectAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostRedirect) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.PathRewriteSpecifier != nil { - n += m.PathRewriteSpecifier.Size() - } - if m.ResponseCode != 0 { - n += 1 + sovRoute(uint64(m.ResponseCode)) - } - if m.SchemeRewriteSpecifier != nil { - n += m.SchemeRewriteSpecifier.Size() - } - if m.StripQuery { - n += 2 - } - if m.PortRedirect != 0 { - n += 1 + sovRoute(uint64(m.PortRedirect)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedirectAction_PathRedirect) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PathRedirect) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RedirectAction_HttpsRedirect) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *RedirectAction_PrefixRewrite) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PrefixRewrite) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *RedirectAction_SchemeRedirect) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SchemeRedirect) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *DirectResponseAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != 0 { - n += 1 + sovRoute(uint64(m.Status)) - } - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Decorator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Operation) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *VirtualCluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Pattern) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.Method != 0 { - n += 1 + sovRoute(uint64(m.Method)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RateLimit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Stage != nil { - l = m.Stage.Size() - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.DisableKey) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.Actions) > 0 { - for _, e := range m.Actions { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RateLimit_Action) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionSpecifier != nil { - n += m.ActionSpecifier.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RateLimit_Action_SourceCluster_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SourceCluster != nil { - l = m.SourceCluster.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RateLimit_Action_DestinationCluster_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DestinationCluster != nil { - l = m.DestinationCluster.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RateLimit_Action_RequestHeaders_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestHeaders != nil { - l = m.RequestHeaders.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RateLimit_Action_RemoteAddress_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RemoteAddress != nil { - l = m.RemoteAddress.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RateLimit_Action_GenericKey_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenericKey != nil { - l = m.GenericKey.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RateLimit_Action_HeaderValueMatch_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HeaderValueMatch != nil { - l = m.HeaderValueMatch.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *RateLimit_Action_SourceCluster) 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 *RateLimit_Action_DestinationCluster) 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 *RateLimit_Action_RequestHeaders) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HeaderName) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.DescriptorKey) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RateLimit_Action_RemoteAddress) 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 *RateLimit_Action_GenericKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DescriptorValue) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RateLimit_Action_HeaderValueMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DescriptorValue) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.ExpectMatch != nil { - l = m.ExpectMatch.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if len(m.Headers) > 0 { - for _, e := range m.Headers { - l = e.Size() - n += 1 + l + sovRoute(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HeaderMatcher) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.HeaderMatchSpecifier != nil { - n += m.HeaderMatchSpecifier.Size() - } - if m.InvertMatch { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HeaderMatcher_ExactMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ExactMatch) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *HeaderMatcher_RegexMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RegexMatch) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *HeaderMatcher_RangeMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RangeMatch != nil { - l = m.RangeMatch.Size() - n += 1 + l + sovRoute(uint64(l)) - } - return n -} -func (m *HeaderMatcher_PresentMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *HeaderMatcher_PrefixMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PrefixMatch) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *HeaderMatcher_SuffixMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SuffixMatch) - n += 1 + l + sovRoute(uint64(l)) - return n -} -func (m *QueryParameterMatcher) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - if m.Regex != nil { - l = m.Regex.Size() - n += 1 + l + sovRoute(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRoute(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozRoute(x uint64) (n int) { - return sovRoute(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VirtualHost) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VirtualHost: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VirtualHost: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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 Domains", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Domains = append(m.Domains, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Routes = append(m.Routes, Route{}) - if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequireTls", wireType) - } - m.RequireTls = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequireTls |= VirtualHost_TlsRequirementType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VirtualClusters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VirtualClusters = append(m.VirtualClusters, &VirtualCluster{}) - if err := m.VirtualClusters[len(m.VirtualClusters)-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 RateLimits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RateLimits = append(m.RateLimits, &RateLimit{}) - if err := m.RateLimits[len(m.RateLimits)-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 RequestHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToAdd = append(m.RequestHeadersToAdd, &core.HeaderValueOption{}) - if err := m.RequestHeadersToAdd[len(m.RequestHeadersToAdd)-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 Cors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Cors == nil { - m.Cors = &CorsPolicy{} - } - if err := m.Cors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToAdd = append(m.ResponseHeadersToAdd, &core.HeaderValueOption{}) - if err := m.ResponseHeadersToAdd[len(m.ResponseHeadersToAdd)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToRemove = append(m.ResponseHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerFilterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerFilterConfig == nil { - m.PerFilterConfig = make(map[string]*types.Struct) - } - var mapkey string - var mapvalue *types.Struct - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthRoute - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthRoute - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthRoute - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Struct{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PerFilterConfig[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToRemove = append(m.RequestHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeRequestAttemptCount", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeRequestAttemptCount = bool(v != 0) - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedPerFilterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TypedPerFilterConfig == nil { - m.TypedPerFilterConfig = make(map[string]*types.Any) - } - var mapkey string - var mapvalue *types.Any - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthRoute - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthRoute - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthRoute - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Any{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.TypedPerFilterConfig[mapkey] = mapvalue - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryPolicy == nil { - m.RetryPolicy = &RetryPolicy{} - } - if err := m.RetryPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HedgePolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HedgePolicy == nil { - m.HedgePolicy = &HedgePolicy{} - } - if err := m.HedgePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *Route) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Route: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Route: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Match.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RouteAction{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Route_Route{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redirect", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RedirectAction{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Route_Redirect{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &core.Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Decorator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Decorator == nil { - m.Decorator = &Decorator{} - } - if err := m.Decorator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DirectResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DirectResponseAction{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Route_DirectResponse{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerFilterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerFilterConfig == nil { - m.PerFilterConfig = make(map[string]*types.Struct) - } - var mapkey string - var mapvalue *types.Struct - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthRoute - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthRoute - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthRoute - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Struct{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PerFilterConfig[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToAdd = append(m.RequestHeadersToAdd, &core.HeaderValueOption{}) - if err := m.RequestHeadersToAdd[len(m.RequestHeadersToAdd)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToAdd = append(m.ResponseHeadersToAdd, &core.HeaderValueOption{}) - if err := m.ResponseHeadersToAdd[len(m.ResponseHeadersToAdd)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToRemove = append(m.ResponseHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToRemove = append(m.RequestHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedPerFilterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TypedPerFilterConfig == nil { - m.TypedPerFilterConfig = make(map[string]*types.Any) - } - var mapkey string - var mapvalue *types.Any - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthRoute - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthRoute - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthRoute - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Any{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.TypedPerFilterConfig[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *WeightedCluster) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WeightedCluster: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WeightedCluster: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Clusters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Clusters = append(m.Clusters, &WeightedCluster_ClusterWeight{}) - if err := m.Clusters[len(m.Clusters)-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 RuntimeKeyPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeKeyPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TotalWeight == nil { - m.TotalWeight = &types.UInt32Value{} - } - if err := m.TotalWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *WeightedCluster_ClusterWeight) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterWeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterWeight: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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 Weight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Weight == nil { - m.Weight = &types.UInt32Value{} - } - if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetadataMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetadataMatch == nil { - m.MetadataMatch = &core.Metadata{} - } - if err := m.MetadataMatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToAdd = append(m.RequestHeadersToAdd, &core.HeaderValueOption{}) - if err := m.RequestHeadersToAdd[len(m.RequestHeadersToAdd)-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 ResponseHeadersToAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToAdd = append(m.ResponseHeadersToAdd, &core.HeaderValueOption{}) - if err := m.ResponseHeadersToAdd[len(m.ResponseHeadersToAdd)-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 ResponseHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeadersToRemove = append(m.ResponseHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerFilterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerFilterConfig == nil { - m.PerFilterConfig = make(map[string]*types.Struct) - } - var mapkey string - var mapvalue *types.Struct - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthRoute - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthRoute - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthRoute - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Struct{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PerFilterConfig[mapkey] = mapvalue - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersToRemove", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersToRemove = append(m.RequestHeadersToRemove, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedPerFilterConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TypedPerFilterConfig == nil { - m.TypedPerFilterConfig = make(map[string]*types.Any) - } - var mapkey string - var mapvalue *types.Any - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthRoute - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthRoute - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthRoute - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &types.Any{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.TypedPerFilterConfig[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PathSpecifier = &RouteMatch_Prefix{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PathSpecifier = &RouteMatch_Path{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PathSpecifier = &RouteMatch_Regex{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CaseSensitive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CaseSensitive == nil { - m.CaseSensitive = &types.BoolValue{} - } - if err := m.CaseSensitive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Headers = append(m.Headers, &HeaderMatcher{}) - if err := m.Headers[len(m.Headers)-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 QueryParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryParameters = append(m.QueryParameters, &QueryParameterMatcher{}) - if err := m.QueryParameters[len(m.QueryParameters)-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 Grpc", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Grpc == nil { - m.Grpc = &RouteMatch_GrpcRouteMatchOptions{} - } - if err := m.Grpc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeFraction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RuntimeFraction == nil { - m.RuntimeFraction = &core.RuntimeFractionalPercent{} - } - if err := m.RuntimeFraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteMatch_GrpcRouteMatchOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GrpcRouteMatchOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GrpcRouteMatchOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *CorsPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CorsPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CorsPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowOrigin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowOrigin = append(m.AllowOrigin, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowMethods", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowMethods = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHeaders", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowHeaders = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExposeHeaders", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExposeHeaders = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAge", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxAge = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowCredentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AllowCredentials == nil { - m.AllowCredentials = &types.BoolValue{} - } - if err := m.AllowCredentials.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.BoolValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.EnabledSpecifier = &CorsPolicy_Enabled{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowOriginRegex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowOriginRegex = append(m.AllowOriginRegex, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterEnabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &core.RuntimeFractionalPercent{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.EnabledSpecifier = &CorsPolicy_FilterEnabled{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShadowEnabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ShadowEnabled == nil { - m.ShadowEnabled = &core.RuntimeFractionalPercent{} - } - if err := m.ShadowEnabled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterSpecifier = &RouteAction_Cluster{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterHeader", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterSpecifier = &RouteAction_ClusterHeader{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WeightedClusters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WeightedCluster{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ClusterSpecifier = &RouteAction_WeightedClusters{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetadataMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetadataMatch == nil { - m.MetadataMatch = &core.Metadata{} - } - if err := m.MetadataMatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrefixRewrite", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrefixRewrite = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostRewrite", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostRewriteSpecifier = &RouteAction_HostRewrite{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AutoHostRewrite", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.BoolValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HostRewriteSpecifier = &RouteAction_AutoHostRewrite{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timeout == nil { - m.Timeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Timeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryPolicy == nil { - m.RetryPolicy = &RetryPolicy{} - } - if err := m.RetryPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestMirrorPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestMirrorPolicy == nil { - m.RequestMirrorPolicy = &RouteAction_RequestMirrorPolicy{} - } - if err := m.RequestMirrorPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= core.RoutingPriority(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateLimits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RateLimits = append(m.RateLimits, &RateLimit{}) - if err := m.RateLimits[len(m.RateLimits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeVhRateLimits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IncludeVhRateLimits == nil { - m.IncludeVhRateLimits = &types.BoolValue{} - } - if err := m.IncludeVhRateLimits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HashPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HashPolicy = append(m.HashPolicy, &RouteAction_HashPolicy{}) - if err := m.HashPolicy[len(m.HashPolicy)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Cors == nil { - m.Cors = &CorsPolicy{} - } - if err := m.Cors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterNotFoundResponseCode", wireType) - } - m.ClusterNotFoundResponseCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClusterNotFoundResponseCode |= RouteAction_ClusterNotFoundResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxGrpcTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxGrpcTimeout == nil { - m.MaxGrpcTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.MaxGrpcTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdleTimeout == nil { - m.IdleTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.IdleTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradeConfigs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UpgradeConfigs = append(m.UpgradeConfigs, &RouteAction_UpgradeConfig{}) - if err := m.UpgradeConfigs[len(m.UpgradeConfigs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InternalRedirectAction", wireType) - } - m.InternalRedirectAction = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InternalRedirectAction |= RouteAction_InternalRedirectAction(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HedgePolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HedgePolicy == nil { - m.HedgePolicy = &HedgePolicy{} - } - if err := m.HedgePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcTimeoutOffset", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GrpcTimeoutOffset == nil { - m.GrpcTimeoutOffset = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.GrpcTimeoutOffset, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction_RequestMirrorPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestMirrorPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestMirrorPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cluster = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeFraction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RuntimeFraction == nil { - m.RuntimeFraction = &core.RuntimeFractionalPercent{} - } - if err := m.RuntimeFraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction_HashPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HashPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashPolicy: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RouteAction_HashPolicy_Header{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.PolicySpecifier = &RouteAction_HashPolicy_Header_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RouteAction_HashPolicy_Cookie{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.PolicySpecifier = &RouteAction_HashPolicy_Cookie_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProperties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RouteAction_HashPolicy_ConnectionProperties{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.PolicySpecifier = &RouteAction_HashPolicy_ConnectionProperties_{v} - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Terminal = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction_HashPolicy_Header) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Header: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeaderName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeaderName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction_HashPolicy_Cookie) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Cookie: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Cookie: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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 Ttl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ttl == nil { - m.Ttl = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Ttl, 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) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction_HashPolicy_ConnectionProperties) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConnectionProperties: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConnectionProperties: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceIp", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SourceIp = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RouteAction_UpgradeConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpgradeConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpgradeConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradeType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UpgradeType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Enabled == nil { - m.Enabled = &types.BoolValue{} - } - if err := m.Enabled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RetryPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryOn", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetryOn = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NumRetries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NumRetries == nil { - m.NumRetries = &types.UInt32Value{} - } - if err := m.NumRetries.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerTryTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PerTryTimeout == nil { - m.PerTryTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.PerTryTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryPriority", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryPriority == nil { - m.RetryPriority = &RetryPolicy_RetryPriority{} - } - if err := m.RetryPriority.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryHostPredicate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetryHostPredicate = append(m.RetryHostPredicate, &RetryPolicy_RetryHostPredicate{}) - if err := m.RetryHostPredicate[len(m.RetryHostPredicate)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostSelectionRetryMaxAttempts", wireType) - } - m.HostSelectionRetryMaxAttempts = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HostSelectionRetryMaxAttempts |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RetriableStatusCodes = append(m.RetriableStatusCodes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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.RetriableStatusCodes) == 0 { - m.RetriableStatusCodes = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RetriableStatusCodes = append(m.RetriableStatusCodes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RetriableStatusCodes", wireType) - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryBackOff", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryBackOff == nil { - m.RetryBackOff = &RetryPolicy_RetryBackOff{} - } - if err := m.RetryBackOff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RetryPolicy_RetryPriority) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryPriority: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryPriority: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &RetryPolicy_RetryPriority_Config{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &RetryPolicy_RetryPriority_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RetryPolicy_RetryHostPredicate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryHostPredicate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryHostPredicate: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &RetryPolicy_RetryHostPredicate_Config{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &RetryPolicy_RetryHostPredicate_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RetryPolicy_RetryBackOff) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryBackOff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryBackOff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseInterval == nil { - m.BaseInterval = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.BaseInterval, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxInterval == nil { - m.MaxInterval = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.MaxInterval, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *HedgePolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HedgePolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HedgePolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialRequests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InitialRequests == nil { - m.InitialRequests = &types.UInt32Value{} - } - if err := m.InitialRequests.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalRequestChance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AdditionalRequestChance == nil { - m.AdditionalRequestChance = &_type.FractionalPercent{} - } - if err := m.AdditionalRequestChance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HedgeOnPerTryTimeout", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HedgeOnPerTryTimeout = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RedirectAction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedirectAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedirectAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostRedirect", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostRedirect = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PathRedirect", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PathRewriteSpecifier = &RedirectAction_PathRedirect{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseCode", wireType) - } - m.ResponseCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ResponseCode |= RedirectAction_RedirectResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpsRedirect", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.SchemeRewriteSpecifier = &RedirectAction_HttpsRedirect{b} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrefixRewrite", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PathRewriteSpecifier = &RedirectAction_PrefixRewrite{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StripQuery", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StripQuery = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemeRedirect", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemeRewriteSpecifier = &RedirectAction_SchemeRedirect{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PortRedirect", wireType) - } - m.PortRedirect = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PortRedirect |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *DirectResponseAction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DirectResponseAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DirectResponseAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &core.DataSource{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *Decorator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Decorator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Decorator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *VirtualCluster) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VirtualCluster: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VirtualCluster: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pattern", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) - } - m.Method = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Method |= core.RequestMethod(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RateLimit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RateLimit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Stage == nil { - m.Stage = &types.UInt32Value{} - } - if err := m.Stage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisableKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisableKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Actions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Actions = append(m.Actions, &RateLimit_Action{}) - if err := m.Actions[len(m.Actions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Action: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Action: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceCluster", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimit_Action_SourceCluster{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionSpecifier = &RateLimit_Action_SourceCluster_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationCluster", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimit_Action_DestinationCluster{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionSpecifier = &RateLimit_Action_DestinationCluster_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeaders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimit_Action_RequestHeaders{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionSpecifier = &RateLimit_Action_RequestHeaders_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemoteAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimit_Action_RemoteAddress{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionSpecifier = &RateLimit_Action_RemoteAddress_{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenericKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimit_Action_GenericKey{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionSpecifier = &RateLimit_Action_GenericKey_{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeaderValueMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RateLimit_Action_HeaderValueMatch{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionSpecifier = &RateLimit_Action_HeaderValueMatch_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action_SourceCluster) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SourceCluster: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SourceCluster: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action_DestinationCluster) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DestinationCluster: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DestinationCluster: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action_RequestHeaders) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestHeaders: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeaderName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeaderName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DescriptorKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DescriptorKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action_RemoteAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemoteAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoteAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action_GenericKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenericKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenericKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DescriptorValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DescriptorValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *RateLimit_Action_HeaderValueMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderValueMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderValueMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DescriptorValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DescriptorValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpectMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExpectMatch == nil { - m.ExpectMatch = &types.BoolValue{} - } - if err := m.ExpectMatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Headers = append(m.Headers, &HeaderMatcher{}) - if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *HeaderMatcher) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderMatcher: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderMatcher: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExactMatch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeaderMatchSpecifier = &HeaderMatcher_ExactMatch{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegexMatch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeaderMatchSpecifier = &HeaderMatcher_RegexMatch{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &_type.Int64Range{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HeaderMatchSpecifier = &HeaderMatcher_RangeMatch{v} - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PresentMatch", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.HeaderMatchSpecifier = &HeaderMatcher_PresentMatch{b} - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvertMatch", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InvertMatch = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrefixMatch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeaderMatchSpecifier = &HeaderMatcher_PrefixMatch{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuffixMatch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeaderMatchSpecifier = &HeaderMatcher_SuffixMatch{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 *QueryParameterMatcher) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParameterMatcher: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParameterMatcher: 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 ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - 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 Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Regex == nil { - m.Regex = &types.BoolValue{} - } - if err := m.Regex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRoute - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRoute - } - 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 skipRoute(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRoute - } - 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, ErrIntOverflowRoute - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRoute - } - 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, ErrInvalidLengthRoute - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRoute - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRoute - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRoute(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRoute - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthRoute = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRoute = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go index b9a089f180..4ce6c546bf 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/api/v2/route/route.proto -package route +package envoy_api_v2_route import ( "bytes" @@ -15,9 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -32,3931 +30,8 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} - - _ = core.RoutingPriority(0) - - _ = core.RequestMethod(0) + _ = ptypes.DynamicAny{} ) -// Validate checks the field values on VirtualHost with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *VirtualHost) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return VirtualHostValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - if len(m.GetDomains()) < 1 { - return VirtualHostValidationError{ - field: "Domains", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetRoutes() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(&tmp).(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, - } - } - } - } - - } - - // no validation rules for RequireTls - - for idx, item := range m.GetVirtualClusters() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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 - - { - tmp := item - - if v, ok := interface{}(tmp).(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 { - return VirtualHostValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - return VirtualHostValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetCors() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for PerFilterConfig - - // no validation rules for TypedPerFilterConfig - - // no validation rules for IncludeRequestAttemptCount - - { - tmp := m.GetRetryPolicy() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetHedgePolicy() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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{} - -// Validate checks the field values on Route with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Route) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetMatch() - - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMetadata() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetDecorator() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for PerFilterConfig - - // no validation rules for TypedPerFilterConfig - - if len(m.GetRequestHeadersToAdd()) > 1000 { - return RouteValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - return RouteValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - switch m.Action.(type) { - - case *Route_Route: - - { - tmp := m.GetRoute() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *Route_Redirect: - - { - tmp := m.GetRedirect() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *Route_DirectResponse: - - { - tmp := m.GetDirectResponse() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - default: - return RouteValidationError{ - field: "Action", - reason: "value is required", - } - - } - - return nil -} - -// 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{} - -// Validate checks the field values on WeightedCluster with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *WeightedCluster) Validate() error { - if m == nil { - return nil - } - - if len(m.GetClusters()) < 1 { - return WeightedClusterValidationError{ - field: "Clusters", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetClusters() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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 wrapper := m.GetTotalWeight(); wrapper != nil { - - if wrapper.GetValue() < 1 { - return WeightedClusterValidationError{ - field: "TotalWeight", - reason: "value must be greater than or equal to 1", - } - } - - } - - // no validation rules for RuntimeKeyPrefix - - return nil -} - -// 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{} - -// Validate checks the field values on RouteMatch with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *RouteMatch) Validate() error { - if m == nil { - return nil - } - - { - tmp := m.GetCaseSensitive() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetRuntimeFraction() - - if v, ok := interface{}(tmp).(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 - - { - tmp := item - - if v, ok := interface{}(tmp).(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 - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetGrpc() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - switch m.PathSpecifier.(type) { - - case *RouteMatch_Prefix: - // no validation rules for Prefix - - case *RouteMatch_Path: - // no validation rules for Path - - case *RouteMatch_Regex: - - if len(m.GetRegex()) > 1024 { - return RouteMatchValidationError{ - field: "Regex", - reason: "value length must be at most 1024 bytes", - } - } - - default: - return RouteMatchValidationError{ - field: "PathSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// 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{} - -// Validate checks the field values on CorsPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *CorsPolicy) Validate() error { - if m == nil { - return nil - } - - for idx, item := range m.GetAllowOriginRegex() { - _, _ = idx, item - - if len(item) > 1024 { - return CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginRegex[%v]", idx), - reason: "value length must be at most 1024 bytes", - } - } - - } - - // no validation rules for AllowMethods - - // no validation rules for AllowHeaders - - // no validation rules for ExposeHeaders - - // no validation rules for MaxAge - - { - tmp := m.GetAllowCredentials() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetShadowEnabled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - switch m.EnabledSpecifier.(type) { - - case *CorsPolicy_Enabled: - - { - tmp := m.GetEnabled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *CorsPolicy_FilterEnabled: - - { - tmp := m.GetFilterEnabled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// 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, an error -// is returned. -func (m *RouteAction) Validate() error { - if m == nil { - return nil - } - - if _, ok := RouteAction_ClusterNotFoundResponseCode_name[int32(m.GetClusterNotFoundResponseCode())]; !ok { - return RouteActionValidationError{ - field: "ClusterNotFoundResponseCode", - reason: "value must be one of the defined enum values", - } - } - - { - tmp := m.GetMetadataMatch() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for PrefixRewrite - - { - tmp := m.GetTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetIdleTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetRetryPolicy() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetRequestMirrorPolicy() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RequestMirrorPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - // no validation rules for Priority - - for idx, item := range m.GetRateLimits() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetIncludeVhRateLimits() - - if v, ok := interface{}(tmp).(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 - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - { - tmp := m.GetCors() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMaxGrpcTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetGrpcTimeoutOffset() - - if v, ok := interface{}(tmp).(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 - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - // no validation rules for InternalRedirectAction - - { - tmp := m.GetHedgePolicy() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - switch m.ClusterSpecifier.(type) { - - case *RouteAction_Cluster: - - if len(m.GetCluster()) < 1 { - return RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 bytes", - } - } - - case *RouteAction_ClusterHeader: - - if len(m.GetClusterHeader()) < 1 { - return RouteActionValidationError{ - field: "ClusterHeader", - reason: "value length must be at least 1 bytes", - } - } - - case *RouteAction_WeightedClusters: - - { - tmp := m.GetWeightedClusters() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - default: - return RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "value is required", - } - - } - - switch m.HostRewriteSpecifier.(type) { - - case *RouteAction_HostRewrite: - // no validation rules for HostRewrite - - case *RouteAction_AutoHostRewrite: - - { - tmp := m.GetAutoHostRewrite() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// 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{} - -// Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *RetryPolicy) Validate() error { - if m == nil { - return nil - } - - // no validation rules for RetryOn - - { - tmp := m.GetNumRetries() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetPerTryTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetRetryPriority() - - if v, ok := interface{}(tmp).(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 - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - // no validation rules for HostSelectionRetryMaxAttempts - - { - tmp := m.GetRetryBackOff() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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, an error -// is returned. -func (m *HedgePolicy) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetInitialRequests(); wrapper != nil { - - if wrapper.GetValue() < 1 { - return HedgePolicyValidationError{ - field: "InitialRequests", - reason: "value must be greater than or equal to 1", - } - } - - } - - { - tmp := m.GetAdditionalRequestChance() - - if v, ok := interface{}(tmp).(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 - - return nil -} - -// 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, an error -// is returned. -func (m *RedirectAction) Validate() error { - if m == nil { - return nil - } - - // no validation rules for HostRedirect - - // no validation rules for PortRedirect - - if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { - return RedirectActionValidationError{ - field: "ResponseCode", - reason: "value must be one of the defined enum values", - } - } - - // no validation rules for StripQuery - - switch m.SchemeRewriteSpecifier.(type) { - - case *RedirectAction_HttpsRedirect: - // no validation rules for HttpsRedirect - - case *RedirectAction_SchemeRedirect: - // no validation rules for SchemeRedirect - - } - - switch m.PathRewriteSpecifier.(type) { - - case *RedirectAction_PathRedirect: - // no validation rules for PathRedirect - - case *RedirectAction_PrefixRewrite: - // no validation rules for PrefixRewrite - - } - - return nil -} - -// 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{} - -// Validate checks the field values on DirectResponseAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *DirectResponseAction) Validate() error { - if m == nil { - return nil - } - - if val := m.GetStatus(); val < 100 || val >= 600 { - return DirectResponseActionValidationError{ - field: "Status", - reason: "value must be inside range [100, 600)", - } - } - - { - tmp := m.GetBody() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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 Decorator with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Decorator) Validate() error { - if m == nil { - return nil - } - - if len(m.GetOperation()) < 1 { - return DecoratorValidationError{ - field: "Operation", - reason: "value length must be at least 1 bytes", - } - } - - return nil -} - -// 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 VirtualCluster with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *VirtualCluster) Validate() error { - if m == nil { - return nil - } - - if l := len(m.GetPattern()); l < 1 || l > 1024 { - return VirtualClusterValidationError{ - field: "Pattern", - reason: "value length must be between 1 and 1024 bytes, inclusive", - } - } - - if len(m.GetName()) < 1 { - return VirtualClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - // no validation rules for Method - - return nil -} - -// 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, an error is returned. -func (m *RateLimit) Validate() error { - if m == nil { - return nil - } - - if wrapper := m.GetStage(); wrapper != nil { - - if wrapper.GetValue() > 10 { - return RateLimitValidationError{ - field: "Stage", - reason: "value must be less than or equal to 10", - } - } - - } - - // no validation rules for DisableKey - - if len(m.GetActions()) < 1 { - return RateLimitValidationError{ - field: "Actions", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetActions() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - return nil -} - -// 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, an error -// is returned. -func (m *HeaderMatcher) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return HeaderMatcherValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - // no validation rules for InvertMatch - - switch m.HeaderMatchSpecifier.(type) { - - case *HeaderMatcher_ExactMatch: - // no validation rules for ExactMatch - - case *HeaderMatcher_RegexMatch: - - if len(m.GetRegexMatch()) > 1024 { - return HeaderMatcherValidationError{ - field: "RegexMatch", - reason: "value length must be at most 1024 bytes", - } - } - - case *HeaderMatcher_RangeMatch: - - { - tmp := m.GetRangeMatch() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *HeaderMatcher_PresentMatch: - // no validation rules for PresentMatch - - case *HeaderMatcher_PrefixMatch: - - if len(m.GetPrefixMatch()) < 1 { - return HeaderMatcherValidationError{ - field: "PrefixMatch", - reason: "value length must be at least 1 bytes", - } - } - - case *HeaderMatcher_SuffixMatch: - - if len(m.GetSuffixMatch()) < 1 { - return HeaderMatcherValidationError{ - field: "SuffixMatch", - reason: "value length must be at least 1 bytes", - } - } - - } - - return nil -} - -// 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{} - -// Validate checks the field values on QueryParameterMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *QueryParameterMatcher) Validate() error { - if m == nil { - return nil - } - - if l := len(m.GetName()); l < 1 || l > 1024 { - return QueryParameterMatcherValidationError{ - field: "Name", - reason: "value length must be between 1 and 1024 bytes, inclusive", - } - } - - // no validation rules for Value - - { - tmp := m.GetRegex() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return QueryParameterMatcherValidationError{ - field: "Regex", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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 WeightedCluster_ClusterWeight with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *WeightedCluster_ClusterWeight) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return WeightedCluster_ClusterWeightValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - { - tmp := m.GetWeight() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - { - tmp := m.GetMetadataMatch() - - if v, ok := interface{}(tmp).(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 { - return WeightedCluster_ClusterWeightValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - return WeightedCluster_ClusterWeightValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - // no validation rules for PerFilterConfig - - // no validation rules for TypedPerFilterConfig - - return nil -} - -// 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{} - -// Validate checks the field values on RouteMatch_GrpcRouteMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RouteMatch_GrpcRouteMatchOptions) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// 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 RouteAction_RequestMirrorPolicy with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteAction_RequestMirrorPolicy) Validate() error { - if m == nil { - return nil - } - - if len(m.GetCluster()) < 1 { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "Cluster", - reason: "value length must be at least 1 bytes", - } - } - - // no validation rules for RuntimeKey - - { - tmp := m.GetRuntimeFraction() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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{} - -// Validate checks the field values on RouteAction_HashPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RouteAction_HashPolicy) Validate() error { - if m == nil { - return nil - } - - // no validation rules for Terminal - - switch m.PolicySpecifier.(type) { - - case *RouteAction_HashPolicy_Header_: - - { - tmp := m.GetHeader() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetCookie() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetConnectionProperties() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - default: - return RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "value is required", - } - - } - - return nil -} - -// 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, an error is returned. -func (m *RouteAction_UpgradeConfig) Validate() error { - if m == nil { - return nil - } - - // no validation rules for UpgradeType - - { - tmp := m.GetEnabled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - return nil -} - -// 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{} - -// 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, an error is returned. -func (m *RouteAction_HashPolicy_Header) Validate() error { - if m == nil { - return nil - } - - if len(m.GetHeaderName()) < 1 { - return RouteAction_HashPolicy_HeaderValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 bytes", - } - } - - return nil -} - -// 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{} - -// 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, an error is returned. -func (m *RouteAction_HashPolicy_Cookie) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return RouteAction_HashPolicy_CookieValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - { - tmp := m.GetTtl() - - if v, ok := interface{}(tmp).(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 - - return nil -} - -// 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, an error is returned. -func (m *RouteAction_HashPolicy_ConnectionProperties) Validate() error { - if m == nil { - return nil - } - - // no validation rules for SourceIp - - return nil -} - -// 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 RetryPolicy_RetryPriority with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RetryPolicy_RetryPriority) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return RetryPolicy_RetryPriorityValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - switch m.ConfigType.(type) { - - case *RetryPolicy_RetryPriority_Config: - - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicy_RetryPriorityValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *RetryPolicy_RetryPriority_TypedConfig: - - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// 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, an error is returned. -func (m *RetryPolicy_RetryHostPredicate) Validate() error { - if m == nil { - return nil - } - - if len(m.GetName()) < 1 { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - } - - switch m.ConfigType.(type) { - - case *RetryPolicy_RetryHostPredicate_Config: - - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - case *RetryPolicy_RetryHostPredicate_TypedConfig: - - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - } - - return nil -} - -// 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, an error is returned. -func (m *RetryPolicy_RetryBackOff) Validate() error { - if m == nil { - return nil - } - - if m.GetBaseInterval() == nil { - return RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value is required", - } - } - - if d := m.GetBaseInterval(); d != nil { - dur := *d - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value must be greater than 0s", - } - } - - } - - if d := m.GetMaxInterval(); d != nil { - dur := *d - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - return RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", - } - } - - } - - return nil -} - -// 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 RateLimit_Action with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *RateLimit_Action) Validate() error { - if m == nil { - return nil - } - - switch m.ActionSpecifier.(type) { - - case *RateLimit_Action_SourceCluster_: - - { - tmp := m.GetSourceCluster() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetDestinationCluster() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetRequestHeaders() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetRemoteAddress() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetGenericKey() - - if v, ok := interface{}(tmp).(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_: - - { - tmp := m.GetHeaderValueMatch() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - } - - default: - return RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "value is required", - } - - } - - return nil -} - -// 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_Action_SourceCluster with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RateLimit_Action_SourceCluster) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// 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, an error is returned. -func (m *RateLimit_Action_DestinationCluster) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// 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, an error is returned. -func (m *RateLimit_Action_RequestHeaders) Validate() error { - if m == nil { - return nil - } - - if len(m.GetHeaderName()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 bytes", - } - } - - if len(m.GetDescriptorKey()) < 1 { - return RateLimit_Action_RequestHeadersValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 bytes", - } - } - - return nil -} - -// 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{} - -// 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, an error is returned. -func (m *RateLimit_Action_RemoteAddress) Validate() error { - if m == nil { - return nil - } - - return nil -} - -// 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_GenericKey with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RateLimit_Action_GenericKey) Validate() error { - if m == nil { - return nil - } - - if len(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_GenericKeyValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 bytes", - } - } - - return nil -} - -// 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, an error is returned. -func (m *RateLimit_Action_HeaderValueMatch) Validate() error { - if m == nil { - return nil - } - - if len(m.GetDescriptorValue()) < 1 { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 bytes", - } - } - - { - tmp := m.GetExpectMatch() - - if v, ok := interface{}(tmp).(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 { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: "Headers", - reason: "value must contain at least 1 item(s)", - } - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - { - tmp := item - - if v, ok := interface{}(tmp).(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, - } - } - } - } - - } - - return nil -} - -// 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{} +// define the regex for a UUID once up-front +var _route_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go new file mode 100644 index 0000000000..d430ff969a --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go @@ -0,0 +1,3725 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/route/route_components.proto + +package envoy_api_v2_route + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher" + v2 "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + duration "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type VirtualHost_TlsRequirementType int32 + +const ( + VirtualHost_NONE VirtualHost_TlsRequirementType = 0 + VirtualHost_EXTERNAL_ONLY VirtualHost_TlsRequirementType = 1 + VirtualHost_ALL VirtualHost_TlsRequirementType = 2 +) + +var VirtualHost_TlsRequirementType_name = map[int32]string{ + 0: "NONE", + 1: "EXTERNAL_ONLY", + 2: "ALL", +} + +var VirtualHost_TlsRequirementType_value = map[string]int32{ + "NONE": 0, + "EXTERNAL_ONLY": 1, + "ALL": 2, +} + +func (x VirtualHost_TlsRequirementType) String() string { + return proto.EnumName(VirtualHost_TlsRequirementType_name, int32(x)) +} + +func (VirtualHost_TlsRequirementType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{0, 0} +} + +type RouteAction_ClusterNotFoundResponseCode int32 + +const ( + RouteAction_SERVICE_UNAVAILABLE RouteAction_ClusterNotFoundResponseCode = 0 + RouteAction_NOT_FOUND RouteAction_ClusterNotFoundResponseCode = 1 +) + +var RouteAction_ClusterNotFoundResponseCode_name = map[int32]string{ + 0: "SERVICE_UNAVAILABLE", + 1: "NOT_FOUND", +} + +var RouteAction_ClusterNotFoundResponseCode_value = map[string]int32{ + "SERVICE_UNAVAILABLE": 0, + "NOT_FOUND": 1, +} + +func (x RouteAction_ClusterNotFoundResponseCode) String() string { + return proto.EnumName(RouteAction_ClusterNotFoundResponseCode_name, int32(x)) +} + +func (RouteAction_ClusterNotFoundResponseCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 0} +} + +type RouteAction_InternalRedirectAction int32 + +const ( + RouteAction_PASS_THROUGH_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 0 + RouteAction_HANDLE_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 1 +) + +var RouteAction_InternalRedirectAction_name = map[int32]string{ + 0: "PASS_THROUGH_INTERNAL_REDIRECT", + 1: "HANDLE_INTERNAL_REDIRECT", +} + +var RouteAction_InternalRedirectAction_value = map[string]int32{ + "PASS_THROUGH_INTERNAL_REDIRECT": 0, + "HANDLE_INTERNAL_REDIRECT": 1, +} + +func (x RouteAction_InternalRedirectAction) String() string { + return proto.EnumName(RouteAction_InternalRedirectAction_name, int32(x)) +} + +func (RouteAction_InternalRedirectAction) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1} +} + +type RedirectAction_RedirectResponseCode int32 + +const ( + RedirectAction_MOVED_PERMANENTLY RedirectAction_RedirectResponseCode = 0 + RedirectAction_FOUND RedirectAction_RedirectResponseCode = 1 + RedirectAction_SEE_OTHER RedirectAction_RedirectResponseCode = 2 + RedirectAction_TEMPORARY_REDIRECT RedirectAction_RedirectResponseCode = 3 + RedirectAction_PERMANENT_REDIRECT RedirectAction_RedirectResponseCode = 4 +) + +var RedirectAction_RedirectResponseCode_name = map[int32]string{ + 0: "MOVED_PERMANENTLY", + 1: "FOUND", + 2: "SEE_OTHER", + 3: "TEMPORARY_REDIRECT", + 4: "PERMANENT_REDIRECT", +} + +var RedirectAction_RedirectResponseCode_value = map[string]int32{ + "MOVED_PERMANENTLY": 0, + "FOUND": 1, + "SEE_OTHER": 2, + "TEMPORARY_REDIRECT": 3, + "PERMANENT_REDIRECT": 4, +} + +func (x RedirectAction_RedirectResponseCode) String() string { + return proto.EnumName(RedirectAction_RedirectResponseCode_name, int32(x)) +} + +func (RedirectAction_RedirectResponseCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{9, 0} +} + +type VirtualHost struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` + Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` + RequireTls VirtualHost_TlsRequirementType `protobuf:"varint,4,opt,name=require_tls,json=requireTls,proto3,enum=envoy.api.v2.route.VirtualHost_TlsRequirementType" json:"require_tls,omitempty"` + VirtualClusters []*VirtualCluster `protobuf:"bytes,5,rep,name=virtual_clusters,json=virtualClusters,proto3" json:"virtual_clusters,omitempty"` + RateLimits []*RateLimit `protobuf:"bytes,6,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,7,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToRemove []string `protobuf:"bytes,13,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` + ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` + Cors *CorsPolicy `protobuf:"bytes,8,opt,name=cors,proto3" json:"cors,omitempty"` + PerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,12,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Deprecated: Do not use. + TypedPerFilterConfig map[string]*any.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"` + IncludeRequestAttemptCount bool `protobuf:"varint,14,opt,name=include_request_attempt_count,json=includeRequestAttemptCount,proto3" json:"include_request_attempt_count,omitempty"` + IncludeAttemptCountInResponse bool `protobuf:"varint,19,opt,name=include_attempt_count_in_response,json=includeAttemptCountInResponse,proto3" json:"include_attempt_count_in_response,omitempty"` + RetryPolicy *RetryPolicy `protobuf:"bytes,16,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` + RetryPolicyTypedConfig *any.Any `protobuf:"bytes,20,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` + HedgePolicy *HedgePolicy `protobuf:"bytes,17,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` + PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualHost) Reset() { *m = VirtualHost{} } +func (m *VirtualHost) String() string { return proto.CompactTextString(m) } +func (*VirtualHost) ProtoMessage() {} +func (*VirtualHost) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{0} +} + +func (m *VirtualHost) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VirtualHost.Unmarshal(m, b) +} +func (m *VirtualHost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VirtualHost.Marshal(b, m, deterministic) +} +func (m *VirtualHost) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualHost.Merge(m, src) +} +func (m *VirtualHost) XXX_Size() int { + return xxx_messageInfo_VirtualHost.Size(m) +} +func (m *VirtualHost) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualHost.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualHost proto.InternalMessageInfo + +func (m *VirtualHost) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *VirtualHost) GetDomains() []string { + if m != nil { + return m.Domains + } + return nil +} + +func (m *VirtualHost) GetRoutes() []*Route { + if m != nil { + return m.Routes + } + return nil +} + +func (m *VirtualHost) GetRequireTls() VirtualHost_TlsRequirementType { + if m != nil { + return m.RequireTls + } + return VirtualHost_NONE +} + +func (m *VirtualHost) GetVirtualClusters() []*VirtualCluster { + if m != nil { + return m.VirtualClusters + } + return nil +} + +func (m *VirtualHost) GetRateLimits() []*RateLimit { + if m != nil { + return m.RateLimits + } + return nil +} + +func (m *VirtualHost) GetRequestHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.RequestHeadersToAdd + } + return nil +} + +func (m *VirtualHost) GetRequestHeadersToRemove() []string { + if m != nil { + return m.RequestHeadersToRemove + } + return nil +} + +func (m *VirtualHost) GetResponseHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.ResponseHeadersToAdd + } + return nil +} + +func (m *VirtualHost) GetResponseHeadersToRemove() []string { + if m != nil { + return m.ResponseHeadersToRemove + } + return nil +} + +func (m *VirtualHost) GetCors() *CorsPolicy { + if m != nil { + return m.Cors + } + return nil +} + +// Deprecated: Do not use. +func (m *VirtualHost) GetPerFilterConfig() map[string]*_struct.Struct { + if m != nil { + return m.PerFilterConfig + } + return nil +} + +func (m *VirtualHost) GetTypedPerFilterConfig() map[string]*any.Any { + if m != nil { + return m.TypedPerFilterConfig + } + return nil +} + +func (m *VirtualHost) GetIncludeRequestAttemptCount() bool { + if m != nil { + return m.IncludeRequestAttemptCount + } + return false +} + +func (m *VirtualHost) GetIncludeAttemptCountInResponse() bool { + if m != nil { + return m.IncludeAttemptCountInResponse + } + return false +} + +func (m *VirtualHost) GetRetryPolicy() *RetryPolicy { + if m != nil { + return m.RetryPolicy + } + return nil +} + +func (m *VirtualHost) GetRetryPolicyTypedConfig() *any.Any { + if m != nil { + return m.RetryPolicyTypedConfig + } + return nil +} + +func (m *VirtualHost) GetHedgePolicy() *HedgePolicy { + if m != nil { + return m.HedgePolicy + } + return nil +} + +func (m *VirtualHost) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { + if m != nil { + return m.PerRequestBufferLimitBytes + } + return nil +} + +type FilterAction struct { + Action *any.Any `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FilterAction) Reset() { *m = FilterAction{} } +func (m *FilterAction) String() string { return proto.CompactTextString(m) } +func (*FilterAction) ProtoMessage() {} +func (*FilterAction) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{1} +} + +func (m *FilterAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FilterAction.Unmarshal(m, b) +} +func (m *FilterAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FilterAction.Marshal(b, m, deterministic) +} +func (m *FilterAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilterAction.Merge(m, src) +} +func (m *FilterAction) XXX_Size() int { + return xxx_messageInfo_FilterAction.Size(m) +} +func (m *FilterAction) XXX_DiscardUnknown() { + xxx_messageInfo_FilterAction.DiscardUnknown(m) +} + +var xxx_messageInfo_FilterAction proto.InternalMessageInfo + +func (m *FilterAction) GetAction() *any.Any { + if m != nil { + return m.Action + } + return nil +} + +type Route struct { + Name string `protobuf:"bytes,14,opt,name=name,proto3" json:"name,omitempty"` + Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` + // Types that are valid to be assigned to Action: + // *Route_Route + // *Route_Redirect + // *Route_DirectResponse + // *Route_FilterAction + Action isRoute_Action `protobuf_oneof:"action"` + Metadata *core.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Decorator *Decorator `protobuf:"bytes,5,opt,name=decorator,proto3" json:"decorator,omitempty"` + PerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,8,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Deprecated: Do not use. + TypedPerFilterConfig map[string]*any.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"` + RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,9,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToRemove []string `protobuf:"bytes,12,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` + ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` + Tracing *Tracing `protobuf:"bytes,15,opt,name=tracing,proto3" json:"tracing,omitempty"` + PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Route) Reset() { *m = Route{} } +func (m *Route) String() string { return proto.CompactTextString(m) } +func (*Route) ProtoMessage() {} +func (*Route) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{2} +} + +func (m *Route) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Route.Unmarshal(m, b) +} +func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Route.Marshal(b, m, deterministic) +} +func (m *Route) XXX_Merge(src proto.Message) { + xxx_messageInfo_Route.Merge(m, src) +} +func (m *Route) XXX_Size() int { + return xxx_messageInfo_Route.Size(m) +} +func (m *Route) XXX_DiscardUnknown() { + xxx_messageInfo_Route.DiscardUnknown(m) +} + +var xxx_messageInfo_Route proto.InternalMessageInfo + +func (m *Route) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Route) GetMatch() *RouteMatch { + if m != nil { + return m.Match + } + return nil +} + +type isRoute_Action interface { + isRoute_Action() +} + +type Route_Route struct { + Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3,oneof"` +} + +type Route_Redirect struct { + Redirect *RedirectAction `protobuf:"bytes,3,opt,name=redirect,proto3,oneof"` +} + +type Route_DirectResponse struct { + DirectResponse *DirectResponseAction `protobuf:"bytes,7,opt,name=direct_response,json=directResponse,proto3,oneof"` +} + +type Route_FilterAction struct { + FilterAction *FilterAction `protobuf:"bytes,17,opt,name=filter_action,json=filterAction,proto3,oneof"` +} + +func (*Route_Route) isRoute_Action() {} + +func (*Route_Redirect) isRoute_Action() {} + +func (*Route_DirectResponse) isRoute_Action() {} + +func (*Route_FilterAction) isRoute_Action() {} + +func (m *Route) GetAction() isRoute_Action { + if m != nil { + return m.Action + } + return nil +} + +func (m *Route) GetRoute() *RouteAction { + if x, ok := m.GetAction().(*Route_Route); ok { + return x.Route + } + return nil +} + +func (m *Route) GetRedirect() *RedirectAction { + if x, ok := m.GetAction().(*Route_Redirect); ok { + return x.Redirect + } + return nil +} + +func (m *Route) GetDirectResponse() *DirectResponseAction { + if x, ok := m.GetAction().(*Route_DirectResponse); ok { + return x.DirectResponse + } + return nil +} + +func (m *Route) GetFilterAction() *FilterAction { + if x, ok := m.GetAction().(*Route_FilterAction); ok { + return x.FilterAction + } + return nil +} + +func (m *Route) GetMetadata() *core.Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Route) GetDecorator() *Decorator { + if m != nil { + return m.Decorator + } + return nil +} + +// Deprecated: Do not use. +func (m *Route) GetPerFilterConfig() map[string]*_struct.Struct { + if m != nil { + return m.PerFilterConfig + } + return nil +} + +func (m *Route) GetTypedPerFilterConfig() map[string]*any.Any { + if m != nil { + return m.TypedPerFilterConfig + } + return nil +} + +func (m *Route) GetRequestHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.RequestHeadersToAdd + } + return nil +} + +func (m *Route) GetRequestHeadersToRemove() []string { + if m != nil { + return m.RequestHeadersToRemove + } + return nil +} + +func (m *Route) GetResponseHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.ResponseHeadersToAdd + } + return nil +} + +func (m *Route) GetResponseHeadersToRemove() []string { + if m != nil { + return m.ResponseHeadersToRemove + } + return nil +} + +func (m *Route) GetTracing() *Tracing { + if m != nil { + return m.Tracing + } + return nil +} + +func (m *Route) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { + if m != nil { + return m.PerRequestBufferLimitBytes + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Route) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Route_Route)(nil), + (*Route_Redirect)(nil), + (*Route_DirectResponse)(nil), + (*Route_FilterAction)(nil), + } +} + +type WeightedCluster struct { + Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` + TotalWeight *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` + RuntimeKeyPrefix string `protobuf:"bytes,2,opt,name=runtime_key_prefix,json=runtimeKeyPrefix,proto3" json:"runtime_key_prefix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WeightedCluster) Reset() { *m = WeightedCluster{} } +func (m *WeightedCluster) String() string { return proto.CompactTextString(m) } +func (*WeightedCluster) ProtoMessage() {} +func (*WeightedCluster) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{3} +} + +func (m *WeightedCluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WeightedCluster.Unmarshal(m, b) +} +func (m *WeightedCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WeightedCluster.Marshal(b, m, deterministic) +} +func (m *WeightedCluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_WeightedCluster.Merge(m, src) +} +func (m *WeightedCluster) XXX_Size() int { + return xxx_messageInfo_WeightedCluster.Size(m) +} +func (m *WeightedCluster) XXX_DiscardUnknown() { + xxx_messageInfo_WeightedCluster.DiscardUnknown(m) +} + +var xxx_messageInfo_WeightedCluster proto.InternalMessageInfo + +func (m *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { + if m != nil { + return m.Clusters + } + return nil +} + +func (m *WeightedCluster) GetTotalWeight() *wrappers.UInt32Value { + if m != nil { + return m.TotalWeight + } + return nil +} + +func (m *WeightedCluster) GetRuntimeKeyPrefix() string { + if m != nil { + return m.RuntimeKeyPrefix + } + return "" +} + +type WeightedCluster_ClusterWeight struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Weight *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` + MetadataMatch *core.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + RequestHeadersToRemove []string `protobuf:"bytes,9,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` + ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,5,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + ResponseHeadersToRemove []string `protobuf:"bytes,6,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` + PerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,8,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Deprecated: Do not use. + TypedPerFilterConfig map[string]*any.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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WeightedCluster_ClusterWeight) Reset() { *m = WeightedCluster_ClusterWeight{} } +func (m *WeightedCluster_ClusterWeight) String() string { return proto.CompactTextString(m) } +func (*WeightedCluster_ClusterWeight) ProtoMessage() {} +func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{3, 0} +} + +func (m *WeightedCluster_ClusterWeight) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WeightedCluster_ClusterWeight.Unmarshal(m, b) +} +func (m *WeightedCluster_ClusterWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WeightedCluster_ClusterWeight.Marshal(b, m, deterministic) +} +func (m *WeightedCluster_ClusterWeight) XXX_Merge(src proto.Message) { + xxx_messageInfo_WeightedCluster_ClusterWeight.Merge(m, src) +} +func (m *WeightedCluster_ClusterWeight) XXX_Size() int { + return xxx_messageInfo_WeightedCluster_ClusterWeight.Size(m) +} +func (m *WeightedCluster_ClusterWeight) XXX_DiscardUnknown() { + xxx_messageInfo_WeightedCluster_ClusterWeight.DiscardUnknown(m) +} + +var xxx_messageInfo_WeightedCluster_ClusterWeight proto.InternalMessageInfo + +func (m *WeightedCluster_ClusterWeight) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *WeightedCluster_ClusterWeight) GetWeight() *wrappers.UInt32Value { + if m != nil { + return m.Weight + } + return nil +} + +func (m *WeightedCluster_ClusterWeight) GetMetadataMatch() *core.Metadata { + if m != nil { + return m.MetadataMatch + } + return nil +} + +func (m *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.RequestHeadersToAdd + } + return nil +} + +func (m *WeightedCluster_ClusterWeight) GetRequestHeadersToRemove() []string { + if m != nil { + return m.RequestHeadersToRemove + } + return nil +} + +func (m *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*core.HeaderValueOption { + if m != nil { + return m.ResponseHeadersToAdd + } + return nil +} + +func (m *WeightedCluster_ClusterWeight) GetResponseHeadersToRemove() []string { + if m != nil { + return m.ResponseHeadersToRemove + } + return nil +} + +// Deprecated: Do not use. +func (m *WeightedCluster_ClusterWeight) GetPerFilterConfig() map[string]*_struct.Struct { + if m != nil { + return m.PerFilterConfig + } + return nil +} + +func (m *WeightedCluster_ClusterWeight) GetTypedPerFilterConfig() map[string]*any.Any { + if m != nil { + return m.TypedPerFilterConfig + } + return nil +} + +type RouteMatch struct { + // Types that are valid to be assigned to PathSpecifier: + // *RouteMatch_Prefix + // *RouteMatch_Path + // *RouteMatch_Regex + // *RouteMatch_SafeRegex + PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` + CaseSensitive *wrappers.BoolValue `protobuf:"bytes,4,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` + RuntimeFraction *core.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` + Headers []*HeaderMatcher `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"` + QueryParameters []*QueryParameterMatcher `protobuf:"bytes,7,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"` + Grpc *RouteMatch_GrpcRouteMatchOptions `protobuf:"bytes,8,opt,name=grpc,proto3" json:"grpc,omitempty"` + TlsContext *RouteMatch_TlsContextMatchOptions `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteMatch) Reset() { *m = RouteMatch{} } +func (m *RouteMatch) String() string { return proto.CompactTextString(m) } +func (*RouteMatch) ProtoMessage() {} +func (*RouteMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{4} +} + +func (m *RouteMatch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteMatch.Unmarshal(m, b) +} +func (m *RouteMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteMatch.Marshal(b, m, deterministic) +} +func (m *RouteMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteMatch.Merge(m, src) +} +func (m *RouteMatch) XXX_Size() int { + return xxx_messageInfo_RouteMatch.Size(m) +} +func (m *RouteMatch) XXX_DiscardUnknown() { + xxx_messageInfo_RouteMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteMatch proto.InternalMessageInfo + +type isRouteMatch_PathSpecifier interface { + isRouteMatch_PathSpecifier() +} + +type RouteMatch_Prefix struct { + Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"` +} + +type RouteMatch_Path struct { + Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"` +} + +type RouteMatch_Regex struct { + Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` +} + +type RouteMatch_SafeRegex struct { + SafeRegex *matcher.RegexMatcher `protobuf:"bytes,10,opt,name=safe_regex,json=safeRegex,proto3,oneof"` +} + +func (*RouteMatch_Prefix) isRouteMatch_PathSpecifier() {} + +func (*RouteMatch_Path) isRouteMatch_PathSpecifier() {} + +func (*RouteMatch_Regex) isRouteMatch_PathSpecifier() {} + +func (*RouteMatch_SafeRegex) isRouteMatch_PathSpecifier() {} + +func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier { + if m != nil { + return m.PathSpecifier + } + return nil +} + +func (m *RouteMatch) GetPrefix() string { + if x, ok := m.GetPathSpecifier().(*RouteMatch_Prefix); ok { + return x.Prefix + } + return "" +} + +func (m *RouteMatch) GetPath() string { + if x, ok := m.GetPathSpecifier().(*RouteMatch_Path); ok { + return x.Path + } + return "" +} + +// Deprecated: Do not use. +func (m *RouteMatch) GetRegex() string { + if x, ok := m.GetPathSpecifier().(*RouteMatch_Regex); ok { + return x.Regex + } + return "" +} + +func (m *RouteMatch) GetSafeRegex() *matcher.RegexMatcher { + if x, ok := m.GetPathSpecifier().(*RouteMatch_SafeRegex); ok { + return x.SafeRegex + } + return nil +} + +func (m *RouteMatch) GetCaseSensitive() *wrappers.BoolValue { + if m != nil { + return m.CaseSensitive + } + return nil +} + +func (m *RouteMatch) GetRuntimeFraction() *core.RuntimeFractionalPercent { + if m != nil { + return m.RuntimeFraction + } + return nil +} + +func (m *RouteMatch) GetHeaders() []*HeaderMatcher { + if m != nil { + return m.Headers + } + return nil +} + +func (m *RouteMatch) GetQueryParameters() []*QueryParameterMatcher { + if m != nil { + return m.QueryParameters + } + return nil +} + +func (m *RouteMatch) GetGrpc() *RouteMatch_GrpcRouteMatchOptions { + if m != nil { + return m.Grpc + } + return nil +} + +func (m *RouteMatch) GetTlsContext() *RouteMatch_TlsContextMatchOptions { + if m != nil { + return m.TlsContext + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RouteMatch) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RouteMatch_Prefix)(nil), + (*RouteMatch_Path)(nil), + (*RouteMatch_Regex)(nil), + (*RouteMatch_SafeRegex)(nil), + } +} + +type RouteMatch_GrpcRouteMatchOptions struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteMatch_GrpcRouteMatchOptions) Reset() { *m = RouteMatch_GrpcRouteMatchOptions{} } +func (m *RouteMatch_GrpcRouteMatchOptions) String() string { return proto.CompactTextString(m) } +func (*RouteMatch_GrpcRouteMatchOptions) ProtoMessage() {} +func (*RouteMatch_GrpcRouteMatchOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{4, 0} +} + +func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.Unmarshal(m, b) +} +func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.Marshal(b, m, deterministic) +} +func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.Merge(m, src) +} +func (m *RouteMatch_GrpcRouteMatchOptions) XXX_Size() int { + return xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.Size(m) +} +func (m *RouteMatch_GrpcRouteMatchOptions) XXX_DiscardUnknown() { + xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteMatch_GrpcRouteMatchOptions proto.InternalMessageInfo + +type RouteMatch_TlsContextMatchOptions struct { + Presented *wrappers.BoolValue `protobuf:"bytes,1,opt,name=presented,proto3" json:"presented,omitempty"` + Validated *wrappers.BoolValue `protobuf:"bytes,2,opt,name=validated,proto3" json:"validated,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteMatch_TlsContextMatchOptions) Reset() { *m = RouteMatch_TlsContextMatchOptions{} } +func (m *RouteMatch_TlsContextMatchOptions) String() string { return proto.CompactTextString(m) } +func (*RouteMatch_TlsContextMatchOptions) ProtoMessage() {} +func (*RouteMatch_TlsContextMatchOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{4, 1} +} + +func (m *RouteMatch_TlsContextMatchOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteMatch_TlsContextMatchOptions.Unmarshal(m, b) +} +func (m *RouteMatch_TlsContextMatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteMatch_TlsContextMatchOptions.Marshal(b, m, deterministic) +} +func (m *RouteMatch_TlsContextMatchOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteMatch_TlsContextMatchOptions.Merge(m, src) +} +func (m *RouteMatch_TlsContextMatchOptions) XXX_Size() int { + return xxx_messageInfo_RouteMatch_TlsContextMatchOptions.Size(m) +} +func (m *RouteMatch_TlsContextMatchOptions) XXX_DiscardUnknown() { + xxx_messageInfo_RouteMatch_TlsContextMatchOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteMatch_TlsContextMatchOptions proto.InternalMessageInfo + +func (m *RouteMatch_TlsContextMatchOptions) GetPresented() *wrappers.BoolValue { + if m != nil { + return m.Presented + } + return nil +} + +func (m *RouteMatch_TlsContextMatchOptions) GetValidated() *wrappers.BoolValue { + if m != nil { + return m.Validated + } + return nil +} + +type CorsPolicy struct { + AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin,proto3" json:"allow_origin,omitempty"` // Deprecated: Do not use. + AllowOriginRegex []string `protobuf:"bytes,8,rep,name=allow_origin_regex,json=allowOriginRegex,proto3" json:"allow_origin_regex,omitempty"` // Deprecated: Do not use. + AllowOriginStringMatch []*matcher.StringMatcher `protobuf:"bytes,11,rep,name=allow_origin_string_match,json=allowOriginStringMatch,proto3" json:"allow_origin_string_match,omitempty"` + AllowMethods string `protobuf:"bytes,2,opt,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` + AllowHeaders string `protobuf:"bytes,3,opt,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"` + ExposeHeaders string `protobuf:"bytes,4,opt,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"` + MaxAge string `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` + AllowCredentials *wrappers.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` + // Types that are valid to be assigned to EnabledSpecifier: + // *CorsPolicy_Enabled + // *CorsPolicy_FilterEnabled + EnabledSpecifier isCorsPolicy_EnabledSpecifier `protobuf_oneof:"enabled_specifier"` + ShadowEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CorsPolicy) Reset() { *m = CorsPolicy{} } +func (m *CorsPolicy) String() string { return proto.CompactTextString(m) } +func (*CorsPolicy) ProtoMessage() {} +func (*CorsPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{5} +} + +func (m *CorsPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CorsPolicy.Unmarshal(m, b) +} +func (m *CorsPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CorsPolicy.Marshal(b, m, deterministic) +} +func (m *CorsPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_CorsPolicy.Merge(m, src) +} +func (m *CorsPolicy) XXX_Size() int { + return xxx_messageInfo_CorsPolicy.Size(m) +} +func (m *CorsPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_CorsPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_CorsPolicy proto.InternalMessageInfo + +// Deprecated: Do not use. +func (m *CorsPolicy) GetAllowOrigin() []string { + if m != nil { + return m.AllowOrigin + } + return nil +} + +// Deprecated: Do not use. +func (m *CorsPolicy) GetAllowOriginRegex() []string { + if m != nil { + return m.AllowOriginRegex + } + return nil +} + +func (m *CorsPolicy) GetAllowOriginStringMatch() []*matcher.StringMatcher { + if m != nil { + return m.AllowOriginStringMatch + } + return nil +} + +func (m *CorsPolicy) GetAllowMethods() string { + if m != nil { + return m.AllowMethods + } + return "" +} + +func (m *CorsPolicy) GetAllowHeaders() string { + if m != nil { + return m.AllowHeaders + } + return "" +} + +func (m *CorsPolicy) GetExposeHeaders() string { + if m != nil { + return m.ExposeHeaders + } + return "" +} + +func (m *CorsPolicy) GetMaxAge() string { + if m != nil { + return m.MaxAge + } + return "" +} + +func (m *CorsPolicy) GetAllowCredentials() *wrappers.BoolValue { + if m != nil { + return m.AllowCredentials + } + return nil +} + +type isCorsPolicy_EnabledSpecifier interface { + isCorsPolicy_EnabledSpecifier() +} + +type CorsPolicy_Enabled struct { + Enabled *wrappers.BoolValue `protobuf:"bytes,7,opt,name=enabled,proto3,oneof"` +} + +type CorsPolicy_FilterEnabled struct { + FilterEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` +} + +func (*CorsPolicy_Enabled) isCorsPolicy_EnabledSpecifier() {} + +func (*CorsPolicy_FilterEnabled) isCorsPolicy_EnabledSpecifier() {} + +func (m *CorsPolicy) GetEnabledSpecifier() isCorsPolicy_EnabledSpecifier { + if m != nil { + return m.EnabledSpecifier + } + return nil +} + +// Deprecated: Do not use. +func (m *CorsPolicy) GetEnabled() *wrappers.BoolValue { + if x, ok := m.GetEnabledSpecifier().(*CorsPolicy_Enabled); ok { + return x.Enabled + } + return nil +} + +func (m *CorsPolicy) GetFilterEnabled() *core.RuntimeFractionalPercent { + if x, ok := m.GetEnabledSpecifier().(*CorsPolicy_FilterEnabled); ok { + return x.FilterEnabled + } + return nil +} + +func (m *CorsPolicy) GetShadowEnabled() *core.RuntimeFractionalPercent { + if m != nil { + return m.ShadowEnabled + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CorsPolicy) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*CorsPolicy_Enabled)(nil), + (*CorsPolicy_FilterEnabled)(nil), + } +} + +type RouteAction struct { + // Types that are valid to be assigned to ClusterSpecifier: + // *RouteAction_Cluster + // *RouteAction_ClusterHeader + // *RouteAction_WeightedClusters + ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` + ClusterNotFoundResponseCode RouteAction_ClusterNotFoundResponseCode `protobuf:"varint,20,opt,name=cluster_not_found_response_code,json=clusterNotFoundResponseCode,proto3,enum=envoy.api.v2.route.RouteAction_ClusterNotFoundResponseCode" json:"cluster_not_found_response_code,omitempty"` + MetadataMatch *core.Metadata `protobuf:"bytes,4,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3" json:"prefix_rewrite,omitempty"` + RegexRewrite *matcher.RegexMatchAndSubstitute `protobuf:"bytes,32,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` + // Types that are valid to be assigned to HostRewriteSpecifier: + // *RouteAction_HostRewrite + // *RouteAction_AutoHostRewrite + // *RouteAction_AutoHostRewriteHeader + HostRewriteSpecifier isRouteAction_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` + Timeout *duration.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` + IdleTimeout *duration.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` + RetryPolicy *RetryPolicy `protobuf:"bytes,9,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` + RetryPolicyTypedConfig *any.Any `protobuf:"bytes,33,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` + RequestMirrorPolicy *RouteAction_RequestMirrorPolicy `protobuf:"bytes,10,opt,name=request_mirror_policy,json=requestMirrorPolicy,proto3" json:"request_mirror_policy,omitempty"` // Deprecated: Do not use. + RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,30,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` + Priority core.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"` + RateLimits []*RateLimit `protobuf:"bytes,13,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + IncludeVhRateLimits *wrappers.BoolValue `protobuf:"bytes,14,opt,name=include_vh_rate_limits,json=includeVhRateLimits,proto3" json:"include_vh_rate_limits,omitempty"` + HashPolicy []*RouteAction_HashPolicy `protobuf:"bytes,15,rep,name=hash_policy,json=hashPolicy,proto3" json:"hash_policy,omitempty"` + Cors *CorsPolicy `protobuf:"bytes,17,opt,name=cors,proto3" json:"cors,omitempty"` + MaxGrpcTimeout *duration.Duration `protobuf:"bytes,23,opt,name=max_grpc_timeout,json=maxGrpcTimeout,proto3" json:"max_grpc_timeout,omitempty"` + GrpcTimeoutOffset *duration.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"` + InternalRedirectAction RouteAction_InternalRedirectAction `protobuf:"varint,26,opt,name=internal_redirect_action,json=internalRedirectAction,proto3,enum=envoy.api.v2.route.RouteAction_InternalRedirectAction" json:"internal_redirect_action,omitempty"` + MaxInternalRedirects *wrappers.UInt32Value `protobuf:"bytes,31,opt,name=max_internal_redirects,json=maxInternalRedirects,proto3" json:"max_internal_redirects,omitempty"` + HedgePolicy *HedgePolicy `protobuf:"bytes,27,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction) Reset() { *m = RouteAction{} } +func (m *RouteAction) String() string { return proto.CompactTextString(m) } +func (*RouteAction) ProtoMessage() {} +func (*RouteAction) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6} +} + +func (m *RouteAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction.Unmarshal(m, b) +} +func (m *RouteAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction.Marshal(b, m, deterministic) +} +func (m *RouteAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction.Merge(m, src) +} +func (m *RouteAction) XXX_Size() int { + return xxx_messageInfo_RouteAction.Size(m) +} +func (m *RouteAction) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction proto.InternalMessageInfo + +type isRouteAction_ClusterSpecifier interface { + isRouteAction_ClusterSpecifier() +} + +type RouteAction_Cluster struct { + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` +} + +type RouteAction_ClusterHeader struct { + ClusterHeader string `protobuf:"bytes,2,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` +} + +type RouteAction_WeightedClusters struct { + WeightedClusters *WeightedCluster `protobuf:"bytes,3,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` +} + +func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} + +func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { + if m != nil { + return m.ClusterSpecifier + } + return nil +} + +func (m *RouteAction) GetCluster() string { + if x, ok := m.GetClusterSpecifier().(*RouteAction_Cluster); ok { + return x.Cluster + } + return "" +} + +func (m *RouteAction) GetClusterHeader() string { + if x, ok := m.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { + return x.ClusterHeader + } + return "" +} + +func (m *RouteAction) GetWeightedClusters() *WeightedCluster { + if x, ok := m.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { + return x.WeightedClusters + } + return nil +} + +func (m *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFoundResponseCode { + if m != nil { + return m.ClusterNotFoundResponseCode + } + return RouteAction_SERVICE_UNAVAILABLE +} + +func (m *RouteAction) GetMetadataMatch() *core.Metadata { + if m != nil { + return m.MetadataMatch + } + return nil +} + +func (m *RouteAction) GetPrefixRewrite() string { + if m != nil { + return m.PrefixRewrite + } + return "" +} + +func (m *RouteAction) GetRegexRewrite() *matcher.RegexMatchAndSubstitute { + if m != nil { + return m.RegexRewrite + } + return nil +} + +type isRouteAction_HostRewriteSpecifier interface { + isRouteAction_HostRewriteSpecifier() +} + +type RouteAction_HostRewrite struct { + HostRewrite string `protobuf:"bytes,6,opt,name=host_rewrite,json=hostRewrite,proto3,oneof"` +} + +type RouteAction_AutoHostRewrite struct { + AutoHostRewrite *wrappers.BoolValue `protobuf:"bytes,7,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3,oneof"` +} + +type RouteAction_AutoHostRewriteHeader struct { + AutoHostRewriteHeader string `protobuf:"bytes,29,opt,name=auto_host_rewrite_header,json=autoHostRewriteHeader,proto3,oneof"` +} + +func (*RouteAction_HostRewrite) isRouteAction_HostRewriteSpecifier() {} + +func (*RouteAction_AutoHostRewrite) isRouteAction_HostRewriteSpecifier() {} + +func (*RouteAction_AutoHostRewriteHeader) isRouteAction_HostRewriteSpecifier() {} + +func (m *RouteAction) GetHostRewriteSpecifier() isRouteAction_HostRewriteSpecifier { + if m != nil { + return m.HostRewriteSpecifier + } + return nil +} + +func (m *RouteAction) GetHostRewrite() string { + if x, ok := m.GetHostRewriteSpecifier().(*RouteAction_HostRewrite); ok { + return x.HostRewrite + } + return "" +} + +func (m *RouteAction) GetAutoHostRewrite() *wrappers.BoolValue { + if x, ok := m.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewrite); ok { + return x.AutoHostRewrite + } + return nil +} + +func (m *RouteAction) GetAutoHostRewriteHeader() string { + if x, ok := m.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewriteHeader); ok { + return x.AutoHostRewriteHeader + } + return "" +} + +func (m *RouteAction) GetTimeout() *duration.Duration { + if m != nil { + return m.Timeout + } + return nil +} + +func (m *RouteAction) GetIdleTimeout() *duration.Duration { + if m != nil { + return m.IdleTimeout + } + return nil +} + +func (m *RouteAction) GetRetryPolicy() *RetryPolicy { + if m != nil { + return m.RetryPolicy + } + return nil +} + +func (m *RouteAction) GetRetryPolicyTypedConfig() *any.Any { + if m != nil { + return m.RetryPolicyTypedConfig + } + return nil +} + +// Deprecated: Do not use. +func (m *RouteAction) GetRequestMirrorPolicy() *RouteAction_RequestMirrorPolicy { + if m != nil { + return m.RequestMirrorPolicy + } + return nil +} + +func (m *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { + if m != nil { + return m.RequestMirrorPolicies + } + return nil +} + +func (m *RouteAction) GetPriority() core.RoutingPriority { + if m != nil { + return m.Priority + } + return core.RoutingPriority_DEFAULT +} + +func (m *RouteAction) GetRateLimits() []*RateLimit { + if m != nil { + return m.RateLimits + } + return nil +} + +func (m *RouteAction) GetIncludeVhRateLimits() *wrappers.BoolValue { + if m != nil { + return m.IncludeVhRateLimits + } + return nil +} + +func (m *RouteAction) GetHashPolicy() []*RouteAction_HashPolicy { + if m != nil { + return m.HashPolicy + } + return nil +} + +func (m *RouteAction) GetCors() *CorsPolicy { + if m != nil { + return m.Cors + } + return nil +} + +func (m *RouteAction) GetMaxGrpcTimeout() *duration.Duration { + if m != nil { + return m.MaxGrpcTimeout + } + return nil +} + +func (m *RouteAction) GetGrpcTimeoutOffset() *duration.Duration { + if m != nil { + return m.GrpcTimeoutOffset + } + return nil +} + +func (m *RouteAction) GetUpgradeConfigs() []*RouteAction_UpgradeConfig { + if m != nil { + return m.UpgradeConfigs + } + return nil +} + +func (m *RouteAction) GetInternalRedirectAction() RouteAction_InternalRedirectAction { + if m != nil { + return m.InternalRedirectAction + } + return RouteAction_PASS_THROUGH_INTERNAL_REDIRECT +} + +func (m *RouteAction) GetMaxInternalRedirects() *wrappers.UInt32Value { + if m != nil { + return m.MaxInternalRedirects + } + return nil +} + +func (m *RouteAction) GetHedgePolicy() *HedgePolicy { + if m != nil { + return m.HedgePolicy + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RouteAction) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RouteAction_Cluster)(nil), + (*RouteAction_ClusterHeader)(nil), + (*RouteAction_WeightedClusters)(nil), + (*RouteAction_HostRewrite)(nil), + (*RouteAction_AutoHostRewrite)(nil), + (*RouteAction_AutoHostRewriteHeader)(nil), + } +} + +type RouteAction_RequestMirrorPolicy struct { + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` + RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` // Deprecated: Do not use. + RuntimeFraction *core.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` + TraceSampled *wrappers.BoolValue `protobuf:"bytes,4,opt,name=trace_sampled,json=traceSampled,proto3" json:"trace_sampled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_RequestMirrorPolicy) Reset() { *m = RouteAction_RequestMirrorPolicy{} } +func (m *RouteAction_RequestMirrorPolicy) String() string { return proto.CompactTextString(m) } +func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} +func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 0} +} + +func (m *RouteAction_RequestMirrorPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_RequestMirrorPolicy.Unmarshal(m, b) +} +func (m *RouteAction_RequestMirrorPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_RequestMirrorPolicy.Marshal(b, m, deterministic) +} +func (m *RouteAction_RequestMirrorPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_RequestMirrorPolicy.Merge(m, src) +} +func (m *RouteAction_RequestMirrorPolicy) XXX_Size() int { + return xxx_messageInfo_RouteAction_RequestMirrorPolicy.Size(m) +} +func (m *RouteAction_RequestMirrorPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_RequestMirrorPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_RequestMirrorPolicy proto.InternalMessageInfo + +func (m *RouteAction_RequestMirrorPolicy) GetCluster() string { + if m != nil { + return m.Cluster + } + return "" +} + +// Deprecated: Do not use. +func (m *RouteAction_RequestMirrorPolicy) GetRuntimeKey() string { + if m != nil { + return m.RuntimeKey + } + return "" +} + +func (m *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *core.RuntimeFractionalPercent { + if m != nil { + return m.RuntimeFraction + } + return nil +} + +func (m *RouteAction_RequestMirrorPolicy) GetTraceSampled() *wrappers.BoolValue { + if m != nil { + return m.TraceSampled + } + return nil +} + +type RouteAction_HashPolicy struct { + // Types that are valid to be assigned 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"` + Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_HashPolicy) Reset() { *m = RouteAction_HashPolicy{} } +func (m *RouteAction_HashPolicy) String() string { return proto.CompactTextString(m) } +func (*RouteAction_HashPolicy) ProtoMessage() {} +func (*RouteAction_HashPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1} +} + +func (m *RouteAction_HashPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_HashPolicy.Unmarshal(m, b) +} +func (m *RouteAction_HashPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_HashPolicy.Marshal(b, m, deterministic) +} +func (m *RouteAction_HashPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_HashPolicy.Merge(m, src) +} +func (m *RouteAction_HashPolicy) XXX_Size() int { + return xxx_messageInfo_RouteAction_HashPolicy.Size(m) +} +func (m *RouteAction_HashPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_HashPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_HashPolicy proto.InternalMessageInfo + +type isRouteAction_HashPolicy_PolicySpecifier interface { + isRouteAction_HashPolicy_PolicySpecifier() +} + +type RouteAction_HashPolicy_Header_ struct { + Header *RouteAction_HashPolicy_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type RouteAction_HashPolicy_Cookie_ struct { + Cookie *RouteAction_HashPolicy_Cookie `protobuf:"bytes,2,opt,name=cookie,proto3,oneof"` +} + +type RouteAction_HashPolicy_ConnectionProperties_ struct { + ConnectionProperties *RouteAction_HashPolicy_ConnectionProperties `protobuf:"bytes,3,opt,name=connection_properties,json=connectionProperties,proto3,oneof"` +} + +type RouteAction_HashPolicy_QueryParameter_ struct { + QueryParameter *RouteAction_HashPolicy_QueryParameter `protobuf:"bytes,5,opt,name=query_parameter,json=queryParameter,proto3,oneof"` +} + +type RouteAction_HashPolicy_FilterState_ struct { + 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() {} + +func (m *RouteAction_HashPolicy) GetPolicySpecifier() isRouteAction_HashPolicy_PolicySpecifier { + if m != nil { + return m.PolicySpecifier + } + return nil +} + +func (m *RouteAction_HashPolicy) GetHeader() *RouteAction_HashPolicy_Header { + if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_Header_); ok { + return x.Header + } + return nil +} + +func (m *RouteAction_HashPolicy) GetCookie() *RouteAction_HashPolicy_Cookie { + if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_Cookie_); ok { + return x.Cookie + } + return nil +} + +func (m *RouteAction_HashPolicy) GetConnectionProperties() *RouteAction_HashPolicy_ConnectionProperties { + if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_ConnectionProperties_); ok { + return x.ConnectionProperties + } + return nil +} + +func (m *RouteAction_HashPolicy) GetQueryParameter() *RouteAction_HashPolicy_QueryParameter { + if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_QueryParameter_); ok { + return x.QueryParameter + } + return nil +} + +func (m *RouteAction_HashPolicy) GetFilterState() *RouteAction_HashPolicy_FilterState { + if x, ok := m.GetPolicySpecifier().(*RouteAction_HashPolicy_FilterState_); ok { + return x.FilterState + } + return nil +} + +func (m *RouteAction_HashPolicy) GetTerminal() bool { + if m != nil { + return m.Terminal + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RouteAction_HashPolicy) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RouteAction_HashPolicy_Header_)(nil), + (*RouteAction_HashPolicy_Cookie_)(nil), + (*RouteAction_HashPolicy_ConnectionProperties_)(nil), + (*RouteAction_HashPolicy_QueryParameter_)(nil), + (*RouteAction_HashPolicy_FilterState_)(nil), + } +} + +type RouteAction_HashPolicy_Header struct { + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_HashPolicy_Header) Reset() { *m = RouteAction_HashPolicy_Header{} } +func (m *RouteAction_HashPolicy_Header) String() string { return proto.CompactTextString(m) } +func (*RouteAction_HashPolicy_Header) ProtoMessage() {} +func (*RouteAction_HashPolicy_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1, 0} +} + +func (m *RouteAction_HashPolicy_Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_HashPolicy_Header.Unmarshal(m, b) +} +func (m *RouteAction_HashPolicy_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_HashPolicy_Header.Marshal(b, m, deterministic) +} +func (m *RouteAction_HashPolicy_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_HashPolicy_Header.Merge(m, src) +} +func (m *RouteAction_HashPolicy_Header) XXX_Size() int { + return xxx_messageInfo_RouteAction_HashPolicy_Header.Size(m) +} +func (m *RouteAction_HashPolicy_Header) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_HashPolicy_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_HashPolicy_Header proto.InternalMessageInfo + +func (m *RouteAction_HashPolicy_Header) GetHeaderName() string { + if m != nil { + return m.HeaderName + } + return "" +} + +type RouteAction_HashPolicy_Cookie struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ttl *duration.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_HashPolicy_Cookie) Reset() { *m = RouteAction_HashPolicy_Cookie{} } +func (m *RouteAction_HashPolicy_Cookie) String() string { return proto.CompactTextString(m) } +func (*RouteAction_HashPolicy_Cookie) ProtoMessage() {} +func (*RouteAction_HashPolicy_Cookie) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1, 1} +} + +func (m *RouteAction_HashPolicy_Cookie) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_HashPolicy_Cookie.Unmarshal(m, b) +} +func (m *RouteAction_HashPolicy_Cookie) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_HashPolicy_Cookie.Marshal(b, m, deterministic) +} +func (m *RouteAction_HashPolicy_Cookie) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_HashPolicy_Cookie.Merge(m, src) +} +func (m *RouteAction_HashPolicy_Cookie) XXX_Size() int { + return xxx_messageInfo_RouteAction_HashPolicy_Cookie.Size(m) +} +func (m *RouteAction_HashPolicy_Cookie) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_HashPolicy_Cookie.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_HashPolicy_Cookie proto.InternalMessageInfo + +func (m *RouteAction_HashPolicy_Cookie) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *RouteAction_HashPolicy_Cookie) GetTtl() *duration.Duration { + if m != nil { + return m.Ttl + } + return nil +} + +func (m *RouteAction_HashPolicy_Cookie) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +type RouteAction_HashPolicy_ConnectionProperties struct { + SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_HashPolicy_ConnectionProperties) Reset() { + *m = RouteAction_HashPolicy_ConnectionProperties{} +} +func (m *RouteAction_HashPolicy_ConnectionProperties) String() string { + return proto.CompactTextString(m) +} +func (*RouteAction_HashPolicy_ConnectionProperties) ProtoMessage() {} +func (*RouteAction_HashPolicy_ConnectionProperties) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1, 2} +} + +func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.Unmarshal(m, b) +} +func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.Marshal(b, m, deterministic) +} +func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.Merge(m, src) +} +func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_Size() int { + return xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.Size(m) +} +func (m *RouteAction_HashPolicy_ConnectionProperties) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_HashPolicy_ConnectionProperties proto.InternalMessageInfo + +func (m *RouteAction_HashPolicy_ConnectionProperties) GetSourceIp() bool { + if m != nil { + return m.SourceIp + } + return false +} + +type RouteAction_HashPolicy_QueryParameter 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 *RouteAction_HashPolicy_QueryParameter) Reset() { *m = RouteAction_HashPolicy_QueryParameter{} } +func (m *RouteAction_HashPolicy_QueryParameter) String() string { return proto.CompactTextString(m) } +func (*RouteAction_HashPolicy_QueryParameter) ProtoMessage() {} +func (*RouteAction_HashPolicy_QueryParameter) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1, 3} +} + +func (m *RouteAction_HashPolicy_QueryParameter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_HashPolicy_QueryParameter.Unmarshal(m, b) +} +func (m *RouteAction_HashPolicy_QueryParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_HashPolicy_QueryParameter.Marshal(b, m, deterministic) +} +func (m *RouteAction_HashPolicy_QueryParameter) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_HashPolicy_QueryParameter.Merge(m, src) +} +func (m *RouteAction_HashPolicy_QueryParameter) XXX_Size() int { + return xxx_messageInfo_RouteAction_HashPolicy_QueryParameter.Size(m) +} +func (m *RouteAction_HashPolicy_QueryParameter) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_HashPolicy_QueryParameter.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_HashPolicy_QueryParameter proto.InternalMessageInfo + +func (m *RouteAction_HashPolicy_QueryParameter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type RouteAction_HashPolicy_FilterState struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_HashPolicy_FilterState) Reset() { *m = RouteAction_HashPolicy_FilterState{} } +func (m *RouteAction_HashPolicy_FilterState) String() string { return proto.CompactTextString(m) } +func (*RouteAction_HashPolicy_FilterState) ProtoMessage() {} +func (*RouteAction_HashPolicy_FilterState) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 1, 4} +} + +func (m *RouteAction_HashPolicy_FilterState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_HashPolicy_FilterState.Unmarshal(m, b) +} +func (m *RouteAction_HashPolicy_FilterState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_HashPolicy_FilterState.Marshal(b, m, deterministic) +} +func (m *RouteAction_HashPolicy_FilterState) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_HashPolicy_FilterState.Merge(m, src) +} +func (m *RouteAction_HashPolicy_FilterState) XXX_Size() int { + return xxx_messageInfo_RouteAction_HashPolicy_FilterState.Size(m) +} +func (m *RouteAction_HashPolicy_FilterState) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_HashPolicy_FilterState.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_HashPolicy_FilterState proto.InternalMessageInfo + +func (m *RouteAction_HashPolicy_FilterState) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +type RouteAction_UpgradeConfig struct { + UpgradeType string `protobuf:"bytes,1,opt,name=upgrade_type,json=upgradeType,proto3" json:"upgrade_type,omitempty"` + Enabled *wrappers.BoolValue `protobuf:"bytes,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteAction_UpgradeConfig) Reset() { *m = RouteAction_UpgradeConfig{} } +func (m *RouteAction_UpgradeConfig) String() string { return proto.CompactTextString(m) } +func (*RouteAction_UpgradeConfig) ProtoMessage() {} +func (*RouteAction_UpgradeConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{6, 2} +} + +func (m *RouteAction_UpgradeConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteAction_UpgradeConfig.Unmarshal(m, b) +} +func (m *RouteAction_UpgradeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteAction_UpgradeConfig.Marshal(b, m, deterministic) +} +func (m *RouteAction_UpgradeConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteAction_UpgradeConfig.Merge(m, src) +} +func (m *RouteAction_UpgradeConfig) XXX_Size() int { + return xxx_messageInfo_RouteAction_UpgradeConfig.Size(m) +} +func (m *RouteAction_UpgradeConfig) XXX_DiscardUnknown() { + xxx_messageInfo_RouteAction_UpgradeConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteAction_UpgradeConfig proto.InternalMessageInfo + +func (m *RouteAction_UpgradeConfig) GetUpgradeType() string { + if m != nil { + return m.UpgradeType + } + return "" +} + +func (m *RouteAction_UpgradeConfig) GetEnabled() *wrappers.BoolValue { + if m != nil { + return m.Enabled + } + return nil +} + +type RetryPolicy struct { + RetryOn string `protobuf:"bytes,1,opt,name=retry_on,json=retryOn,proto3" json:"retry_on,omitempty"` + NumRetries *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` + PerTryTimeout *duration.Duration `protobuf:"bytes,3,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"` + RetryPriority *RetryPolicy_RetryPriority `protobuf:"bytes,4,opt,name=retry_priority,json=retryPriority,proto3" json:"retry_priority,omitempty"` + RetryHostPredicate []*RetryPolicy_RetryHostPredicate `protobuf:"bytes,5,rep,name=retry_host_predicate,json=retryHostPredicate,proto3" json:"retry_host_predicate,omitempty"` + HostSelectionRetryMaxAttempts int64 `protobuf:"varint,6,opt,name=host_selection_retry_max_attempts,json=hostSelectionRetryMaxAttempts,proto3" json:"host_selection_retry_max_attempts,omitempty"` + RetriableStatusCodes []uint32 `protobuf:"varint,7,rep,packed,name=retriable_status_codes,json=retriableStatusCodes,proto3" json:"retriable_status_codes,omitempty"` + RetryBackOff *RetryPolicy_RetryBackOff `protobuf:"bytes,8,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` + RetriableHeaders []*HeaderMatcher `protobuf:"bytes,9,rep,name=retriable_headers,json=retriableHeaders,proto3" json:"retriable_headers,omitempty"` + RetriableRequestHeaders []*HeaderMatcher `protobuf:"bytes,10,rep,name=retriable_request_headers,json=retriableRequestHeaders,proto3" json:"retriable_request_headers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryPolicy) Reset() { *m = RetryPolicy{} } +func (m *RetryPolicy) String() string { return proto.CompactTextString(m) } +func (*RetryPolicy) ProtoMessage() {} +func (*RetryPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{7} +} + +func (m *RetryPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetryPolicy.Unmarshal(m, b) +} +func (m *RetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetryPolicy.Marshal(b, m, deterministic) +} +func (m *RetryPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicy.Merge(m, src) +} +func (m *RetryPolicy) XXX_Size() int { + return xxx_messageInfo_RetryPolicy.Size(m) +} +func (m *RetryPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_RetryPolicy proto.InternalMessageInfo + +func (m *RetryPolicy) GetRetryOn() string { + if m != nil { + return m.RetryOn + } + return "" +} + +func (m *RetryPolicy) GetNumRetries() *wrappers.UInt32Value { + if m != nil { + return m.NumRetries + } + return nil +} + +func (m *RetryPolicy) GetPerTryTimeout() *duration.Duration { + if m != nil { + return m.PerTryTimeout + } + return nil +} + +func (m *RetryPolicy) GetRetryPriority() *RetryPolicy_RetryPriority { + if m != nil { + return m.RetryPriority + } + return nil +} + +func (m *RetryPolicy) GetRetryHostPredicate() []*RetryPolicy_RetryHostPredicate { + if m != nil { + return m.RetryHostPredicate + } + return nil +} + +func (m *RetryPolicy) GetHostSelectionRetryMaxAttempts() int64 { + if m != nil { + return m.HostSelectionRetryMaxAttempts + } + return 0 +} + +func (m *RetryPolicy) GetRetriableStatusCodes() []uint32 { + if m != nil { + return m.RetriableStatusCodes + } + return nil +} + +func (m *RetryPolicy) GetRetryBackOff() *RetryPolicy_RetryBackOff { + if m != nil { + return m.RetryBackOff + } + return nil +} + +func (m *RetryPolicy) GetRetriableHeaders() []*HeaderMatcher { + if m != nil { + return m.RetriableHeaders + } + return nil +} + +func (m *RetryPolicy) GetRetriableRequestHeaders() []*HeaderMatcher { + if m != nil { + return m.RetriableRequestHeaders + } + return nil +} + +type RetryPolicy_RetryPriority struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *RetryPolicy_RetryPriority_Config + // *RetryPolicy_RetryPriority_TypedConfig + ConfigType isRetryPolicy_RetryPriority_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryPolicy_RetryPriority) Reset() { *m = RetryPolicy_RetryPriority{} } +func (m *RetryPolicy_RetryPriority) String() string { return proto.CompactTextString(m) } +func (*RetryPolicy_RetryPriority) ProtoMessage() {} +func (*RetryPolicy_RetryPriority) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{7, 0} +} + +func (m *RetryPolicy_RetryPriority) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetryPolicy_RetryPriority.Unmarshal(m, b) +} +func (m *RetryPolicy_RetryPriority) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetryPolicy_RetryPriority.Marshal(b, m, deterministic) +} +func (m *RetryPolicy_RetryPriority) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicy_RetryPriority.Merge(m, src) +} +func (m *RetryPolicy_RetryPriority) XXX_Size() int { + return xxx_messageInfo_RetryPolicy_RetryPriority.Size(m) +} +func (m *RetryPolicy_RetryPriority) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicy_RetryPriority.DiscardUnknown(m) +} + +var xxx_messageInfo_RetryPolicy_RetryPriority proto.InternalMessageInfo + +func (m *RetryPolicy_RetryPriority) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isRetryPolicy_RetryPriority_ConfigType interface { + isRetryPolicy_RetryPriority_ConfigType() +} + +type RetryPolicy_RetryPriority_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type RetryPolicy_RetryPriority_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*RetryPolicy_RetryPriority_Config) isRetryPolicy_RetryPriority_ConfigType() {} + +func (*RetryPolicy_RetryPriority_TypedConfig) isRetryPolicy_RetryPriority_ConfigType() {} + +func (m *RetryPolicy_RetryPriority) GetConfigType() isRetryPolicy_RetryPriority_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *RetryPolicy_RetryPriority) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*RetryPolicy_RetryPriority_Config); ok { + return x.Config + } + return nil +} + +func (m *RetryPolicy_RetryPriority) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*RetryPolicy_RetryPriority_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RetryPolicy_RetryPriority) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RetryPolicy_RetryPriority_Config)(nil), + (*RetryPolicy_RetryPriority_TypedConfig)(nil), + } +} + +type RetryPolicy_RetryHostPredicate struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *RetryPolicy_RetryHostPredicate_Config + // *RetryPolicy_RetryHostPredicate_TypedConfig + ConfigType isRetryPolicy_RetryHostPredicate_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryPolicy_RetryHostPredicate) Reset() { *m = RetryPolicy_RetryHostPredicate{} } +func (m *RetryPolicy_RetryHostPredicate) String() string { return proto.CompactTextString(m) } +func (*RetryPolicy_RetryHostPredicate) ProtoMessage() {} +func (*RetryPolicy_RetryHostPredicate) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{7, 1} +} + +func (m *RetryPolicy_RetryHostPredicate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetryPolicy_RetryHostPredicate.Unmarshal(m, b) +} +func (m *RetryPolicy_RetryHostPredicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetryPolicy_RetryHostPredicate.Marshal(b, m, deterministic) +} +func (m *RetryPolicy_RetryHostPredicate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicy_RetryHostPredicate.Merge(m, src) +} +func (m *RetryPolicy_RetryHostPredicate) XXX_Size() int { + return xxx_messageInfo_RetryPolicy_RetryHostPredicate.Size(m) +} +func (m *RetryPolicy_RetryHostPredicate) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicy_RetryHostPredicate.DiscardUnknown(m) +} + +var xxx_messageInfo_RetryPolicy_RetryHostPredicate proto.InternalMessageInfo + +func (m *RetryPolicy_RetryHostPredicate) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isRetryPolicy_RetryHostPredicate_ConfigType interface { + isRetryPolicy_RetryHostPredicate_ConfigType() +} + +type RetryPolicy_RetryHostPredicate_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type RetryPolicy_RetryHostPredicate_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*RetryPolicy_RetryHostPredicate_Config) isRetryPolicy_RetryHostPredicate_ConfigType() {} + +func (*RetryPolicy_RetryHostPredicate_TypedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() {} + +func (m *RetryPolicy_RetryHostPredicate) GetConfigType() isRetryPolicy_RetryHostPredicate_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *RetryPolicy_RetryHostPredicate) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*RetryPolicy_RetryHostPredicate_Config); ok { + return x.Config + } + return nil +} + +func (m *RetryPolicy_RetryHostPredicate) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*RetryPolicy_RetryHostPredicate_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RetryPolicy_RetryHostPredicate) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RetryPolicy_RetryHostPredicate_Config)(nil), + (*RetryPolicy_RetryHostPredicate_TypedConfig)(nil), + } +} + +type RetryPolicy_RetryBackOff struct { + BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` + MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryPolicy_RetryBackOff) Reset() { *m = RetryPolicy_RetryBackOff{} } +func (m *RetryPolicy_RetryBackOff) String() string { return proto.CompactTextString(m) } +func (*RetryPolicy_RetryBackOff) ProtoMessage() {} +func (*RetryPolicy_RetryBackOff) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{7, 2} +} + +func (m *RetryPolicy_RetryBackOff) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetryPolicy_RetryBackOff.Unmarshal(m, b) +} +func (m *RetryPolicy_RetryBackOff) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetryPolicy_RetryBackOff.Marshal(b, m, deterministic) +} +func (m *RetryPolicy_RetryBackOff) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryPolicy_RetryBackOff.Merge(m, src) +} +func (m *RetryPolicy_RetryBackOff) XXX_Size() int { + return xxx_messageInfo_RetryPolicy_RetryBackOff.Size(m) +} +func (m *RetryPolicy_RetryBackOff) XXX_DiscardUnknown() { + xxx_messageInfo_RetryPolicy_RetryBackOff.DiscardUnknown(m) +} + +var xxx_messageInfo_RetryPolicy_RetryBackOff proto.InternalMessageInfo + +func (m *RetryPolicy_RetryBackOff) GetBaseInterval() *duration.Duration { + if m != nil { + return m.BaseInterval + } + return nil +} + +func (m *RetryPolicy_RetryBackOff) GetMaxInterval() *duration.Duration { + if m != nil { + return m.MaxInterval + } + return nil +} + +type HedgePolicy struct { + InitialRequests *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=initial_requests,json=initialRequests,proto3" json:"initial_requests,omitempty"` + AdditionalRequestChance *_type.FractionalPercent `protobuf:"bytes,2,opt,name=additional_request_chance,json=additionalRequestChance,proto3" json:"additional_request_chance,omitempty"` + HedgeOnPerTryTimeout bool `protobuf:"varint,3,opt,name=hedge_on_per_try_timeout,json=hedgeOnPerTryTimeout,proto3" json:"hedge_on_per_try_timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HedgePolicy) Reset() { *m = HedgePolicy{} } +func (m *HedgePolicy) String() string { return proto.CompactTextString(m) } +func (*HedgePolicy) ProtoMessage() {} +func (*HedgePolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{8} +} + +func (m *HedgePolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HedgePolicy.Unmarshal(m, b) +} +func (m *HedgePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HedgePolicy.Marshal(b, m, deterministic) +} +func (m *HedgePolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_HedgePolicy.Merge(m, src) +} +func (m *HedgePolicy) XXX_Size() int { + return xxx_messageInfo_HedgePolicy.Size(m) +} +func (m *HedgePolicy) XXX_DiscardUnknown() { + xxx_messageInfo_HedgePolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_HedgePolicy proto.InternalMessageInfo + +func (m *HedgePolicy) GetInitialRequests() *wrappers.UInt32Value { + if m != nil { + return m.InitialRequests + } + return nil +} + +func (m *HedgePolicy) GetAdditionalRequestChance() *_type.FractionalPercent { + if m != nil { + return m.AdditionalRequestChance + } + return nil +} + +func (m *HedgePolicy) GetHedgeOnPerTryTimeout() bool { + if m != nil { + return m.HedgeOnPerTryTimeout + } + return false +} + +type RedirectAction struct { + // Types that are valid to be assigned to SchemeRewriteSpecifier: + // *RedirectAction_HttpsRedirect + // *RedirectAction_SchemeRedirect + SchemeRewriteSpecifier isRedirectAction_SchemeRewriteSpecifier `protobuf_oneof:"scheme_rewrite_specifier"` + HostRedirect string `protobuf:"bytes,1,opt,name=host_redirect,json=hostRedirect,proto3" json:"host_redirect,omitempty"` + PortRedirect uint32 `protobuf:"varint,8,opt,name=port_redirect,json=portRedirect,proto3" json:"port_redirect,omitempty"` + // Types that are valid to be assigned to PathRewriteSpecifier: + // *RedirectAction_PathRedirect + // *RedirectAction_PrefixRewrite + PathRewriteSpecifier isRedirectAction_PathRewriteSpecifier `protobuf_oneof:"path_rewrite_specifier"` + ResponseCode RedirectAction_RedirectResponseCode `protobuf:"varint,3,opt,name=response_code,json=responseCode,proto3,enum=envoy.api.v2.route.RedirectAction_RedirectResponseCode" json:"response_code,omitempty"` + StripQuery bool `protobuf:"varint,6,opt,name=strip_query,json=stripQuery,proto3" json:"strip_query,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RedirectAction) Reset() { *m = RedirectAction{} } +func (m *RedirectAction) String() string { return proto.CompactTextString(m) } +func (*RedirectAction) ProtoMessage() {} +func (*RedirectAction) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{9} +} + +func (m *RedirectAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RedirectAction.Unmarshal(m, b) +} +func (m *RedirectAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RedirectAction.Marshal(b, m, deterministic) +} +func (m *RedirectAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedirectAction.Merge(m, src) +} +func (m *RedirectAction) XXX_Size() int { + return xxx_messageInfo_RedirectAction.Size(m) +} +func (m *RedirectAction) XXX_DiscardUnknown() { + xxx_messageInfo_RedirectAction.DiscardUnknown(m) +} + +var xxx_messageInfo_RedirectAction proto.InternalMessageInfo + +type isRedirectAction_SchemeRewriteSpecifier interface { + isRedirectAction_SchemeRewriteSpecifier() +} + +type RedirectAction_HttpsRedirect struct { + HttpsRedirect bool `protobuf:"varint,4,opt,name=https_redirect,json=httpsRedirect,proto3,oneof"` +} + +type RedirectAction_SchemeRedirect struct { + SchemeRedirect string `protobuf:"bytes,7,opt,name=scheme_redirect,json=schemeRedirect,proto3,oneof"` +} + +func (*RedirectAction_HttpsRedirect) isRedirectAction_SchemeRewriteSpecifier() {} + +func (*RedirectAction_SchemeRedirect) isRedirectAction_SchemeRewriteSpecifier() {} + +func (m *RedirectAction) GetSchemeRewriteSpecifier() isRedirectAction_SchemeRewriteSpecifier { + if m != nil { + return m.SchemeRewriteSpecifier + } + return nil +} + +func (m *RedirectAction) GetHttpsRedirect() bool { + if x, ok := m.GetSchemeRewriteSpecifier().(*RedirectAction_HttpsRedirect); ok { + return x.HttpsRedirect + } + return false +} + +func (m *RedirectAction) GetSchemeRedirect() string { + if x, ok := m.GetSchemeRewriteSpecifier().(*RedirectAction_SchemeRedirect); ok { + return x.SchemeRedirect + } + return "" +} + +func (m *RedirectAction) GetHostRedirect() string { + if m != nil { + return m.HostRedirect + } + return "" +} + +func (m *RedirectAction) GetPortRedirect() uint32 { + if m != nil { + return m.PortRedirect + } + return 0 +} + +type isRedirectAction_PathRewriteSpecifier interface { + isRedirectAction_PathRewriteSpecifier() +} + +type RedirectAction_PathRedirect struct { + PathRedirect string `protobuf:"bytes,2,opt,name=path_redirect,json=pathRedirect,proto3,oneof"` +} + +type RedirectAction_PrefixRewrite struct { + PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` +} + +func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} + +func (*RedirectAction_PrefixRewrite) isRedirectAction_PathRewriteSpecifier() {} + +func (m *RedirectAction) GetPathRewriteSpecifier() isRedirectAction_PathRewriteSpecifier { + if m != nil { + return m.PathRewriteSpecifier + } + return nil +} + +func (m *RedirectAction) GetPathRedirect() string { + if x, ok := m.GetPathRewriteSpecifier().(*RedirectAction_PathRedirect); ok { + return x.PathRedirect + } + return "" +} + +func (m *RedirectAction) GetPrefixRewrite() string { + if x, ok := m.GetPathRewriteSpecifier().(*RedirectAction_PrefixRewrite); ok { + return x.PrefixRewrite + } + return "" +} + +func (m *RedirectAction) GetResponseCode() RedirectAction_RedirectResponseCode { + if m != nil { + return m.ResponseCode + } + return RedirectAction_MOVED_PERMANENTLY +} + +func (m *RedirectAction) GetStripQuery() bool { + if m != nil { + return m.StripQuery + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RedirectAction) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RedirectAction_HttpsRedirect)(nil), + (*RedirectAction_SchemeRedirect)(nil), + (*RedirectAction_PathRedirect)(nil), + (*RedirectAction_PrefixRewrite)(nil), + } +} + +type DirectResponseAction struct { + Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + Body *core.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DirectResponseAction) Reset() { *m = DirectResponseAction{} } +func (m *DirectResponseAction) String() string { return proto.CompactTextString(m) } +func (*DirectResponseAction) ProtoMessage() {} +func (*DirectResponseAction) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{10} +} + +func (m *DirectResponseAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DirectResponseAction.Unmarshal(m, b) +} +func (m *DirectResponseAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DirectResponseAction.Marshal(b, m, deterministic) +} +func (m *DirectResponseAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_DirectResponseAction.Merge(m, src) +} +func (m *DirectResponseAction) XXX_Size() int { + return xxx_messageInfo_DirectResponseAction.Size(m) +} +func (m *DirectResponseAction) XXX_DiscardUnknown() { + xxx_messageInfo_DirectResponseAction.DiscardUnknown(m) +} + +var xxx_messageInfo_DirectResponseAction proto.InternalMessageInfo + +func (m *DirectResponseAction) GetStatus() uint32 { + if m != nil { + return m.Status + } + return 0 +} + +func (m *DirectResponseAction) GetBody() *core.DataSource { + if m != nil { + return m.Body + } + return nil +} + +type Decorator struct { + Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` + Propagate *wrappers.BoolValue `protobuf:"bytes,2,opt,name=propagate,proto3" json:"propagate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Decorator) Reset() { *m = Decorator{} } +func (m *Decorator) String() string { return proto.CompactTextString(m) } +func (*Decorator) ProtoMessage() {} +func (*Decorator) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{11} +} + +func (m *Decorator) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Decorator.Unmarshal(m, b) +} +func (m *Decorator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Decorator.Marshal(b, m, deterministic) +} +func (m *Decorator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Decorator.Merge(m, src) +} +func (m *Decorator) XXX_Size() int { + return xxx_messageInfo_Decorator.Size(m) +} +func (m *Decorator) XXX_DiscardUnknown() { + xxx_messageInfo_Decorator.DiscardUnknown(m) +} + +var xxx_messageInfo_Decorator proto.InternalMessageInfo + +func (m *Decorator) GetOperation() string { + if m != nil { + return m.Operation + } + return "" +} + +func (m *Decorator) GetPropagate() *wrappers.BoolValue { + if m != nil { + return m.Propagate + } + return nil +} + +type Tracing struct { + ClientSampling *_type.FractionalPercent `protobuf:"bytes,1,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` + RandomSampling *_type.FractionalPercent `protobuf:"bytes,2,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` + OverallSampling *_type.FractionalPercent `protobuf:"bytes,3,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` + CustomTags []*v2.CustomTag `protobuf:"bytes,4,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tracing) Reset() { *m = Tracing{} } +func (m *Tracing) String() string { return proto.CompactTextString(m) } +func (*Tracing) ProtoMessage() {} +func (*Tracing) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{12} +} + +func (m *Tracing) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tracing.Unmarshal(m, b) +} +func (m *Tracing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tracing.Marshal(b, m, deterministic) +} +func (m *Tracing) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tracing.Merge(m, src) +} +func (m *Tracing) XXX_Size() int { + return xxx_messageInfo_Tracing.Size(m) +} +func (m *Tracing) XXX_DiscardUnknown() { + xxx_messageInfo_Tracing.DiscardUnknown(m) +} + +var xxx_messageInfo_Tracing proto.InternalMessageInfo + +func (m *Tracing) GetClientSampling() *_type.FractionalPercent { + if m != nil { + return m.ClientSampling + } + return nil +} + +func (m *Tracing) GetRandomSampling() *_type.FractionalPercent { + if m != nil { + return m.RandomSampling + } + return nil +} + +func (m *Tracing) GetOverallSampling() *_type.FractionalPercent { + if m != nil { + return m.OverallSampling + } + return nil +} + +func (m *Tracing) GetCustomTags() []*v2.CustomTag { + if m != nil { + return m.CustomTags + } + return nil +} + +type VirtualCluster struct { + Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` // Deprecated: Do not use. + Headers []*HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Method core.RequestMethod `protobuf:"varint,3,opt,name=method,proto3,enum=envoy.api.v2.core.RequestMethod" json:"method,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualCluster) Reset() { *m = VirtualCluster{} } +func (m *VirtualCluster) String() string { return proto.CompactTextString(m) } +func (*VirtualCluster) ProtoMessage() {} +func (*VirtualCluster) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{13} +} + +func (m *VirtualCluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VirtualCluster.Unmarshal(m, b) +} +func (m *VirtualCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VirtualCluster.Marshal(b, m, deterministic) +} +func (m *VirtualCluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualCluster.Merge(m, src) +} +func (m *VirtualCluster) XXX_Size() int { + return xxx_messageInfo_VirtualCluster.Size(m) +} +func (m *VirtualCluster) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualCluster.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualCluster proto.InternalMessageInfo + +// Deprecated: Do not use. +func (m *VirtualCluster) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *VirtualCluster) GetHeaders() []*HeaderMatcher { + if m != nil { + return m.Headers + } + return nil +} + +func (m *VirtualCluster) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Deprecated: Do not use. +func (m *VirtualCluster) GetMethod() core.RequestMethod { + if m != nil { + return m.Method + } + return core.RequestMethod_METHOD_UNSPECIFIED +} + +type RateLimit struct { + Stage *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"` + DisableKey string `protobuf:"bytes,2,opt,name=disable_key,json=disableKey,proto3" json:"disable_key,omitempty"` + Actions []*RateLimit_Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit) Reset() { *m = RateLimit{} } +func (m *RateLimit) String() string { return proto.CompactTextString(m) } +func (*RateLimit) ProtoMessage() {} +func (*RateLimit) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14} +} + +func (m *RateLimit) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit.Unmarshal(m, b) +} +func (m *RateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit.Marshal(b, m, deterministic) +} +func (m *RateLimit) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit.Merge(m, src) +} +func (m *RateLimit) XXX_Size() int { + return xxx_messageInfo_RateLimit.Size(m) +} +func (m *RateLimit) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit proto.InternalMessageInfo + +func (m *RateLimit) GetStage() *wrappers.UInt32Value { + if m != nil { + return m.Stage + } + return nil +} + +func (m *RateLimit) GetDisableKey() string { + if m != nil { + return m.DisableKey + } + return "" +} + +func (m *RateLimit) GetActions() []*RateLimit_Action { + if m != nil { + return m.Actions + } + return nil +} + +type RateLimit_Action struct { + // Types that are valid to be assigned to ActionSpecifier: + // *RateLimit_Action_SourceCluster_ + // *RateLimit_Action_DestinationCluster_ + // *RateLimit_Action_RequestHeaders_ + // *RateLimit_Action_RemoteAddress_ + // *RateLimit_Action_GenericKey_ + // *RateLimit_Action_HeaderValueMatch_ + ActionSpecifier isRateLimit_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action) Reset() { *m = RateLimit_Action{} } +func (m *RateLimit_Action) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action) ProtoMessage() {} +func (*RateLimit_Action) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0} +} + +func (m *RateLimit_Action) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action.Unmarshal(m, b) +} +func (m *RateLimit_Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action.Merge(m, src) +} +func (m *RateLimit_Action) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action.Size(m) +} +func (m *RateLimit_Action) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action proto.InternalMessageInfo + +type isRateLimit_Action_ActionSpecifier interface { + isRateLimit_Action_ActionSpecifier() +} + +type RateLimit_Action_SourceCluster_ struct { + SourceCluster *RateLimit_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` +} + +type RateLimit_Action_DestinationCluster_ struct { + DestinationCluster *RateLimit_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` +} + +type RateLimit_Action_RequestHeaders_ struct { + RequestHeaders *RateLimit_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` +} + +type RateLimit_Action_RemoteAddress_ struct { + RemoteAddress *RateLimit_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` +} + +type RateLimit_Action_GenericKey_ struct { + GenericKey *RateLimit_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` +} + +type RateLimit_Action_HeaderValueMatch_ struct { + HeaderValueMatch *RateLimit_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,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 (m *RateLimit_Action) GetActionSpecifier() isRateLimit_Action_ActionSpecifier { + if m != nil { + return m.ActionSpecifier + } + return nil +} + +func (m *RateLimit_Action) GetSourceCluster() *RateLimit_Action_SourceCluster { + if x, ok := m.GetActionSpecifier().(*RateLimit_Action_SourceCluster_); ok { + return x.SourceCluster + } + return nil +} + +func (m *RateLimit_Action) GetDestinationCluster() *RateLimit_Action_DestinationCluster { + if x, ok := m.GetActionSpecifier().(*RateLimit_Action_DestinationCluster_); ok { + return x.DestinationCluster + } + return nil +} + +func (m *RateLimit_Action) GetRequestHeaders() *RateLimit_Action_RequestHeaders { + if x, ok := m.GetActionSpecifier().(*RateLimit_Action_RequestHeaders_); ok { + return x.RequestHeaders + } + return nil +} + +func (m *RateLimit_Action) GetRemoteAddress() *RateLimit_Action_RemoteAddress { + if x, ok := m.GetActionSpecifier().(*RateLimit_Action_RemoteAddress_); ok { + return x.RemoteAddress + } + return nil +} + +func (m *RateLimit_Action) GetGenericKey() *RateLimit_Action_GenericKey { + if x, ok := m.GetActionSpecifier().(*RateLimit_Action_GenericKey_); ok { + return x.GenericKey + } + return nil +} + +func (m *RateLimit_Action) GetHeaderValueMatch() *RateLimit_Action_HeaderValueMatch { + if x, ok := m.GetActionSpecifier().(*RateLimit_Action_HeaderValueMatch_); ok { + return x.HeaderValueMatch + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RateLimit_Action) XXX_OneofWrappers() []interface{} { + return []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), + } +} + +type RateLimit_Action_SourceCluster struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action_SourceCluster) Reset() { *m = RateLimit_Action_SourceCluster{} } +func (m *RateLimit_Action_SourceCluster) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action_SourceCluster) ProtoMessage() {} +func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0, 0} +} + +func (m *RateLimit_Action_SourceCluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action_SourceCluster.Unmarshal(m, b) +} +func (m *RateLimit_Action_SourceCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action_SourceCluster.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action_SourceCluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action_SourceCluster.Merge(m, src) +} +func (m *RateLimit_Action_SourceCluster) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action_SourceCluster.Size(m) +} +func (m *RateLimit_Action_SourceCluster) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action_SourceCluster.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action_SourceCluster proto.InternalMessageInfo + +type RateLimit_Action_DestinationCluster struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action_DestinationCluster) Reset() { *m = RateLimit_Action_DestinationCluster{} } +func (m *RateLimit_Action_DestinationCluster) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action_DestinationCluster) ProtoMessage() {} +func (*RateLimit_Action_DestinationCluster) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0, 1} +} + +func (m *RateLimit_Action_DestinationCluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action_DestinationCluster.Unmarshal(m, b) +} +func (m *RateLimit_Action_DestinationCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action_DestinationCluster.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action_DestinationCluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action_DestinationCluster.Merge(m, src) +} +func (m *RateLimit_Action_DestinationCluster) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action_DestinationCluster.Size(m) +} +func (m *RateLimit_Action_DestinationCluster) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action_DestinationCluster.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action_DestinationCluster proto.InternalMessageInfo + +type RateLimit_Action_RequestHeaders struct { + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` + DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action_RequestHeaders) Reset() { *m = RateLimit_Action_RequestHeaders{} } +func (m *RateLimit_Action_RequestHeaders) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action_RequestHeaders) ProtoMessage() {} +func (*RateLimit_Action_RequestHeaders) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0, 2} +} + +func (m *RateLimit_Action_RequestHeaders) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action_RequestHeaders.Unmarshal(m, b) +} +func (m *RateLimit_Action_RequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action_RequestHeaders.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action_RequestHeaders) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action_RequestHeaders.Merge(m, src) +} +func (m *RateLimit_Action_RequestHeaders) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action_RequestHeaders.Size(m) +} +func (m *RateLimit_Action_RequestHeaders) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action_RequestHeaders.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action_RequestHeaders proto.InternalMessageInfo + +func (m *RateLimit_Action_RequestHeaders) GetHeaderName() string { + if m != nil { + return m.HeaderName + } + return "" +} + +func (m *RateLimit_Action_RequestHeaders) GetDescriptorKey() string { + if m != nil { + return m.DescriptorKey + } + return "" +} + +type RateLimit_Action_RemoteAddress struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action_RemoteAddress) Reset() { *m = RateLimit_Action_RemoteAddress{} } +func (m *RateLimit_Action_RemoteAddress) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action_RemoteAddress) ProtoMessage() {} +func (*RateLimit_Action_RemoteAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0, 3} +} + +func (m *RateLimit_Action_RemoteAddress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action_RemoteAddress.Unmarshal(m, b) +} +func (m *RateLimit_Action_RemoteAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action_RemoteAddress.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action_RemoteAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action_RemoteAddress.Merge(m, src) +} +func (m *RateLimit_Action_RemoteAddress) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action_RemoteAddress.Size(m) +} +func (m *RateLimit_Action_RemoteAddress) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action_RemoteAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action_RemoteAddress proto.InternalMessageInfo + +type RateLimit_Action_GenericKey struct { + DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action_GenericKey) Reset() { *m = RateLimit_Action_GenericKey{} } +func (m *RateLimit_Action_GenericKey) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action_GenericKey) ProtoMessage() {} +func (*RateLimit_Action_GenericKey) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0, 4} +} + +func (m *RateLimit_Action_GenericKey) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action_GenericKey.Unmarshal(m, b) +} +func (m *RateLimit_Action_GenericKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action_GenericKey.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action_GenericKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action_GenericKey.Merge(m, src) +} +func (m *RateLimit_Action_GenericKey) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action_GenericKey.Size(m) +} +func (m *RateLimit_Action_GenericKey) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action_GenericKey.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action_GenericKey proto.InternalMessageInfo + +func (m *RateLimit_Action_GenericKey) GetDescriptorValue() string { + if m != nil { + return m.DescriptorValue + } + return "" +} + +type RateLimit_Action_HeaderValueMatch struct { + DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` + ExpectMatch *wrappers.BoolValue `protobuf:"bytes,2,opt,name=expect_match,json=expectMatch,proto3" json:"expect_match,omitempty"` + Headers []*HeaderMatcher `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimit_Action_HeaderValueMatch) Reset() { *m = RateLimit_Action_HeaderValueMatch{} } +func (m *RateLimit_Action_HeaderValueMatch) String() string { return proto.CompactTextString(m) } +func (*RateLimit_Action_HeaderValueMatch) ProtoMessage() {} +func (*RateLimit_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{14, 0, 5} +} + +func (m *RateLimit_Action_HeaderValueMatch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimit_Action_HeaderValueMatch.Unmarshal(m, b) +} +func (m *RateLimit_Action_HeaderValueMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimit_Action_HeaderValueMatch.Marshal(b, m, deterministic) +} +func (m *RateLimit_Action_HeaderValueMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimit_Action_HeaderValueMatch.Merge(m, src) +} +func (m *RateLimit_Action_HeaderValueMatch) XXX_Size() int { + return xxx_messageInfo_RateLimit_Action_HeaderValueMatch.Size(m) +} +func (m *RateLimit_Action_HeaderValueMatch) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimit_Action_HeaderValueMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimit_Action_HeaderValueMatch proto.InternalMessageInfo + +func (m *RateLimit_Action_HeaderValueMatch) GetDescriptorValue() string { + if m != nil { + return m.DescriptorValue + } + return "" +} + +func (m *RateLimit_Action_HeaderValueMatch) GetExpectMatch() *wrappers.BoolValue { + if m != nil { + return m.ExpectMatch + } + return nil +} + +func (m *RateLimit_Action_HeaderValueMatch) GetHeaders() []*HeaderMatcher { + if m != nil { + return m.Headers + } + return nil +} + +type HeaderMatcher struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to HeaderMatchSpecifier: + // *HeaderMatcher_ExactMatch + // *HeaderMatcher_RegexMatch + // *HeaderMatcher_SafeRegexMatch + // *HeaderMatcher_RangeMatch + // *HeaderMatcher_PresentMatch + // *HeaderMatcher_PrefixMatch + // *HeaderMatcher_SuffixMatch + HeaderMatchSpecifier isHeaderMatcher_HeaderMatchSpecifier `protobuf_oneof:"header_match_specifier"` + InvertMatch bool `protobuf:"varint,8,opt,name=invert_match,json=invertMatch,proto3" json:"invert_match,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeaderMatcher) Reset() { *m = HeaderMatcher{} } +func (m *HeaderMatcher) String() string { return proto.CompactTextString(m) } +func (*HeaderMatcher) ProtoMessage() {} +func (*HeaderMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{15} +} + +func (m *HeaderMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HeaderMatcher.Unmarshal(m, b) +} +func (m *HeaderMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HeaderMatcher.Marshal(b, m, deterministic) +} +func (m *HeaderMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeaderMatcher.Merge(m, src) +} +func (m *HeaderMatcher) XXX_Size() int { + return xxx_messageInfo_HeaderMatcher.Size(m) +} +func (m *HeaderMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_HeaderMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_HeaderMatcher proto.InternalMessageInfo + +func (m *HeaderMatcher) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isHeaderMatcher_HeaderMatchSpecifier interface { + isHeaderMatcher_HeaderMatchSpecifier() +} + +type HeaderMatcher_ExactMatch struct { + ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` +} + +type HeaderMatcher_RegexMatch struct { + RegexMatch string `protobuf:"bytes,5,opt,name=regex_match,json=regexMatch,proto3,oneof"` +} + +type HeaderMatcher_SafeRegexMatch struct { + SafeRegexMatch *matcher.RegexMatcher `protobuf:"bytes,11,opt,name=safe_regex_match,json=safeRegexMatch,proto3,oneof"` +} + +type HeaderMatcher_RangeMatch struct { + RangeMatch *_type.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` +} + +type HeaderMatcher_PresentMatch struct { + PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3,oneof"` +} + +type HeaderMatcher_PrefixMatch struct { + PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3,oneof"` +} + +type HeaderMatcher_SuffixMatch struct { + SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3,oneof"` +} + +func (*HeaderMatcher_ExactMatch) isHeaderMatcher_HeaderMatchSpecifier() {} + +func (*HeaderMatcher_RegexMatch) 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 (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier { + if m != nil { + return m.HeaderMatchSpecifier + } + return nil +} + +func (m *HeaderMatcher) GetExactMatch() string { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_ExactMatch); ok { + return x.ExactMatch + } + return "" +} + +// Deprecated: Do not use. +func (m *HeaderMatcher) GetRegexMatch() string { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_RegexMatch); ok { + return x.RegexMatch + } + return "" +} + +func (m *HeaderMatcher) GetSafeRegexMatch() *matcher.RegexMatcher { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_SafeRegexMatch); ok { + return x.SafeRegexMatch + } + return nil +} + +func (m *HeaderMatcher) GetRangeMatch() *_type.Int64Range { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_RangeMatch); ok { + return x.RangeMatch + } + return nil +} + +func (m *HeaderMatcher) GetPresentMatch() bool { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_PresentMatch); ok { + return x.PresentMatch + } + return false +} + +func (m *HeaderMatcher) GetPrefixMatch() string { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_PrefixMatch); ok { + return x.PrefixMatch + } + return "" +} + +func (m *HeaderMatcher) GetSuffixMatch() string { + if x, ok := m.GetHeaderMatchSpecifier().(*HeaderMatcher_SuffixMatch); ok { + return x.SuffixMatch + } + return "" +} + +func (m *HeaderMatcher) GetInvertMatch() bool { + if m != nil { + return m.InvertMatch + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HeaderMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HeaderMatcher_ExactMatch)(nil), + (*HeaderMatcher_RegexMatch)(nil), + (*HeaderMatcher_SafeRegexMatch)(nil), + (*HeaderMatcher_RangeMatch)(nil), + (*HeaderMatcher_PresentMatch)(nil), + (*HeaderMatcher_PrefixMatch)(nil), + (*HeaderMatcher_SuffixMatch)(nil), + } +} + +type QueryParameterMatcher struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // Deprecated: Do not use. + Regex *wrappers.BoolValue `protobuf:"bytes,4,opt,name=regex,proto3" json:"regex,omitempty"` // Deprecated: Do not use. + // Types that are valid to be assigned to QueryParameterMatchSpecifier: + // *QueryParameterMatcher_StringMatch + // *QueryParameterMatcher_PresentMatch + QueryParameterMatchSpecifier isQueryParameterMatcher_QueryParameterMatchSpecifier `protobuf_oneof:"query_parameter_match_specifier"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryParameterMatcher) Reset() { *m = QueryParameterMatcher{} } +func (m *QueryParameterMatcher) String() string { return proto.CompactTextString(m) } +func (*QueryParameterMatcher) ProtoMessage() {} +func (*QueryParameterMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_a23c550601a0f392, []int{16} +} + +func (m *QueryParameterMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryParameterMatcher.Unmarshal(m, b) +} +func (m *QueryParameterMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryParameterMatcher.Marshal(b, m, deterministic) +} +func (m *QueryParameterMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParameterMatcher.Merge(m, src) +} +func (m *QueryParameterMatcher) XXX_Size() int { + return xxx_messageInfo_QueryParameterMatcher.Size(m) +} +func (m *QueryParameterMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParameterMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParameterMatcher proto.InternalMessageInfo + +func (m *QueryParameterMatcher) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Deprecated: Do not use. +func (m *QueryParameterMatcher) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// Deprecated: Do not use. +func (m *QueryParameterMatcher) GetRegex() *wrappers.BoolValue { + if m != nil { + return m.Regex + } + return nil +} + +type isQueryParameterMatcher_QueryParameterMatchSpecifier interface { + isQueryParameterMatcher_QueryParameterMatchSpecifier() +} + +type QueryParameterMatcher_StringMatch struct { + StringMatch *matcher.StringMatcher `protobuf:"bytes,5,opt,name=string_match,json=stringMatch,proto3,oneof"` +} + +type QueryParameterMatcher_PresentMatch struct { + PresentMatch bool `protobuf:"varint,6,opt,name=present_match,json=presentMatch,proto3,oneof"` +} + +func (*QueryParameterMatcher_StringMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} + +func (*QueryParameterMatcher_PresentMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} + +func (m *QueryParameterMatcher) GetQueryParameterMatchSpecifier() isQueryParameterMatcher_QueryParameterMatchSpecifier { + if m != nil { + return m.QueryParameterMatchSpecifier + } + return nil +} + +func (m *QueryParameterMatcher) GetStringMatch() *matcher.StringMatcher { + if x, ok := m.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_StringMatch); ok { + return x.StringMatch + } + return nil +} + +func (m *QueryParameterMatcher) GetPresentMatch() bool { + if x, ok := m.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_PresentMatch); ok { + return x.PresentMatch + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*QueryParameterMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*QueryParameterMatcher_StringMatch)(nil), + (*QueryParameterMatcher_PresentMatch)(nil), + } +} + +func init() { + proto.RegisterEnum("envoy.api.v2.route.VirtualHost_TlsRequirementType", VirtualHost_TlsRequirementType_name, VirtualHost_TlsRequirementType_value) + proto.RegisterEnum("envoy.api.v2.route.RouteAction_ClusterNotFoundResponseCode", RouteAction_ClusterNotFoundResponseCode_name, RouteAction_ClusterNotFoundResponseCode_value) + proto.RegisterEnum("envoy.api.v2.route.RouteAction_InternalRedirectAction", RouteAction_InternalRedirectAction_name, RouteAction_InternalRedirectAction_value) + proto.RegisterEnum("envoy.api.v2.route.RedirectAction_RedirectResponseCode", RedirectAction_RedirectResponseCode_name, RedirectAction_RedirectResponseCode_value) + proto.RegisterType((*VirtualHost)(nil), "envoy.api.v2.route.VirtualHost") + proto.RegisterMapType((map[string]*_struct.Struct)(nil), "envoy.api.v2.route.VirtualHost.PerFilterConfigEntry") + proto.RegisterMapType((map[string]*any.Any)(nil), "envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry") + proto.RegisterType((*FilterAction)(nil), "envoy.api.v2.route.FilterAction") + proto.RegisterType((*Route)(nil), "envoy.api.v2.route.Route") + proto.RegisterMapType((map[string]*_struct.Struct)(nil), "envoy.api.v2.route.Route.PerFilterConfigEntry") + proto.RegisterMapType((map[string]*any.Any)(nil), "envoy.api.v2.route.Route.TypedPerFilterConfigEntry") + proto.RegisterType((*WeightedCluster)(nil), "envoy.api.v2.route.WeightedCluster") + proto.RegisterType((*WeightedCluster_ClusterWeight)(nil), "envoy.api.v2.route.WeightedCluster.ClusterWeight") + proto.RegisterMapType((map[string]*_struct.Struct)(nil), "envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry") + proto.RegisterMapType((map[string]*any.Any)(nil), "envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry") + proto.RegisterType((*RouteMatch)(nil), "envoy.api.v2.route.RouteMatch") + proto.RegisterType((*RouteMatch_GrpcRouteMatchOptions)(nil), "envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions") + proto.RegisterType((*RouteMatch_TlsContextMatchOptions)(nil), "envoy.api.v2.route.RouteMatch.TlsContextMatchOptions") + proto.RegisterType((*CorsPolicy)(nil), "envoy.api.v2.route.CorsPolicy") + proto.RegisterType((*RouteAction)(nil), "envoy.api.v2.route.RouteAction") + proto.RegisterType((*RouteAction_RequestMirrorPolicy)(nil), "envoy.api.v2.route.RouteAction.RequestMirrorPolicy") + proto.RegisterType((*RouteAction_HashPolicy)(nil), "envoy.api.v2.route.RouteAction.HashPolicy") + proto.RegisterType((*RouteAction_HashPolicy_Header)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.Header") + proto.RegisterType((*RouteAction_HashPolicy_Cookie)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.Cookie") + proto.RegisterType((*RouteAction_HashPolicy_ConnectionProperties)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties") + proto.RegisterType((*RouteAction_HashPolicy_QueryParameter)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter") + proto.RegisterType((*RouteAction_HashPolicy_FilterState)(nil), "envoy.api.v2.route.RouteAction.HashPolicy.FilterState") + proto.RegisterType((*RouteAction_UpgradeConfig)(nil), "envoy.api.v2.route.RouteAction.UpgradeConfig") + proto.RegisterType((*RetryPolicy)(nil), "envoy.api.v2.route.RetryPolicy") + proto.RegisterType((*RetryPolicy_RetryPriority)(nil), "envoy.api.v2.route.RetryPolicy.RetryPriority") + proto.RegisterType((*RetryPolicy_RetryHostPredicate)(nil), "envoy.api.v2.route.RetryPolicy.RetryHostPredicate") + proto.RegisterType((*RetryPolicy_RetryBackOff)(nil), "envoy.api.v2.route.RetryPolicy.RetryBackOff") + proto.RegisterType((*HedgePolicy)(nil), "envoy.api.v2.route.HedgePolicy") + proto.RegisterType((*RedirectAction)(nil), "envoy.api.v2.route.RedirectAction") + proto.RegisterType((*DirectResponseAction)(nil), "envoy.api.v2.route.DirectResponseAction") + proto.RegisterType((*Decorator)(nil), "envoy.api.v2.route.Decorator") + proto.RegisterType((*Tracing)(nil), "envoy.api.v2.route.Tracing") + proto.RegisterType((*VirtualCluster)(nil), "envoy.api.v2.route.VirtualCluster") + proto.RegisterType((*RateLimit)(nil), "envoy.api.v2.route.RateLimit") + proto.RegisterType((*RateLimit_Action)(nil), "envoy.api.v2.route.RateLimit.Action") + proto.RegisterType((*RateLimit_Action_SourceCluster)(nil), "envoy.api.v2.route.RateLimit.Action.SourceCluster") + proto.RegisterType((*RateLimit_Action_DestinationCluster)(nil), "envoy.api.v2.route.RateLimit.Action.DestinationCluster") + proto.RegisterType((*RateLimit_Action_RequestHeaders)(nil), "envoy.api.v2.route.RateLimit.Action.RequestHeaders") + proto.RegisterType((*RateLimit_Action_RemoteAddress)(nil), "envoy.api.v2.route.RateLimit.Action.RemoteAddress") + proto.RegisterType((*RateLimit_Action_GenericKey)(nil), "envoy.api.v2.route.RateLimit.Action.GenericKey") + proto.RegisterType((*RateLimit_Action_HeaderValueMatch)(nil), "envoy.api.v2.route.RateLimit.Action.HeaderValueMatch") + proto.RegisterType((*HeaderMatcher)(nil), "envoy.api.v2.route.HeaderMatcher") + proto.RegisterType((*QueryParameterMatcher)(nil), "envoy.api.v2.route.QueryParameterMatcher") +} + +func init() { + proto.RegisterFile("envoy/api/v2/route/route_components.proto", fileDescriptor_a23c550601a0f392) +} + +var fileDescriptor_a23c550601a0f392 = []byte{ + // 4549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0x4b, 0x70, 0x24, 0x47, + 0x5a, 0x56, 0xa9, 0x5b, 0xfd, 0xf8, 0xfb, 0xa1, 0x52, 0xea, 0xd5, 0xd3, 0xe3, 0x99, 0xd1, 0xb4, + 0xd7, 0xbb, 0xf2, 0xd8, 0x96, 0xb0, 0x66, 0xfc, 0x5e, 0xef, 0x5a, 0xa5, 0xd1, 0xb8, 0xa5, 0xd1, + 0x48, 0x22, 0xa5, 0x99, 0xc5, 0x18, 0x6f, 0x51, 0xd3, 0x95, 0x6a, 0xd5, 0x4e, 0x77, 0x55, 0x39, + 0x2b, 0x5b, 0x23, 0xdd, 0x1c, 0x7b, 0x04, 0x22, 0x00, 0x9f, 0xb8, 0x70, 0xe1, 0xc0, 0xc1, 0x04, + 0x41, 0x04, 0x27, 0x82, 0xd3, 0x9e, 0x08, 0x1f, 0xb8, 0x00, 0x17, 0x82, 0x08, 0x82, 0x1b, 0xc1, + 0x89, 0x83, 0xb9, 0x10, 0x03, 0x41, 0x10, 0xf9, 0xa8, 0x57, 0x77, 0x49, 0x2d, 0x39, 0x36, 0x1c, + 0x6c, 0x70, 0xb1, 0x55, 0x99, 0xdf, 0xff, 0x65, 0x76, 0x66, 0xfe, 0xcf, 0xcc, 0x81, 0x57, 0x89, + 0x7b, 0xe2, 0x9d, 0xad, 0x5a, 0xbe, 0xb3, 0x7a, 0xb2, 0xb6, 0x4a, 0xbd, 0x01, 0x23, 0xf2, 0xbf, + 0x66, 0xc7, 0xeb, 0xfb, 0x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xf4, 0xdb, 0x70, + 0x93, 0xef, 0x68, 0xb8, 0xc2, 0x4f, 0x07, 0x47, 0x47, 0x84, 0x4a, 0x2b, 0x60, 0x3e, 0x3d, 0xe3, + 0x06, 0x0f, 0x09, 0xd6, 0x97, 0x46, 0x66, 0xf6, 0x78, 0xcb, 0x65, 0x77, 0xd7, 0x84, 0x6e, 0xe0, + 0xa6, 0x4f, 0xa8, 0xda, 0x00, 0x43, 0x30, 0x08, 0xab, 0x60, 0x70, 0xf9, 0xe6, 0xa7, 0x30, 0x97, + 0xb5, 0xeb, 0x48, 0x87, 0xdc, 0x33, 0x72, 0x26, 0x8d, 0x33, 0xe6, 0x7f, 0xa2, 0x37, 0x60, 0xea, + 0x84, 0xd3, 0x35, 0x26, 0xc5, 0x90, 0x8b, 0x23, 0x43, 0x1e, 0x08, 0x57, 0x84, 0x25, 0xea, 0xfd, + 0xc9, 0x77, 0xb5, 0xe6, 0x67, 0x70, 0xed, 0xdc, 0x73, 0x95, 0x31, 0xc2, 0x9d, 0xf4, 0x08, 0xd9, + 0xcb, 0x1d, 0xd3, 0xb7, 0xde, 0x07, 0x34, 0x6a, 0x90, 0x51, 0x09, 0xf2, 0xbb, 0x7b, 0xbb, 0x9b, + 0xfa, 0x04, 0x9a, 0x81, 0xda, 0xe6, 0x6f, 0x1c, 0x6e, 0xe2, 0xdd, 0xf5, 0x1d, 0x73, 0x6f, 0x77, + 0xe7, 0x13, 0x5d, 0x43, 0x45, 0xc8, 0xad, 0xef, 0xec, 0xe8, 0x93, 0xdb, 0xf9, 0x52, 0x59, 0x87, + 0xd6, 0x0f, 0xa1, 0x2a, 0x27, 0xb6, 0xde, 0xe1, 0xf6, 0x03, 0xbd, 0x0e, 0x05, 0x4b, 0xfc, 0x25, + 0xa6, 0x75, 0xde, 0x14, 0x14, 0xa6, 0xf5, 0xaf, 0x00, 0x53, 0xc2, 0xab, 0x20, 0xa4, 0x7c, 0x59, + 0x5d, 0xfc, 0x18, 0xe9, 0xc2, 0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xc3, 0x81, 0xb7, 0xa0, + 0xa8, 0xa2, 0xfc, 0xc6, 0x74, 0xd6, 0x31, 0x94, 0x3b, 0x74, 0x28, 0x21, 0x38, 0xc4, 0x5e, 0xc2, + 0xa6, 0xeb, 0xff, 0x7f, 0x6d, 0xba, 0x51, 0x0b, 0x2d, 0x30, 0xca, 0xfd, 0xa7, 0xa1, 0x6d, 0xe7, + 0x4b, 0x05, 0xbd, 0xd8, 0xfa, 0x83, 0x32, 0x4c, 0xff, 0x84, 0x38, 0xdd, 0x63, 0x46, 0x6c, 0x15, + 0x13, 0xa3, 0x9f, 0x40, 0x29, 0x8a, 0xac, 0x35, 0x71, 0x26, 0xde, 0xcc, 0x5a, 0xfe, 0x21, 0xb1, + 0x15, 0xf5, 0x7f, 0xd9, 0x2c, 0x8c, 0xee, 0x97, 0xda, 0x64, 0x49, 0xc3, 0x11, 0x19, 0x6a, 0x43, + 0x95, 0x79, 0xcc, 0xea, 0x99, 0xcf, 0x05, 0x46, 0x99, 0xd0, 0x0b, 0x77, 0x43, 0x64, 0x2f, 0x77, + 0x26, 0x97, 0x35, 0x5c, 0x11, 0xa2, 0x92, 0x1d, 0xbd, 0x0e, 0x88, 0x0e, 0x5c, 0xe6, 0xf4, 0x89, + 0xf9, 0x8c, 0x9c, 0x99, 0x3e, 0x25, 0x47, 0xce, 0xa9, 0x58, 0x88, 0x32, 0xd6, 0x55, 0xcf, 0x43, + 0x72, 0xb6, 0x2f, 0xda, 0x9b, 0x7f, 0x56, 0x84, 0x5a, 0x6a, 0x76, 0x17, 0x67, 0x48, 0xf7, 0xa0, + 0xa0, 0x26, 0x38, 0x79, 0x89, 0xe3, 0xa2, 0xb0, 0xc8, 0x80, 0x7a, 0x68, 0x0e, 0x4d, 0xe9, 0x9d, + 0x72, 0xe3, 0x2d, 0x68, 0x2d, 0x14, 0x11, 0x9e, 0xea, 0x02, 0xeb, 0x91, 0xff, 0xae, 0xac, 0x47, + 0xf9, 0xdb, 0x5a, 0x8f, 0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0x48, 0x7e, 0x06, 0xc8, 0x87, 0x86, 0xe3, 0x32, 0x42, + 0x5d, 0xab, 0x67, 0x86, 0x95, 0xe6, 0xb0, 0x14, 0xdc, 0x14, 0x67, 0xea, 0xed, 0x71, 0x03, 0x6c, + 0x29, 0xf9, 0x74, 0xe9, 0x1a, 0x2f, 0x38, 0x99, 0xed, 0x08, 0xc3, 0x02, 0x5f, 0xd9, 0x91, 0x51, + 0x83, 0xc6, 0xad, 0x4b, 0x94, 0x4c, 0xe6, 0xfa, 0xd6, 0xe9, 0xf0, 0x80, 0xc1, 0xc8, 0xad, 0xce, + 0xf5, 0xab, 0xdf, 0xea, 0x34, 0xff, 0x5b, 0x83, 0xd9, 0x0c, 0xe5, 0x43, 0xb7, 0xcf, 0x8b, 0x25, + 0xe2, 0x48, 0xe2, 0x55, 0xa8, 0x24, 0x4a, 0x4a, 0x2a, 0x8c, 0x88, 0x63, 0x63, 0x88, 0xab, 0x4a, + 0x99, 0x89, 0x5a, 0xee, 0x97, 0x90, 0xa8, 0xfd, 0x18, 0x6a, 0x8c, 0x5a, 0x1d, 0x62, 0x06, 0x56, + 0xdf, 0xe7, 0x91, 0xd6, 0xf8, 0x14, 0xb2, 0x2a, 0x04, 0x0e, 0x24, 0xbe, 0xf9, 0x37, 0x05, 0x80, + 0x58, 0x7f, 0xd0, 0x43, 0x28, 0x28, 0x77, 0x24, 0x93, 0x91, 0x37, 0x2f, 0xaf, 0x7b, 0x2a, 0x1d, + 0xe4, 0xd9, 0xb6, 0xa4, 0xe0, 0x64, 0x1d, 0xcf, 0x7b, 0xe6, 0x84, 0xd9, 0xfc, 0x55, 0xc8, 0x36, + 0x84, 0x20, 0x27, 0x93, 0x14, 0xe8, 0x04, 0xe6, 0x3b, 0x9e, 0xeb, 0x12, 0x81, 0x34, 0x7d, 0xea, + 0xf9, 0x84, 0x32, 0x87, 0x84, 0x21, 0xd8, 0x8f, 0xaf, 0xc4, 0x1d, 0xf2, 0xec, 0x47, 0x34, 0xed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x7d, 0x08, 0x15, 0x77, 0xd0, 0x37, + 0xf9, 0x27, 0x37, 0x19, 0x97, 0x29, 0xd2, 0x83, 0x3b, 0xe8, 0x63, 0x89, 0x47, 0xeb, 0x30, 0xed, + 0x13, 0x6a, 0x72, 0xee, 0x30, 0x28, 0xc8, 0x8d, 0x3b, 0xcf, 0x35, 0x9f, 0xd0, 0x43, 0x7a, 0x16, + 0xc6, 0x04, 0x87, 0x50, 0x57, 0xf1, 0x6d, 0x18, 0xba, 0x49, 0x4b, 0xfd, 0xc6, 0x98, 0x28, 0x59, + 0xfd, 0xad, 0x84, 0x70, 0x8d, 0x26, 0x3f, 0x91, 0x0d, 0x73, 0x92, 0x55, 0x2c, 0xa3, 0xcf, 0x7d, + 0x6a, 0xc7, 0x12, 0x39, 0x17, 0x8f, 0x11, 0xd6, 0x2e, 0xc5, 0xcd, 0x53, 0x88, 0xfd, 0x50, 0x12, + 0x23, 0x3a, 0xd2, 0x86, 0xda, 0x70, 0x5b, 0xf0, 0x07, 0xa4, 0xa7, 0xcc, 0xaf, 0x1c, 0x54, 0x94, + 0x37, 0xe4, 0x23, 0x10, 0x59, 0xc0, 0xc8, 0xe1, 0x1b, 0x1c, 0x78, 0x10, 0xe2, 0x04, 0xff, 0x23, + 0xeb, 0x54, 0xbd, 0x14, 0x09, 0xd0, 0x3d, 0x10, 0xe1, 0xba, 0xc3, 0xcf, 0xae, 0x29, 0x5f, 0xaa, + 0x89, 0x24, 0x57, 0x16, 0x08, 0x6b, 0x78, 0x2e, 0xea, 0x3d, 0x10, 0x9d, 0xfc, 0x0c, 0x07, 0x08, + 0x87, 0x6b, 0xf7, 0xd4, 0xea, 0x3c, 0xe3, 0xd1, 0x94, 0xca, 0x6c, 0x5e, 0xbf, 0xd4, 0xef, 0x33, + 0xac, 0xce, 0xb3, 0xbd, 0xa3, 0x23, 0x2c, 0x73, 0x14, 0xf5, 0x85, 0x76, 0x61, 0x26, 0x9e, 0x49, + 0x58, 0xc7, 0x29, 0x5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b, 0x62, 0x85, 0xee, 0xfe, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x23, 0xa3, 0xe0, + 0x4b, 0x33, 0x3a, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go new file mode 100644 index 0000000000..7b1d70a411 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go @@ -0,0 +1,4521 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/route/route_components.proto + +package envoy_api_v2_route + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" + + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" +) + +// 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) + _ = ptypes.DynamicAny{} + + _ = core.RoutingPriority(0) + + _ = core.RequestMethod(0) +) + +// define the regex for a UUID once up-front +var _route_components_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on VirtualHost with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *VirtualHost) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return VirtualHostValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetDomains()) < 1 { + return VirtualHostValidationError{ + field: "Domains", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetDomains() { + _, _ = idx, item + + if !_VirtualHost_Domains_Pattern.MatchString(item) { + return VirtualHostValidationError{ + field: fmt.Sprintf("Domains[%v]", idx), + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + } + + for idx, item := range m.GetRoutes() { + _, _ = idx, item + + 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 _, ok := VirtualHost_TlsRequirementType_name[int32(m.GetRequireTls())]; !ok { + return VirtualHostValidationError{ + field: "RequireTls", + reason: "value must be one of the defined enum values", + } + } + + for idx, item := range m.GetVirtualClusters() { + _, _ = idx, item + + 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 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 { + return VirtualHostValidationError{ + field: "RequestHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetRequestHeadersToAdd() { + _, _ = idx, item + + 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, + } + } + } + + } + + if len(m.GetResponseHeadersToAdd()) > 1000 { + return VirtualHostValidationError{ + field: "ResponseHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + 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, + } + } + } + + } + + 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, + } + } + } + + for key, val := range m.GetPerFilterConfig() { + _ = val + + // no validation rules for PerFilterConfig[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VirtualHostValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for key, val := range m.GetTypedPerFilterConfig() { + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + 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 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 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 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, + } + } + } + + 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, + } + } + } + + return nil +} + +// 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]*$") + +// Validate checks the field values on FilterAction with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *FilterAction) Validate() error { + if m == nil { + return nil + } + + 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, + } + } + } + + return nil +} + +// 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 Route with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Route) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + if m.GetMatch() == nil { + return RouteValidationError{ + field: "Match", + reason: "value is required", + } + } + + 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 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 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, + } + } + } + + for key, val := range m.GetPerFilterConfig() { + _ = val + + // no validation rules for PerFilterConfig[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for key, val := range m.GetTypedPerFilterConfig() { + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + 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 { + return RouteValidationError{ + field: "RequestHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetRequestHeadersToAdd() { + _, _ = idx, item + + 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, + } + } + } + + } + + if len(m.GetResponseHeadersToAdd()) > 1000 { + return RouteValidationError{ + field: "ResponseHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + 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, + } + } + } + + } + + 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 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, + } + } + } + + switch m.Action.(type) { + + case *Route_Route: + + 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, 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, 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, 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, + } + } + } + + default: + return RouteValidationError{ + field: "Action", + reason: "value is required", + } + + } + + return nil +} + +// 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{} + +// Validate checks the field values on WeightedCluster with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *WeightedCluster) Validate() error { + if m == nil { + return nil + } + + if len(m.GetClusters()) < 1 { + return WeightedClusterValidationError{ + field: "Clusters", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetClusters() { + _, _ = idx, item + + 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 wrapper := m.GetTotalWeight(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return WeightedClusterValidationError{ + field: "TotalWeight", + reason: "value must be greater than or equal to 1", + } + } + + } + + // no validation rules for RuntimeKeyPrefix + + return nil +} + +// 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{} + +// Validate checks the field values on RouteMatch with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *RouteMatch) Validate() error { + if m == nil { + return nil + } + + 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 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 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 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 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 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, + } + } + } + + switch m.PathSpecifier.(type) { + + case *RouteMatch_Prefix: + // no validation rules for Prefix + + case *RouteMatch_Path: + // no validation rules for Path + + case *RouteMatch_Regex: + + if len(m.GetRegex()) > 1024 { + return RouteMatchValidationError{ + field: "Regex", + reason: "value length must be at most 1024 bytes", + } + } + + case *RouteMatch_SafeRegex: + + if m.GetSafeRegex() == nil { + return RouteMatchValidationError{ + field: "SafeRegex", + reason: "value is required", + } + } + + 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, + } + } + } + + default: + return RouteMatchValidationError{ + field: "PathSpecifier", + reason: "value is required", + } + + } + + return nil +} + +// 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{} + +// Validate checks the field values on CorsPolicy with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *CorsPolicy) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetAllowOriginRegex() { + _, _ = idx, item + + if len(item) > 1024 { + return CorsPolicyValidationError{ + field: fmt.Sprintf("AllowOriginRegex[%v]", idx), + reason: "value length must be at most 1024 bytes", + } + } + + } + + for idx, item := range m.GetAllowOriginStringMatch() { + _, _ = idx, item + + 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 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 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, + } + } + } + + switch m.EnabledSpecifier.(type) { + + case *CorsPolicy_Enabled: + + if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CorsPolicyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *CorsPolicy_FilterEnabled: + + 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, + } + } + } + + } + + return nil +} + +// 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, an error +// is returned. +func (m *RouteAction) Validate() error { + if m == nil { + return nil + } + + if _, ok := RouteAction_ClusterNotFoundResponseCode_name[int32(m.GetClusterNotFoundResponseCode())]; !ok { + return RouteActionValidationError{ + field: "ClusterNotFoundResponseCode", + reason: "value must be one of the defined enum values", + } + } + + 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()) { + return RouteActionValidationError{ + field: "PrefixRewrite", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + 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 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 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 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 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, + } + } + } + + if v, ok := interface{}(m.GetRequestMirrorPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "RequestMirrorPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetRequestMirrorPolicies() { + _, _ = idx, item + + 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 := core.RoutingPriority_name[int32(m.GetPriority())]; !ok { + return RouteActionValidationError{ + field: "Priority", + reason: "value must be one of the defined enum values", + } + } + + for idx, item := range m.GetRateLimits() { + _, _ = idx, item + + 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 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 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 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 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 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 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, + } + } + } + + } + + // no validation rules for InternalRedirectAction + + 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 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, + } + } + } + + switch m.ClusterSpecifier.(type) { + + case *RouteAction_Cluster: + + if len(m.GetCluster()) < 1 { + return RouteActionValidationError{ + field: "Cluster", + reason: "value length must be at least 1 bytes", + } + } + + case *RouteAction_ClusterHeader: + + if len(m.GetClusterHeader()) < 1 { + return RouteActionValidationError{ + field: "ClusterHeader", + reason: "value length must be at least 1 bytes", + } + } + + if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { + return RouteActionValidationError{ + field: "ClusterHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + case *RouteAction_WeightedClusters: + + 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, + } + } + } + + default: + return RouteActionValidationError{ + field: "ClusterSpecifier", + reason: "value is required", + } + + } + + switch m.HostRewriteSpecifier.(type) { + + case *RouteAction_HostRewrite: + + if !_RouteAction_HostRewrite_Pattern.MatchString(m.GetHostRewrite()) { + return RouteActionValidationError{ + field: "HostRewrite", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + case *RouteAction_AutoHostRewrite: + + 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_AutoHostRewriteHeader: + + if !_RouteAction_AutoHostRewriteHeader_Pattern.MatchString(m.GetAutoHostRewriteHeader()) { + return RouteActionValidationError{ + field: "AutoHostRewriteHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + } + + return nil +} + +// 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_HostRewrite_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +var _RouteAction_AutoHostRewriteHeader_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, an error +// is returned. +func (m *RetryPolicy) Validate() error { + if m == nil { + return nil + } + + // no validation rules for RetryOn + + 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 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 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 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, + } + } + } + + } + + // no validation rules for HostSelectionRetryMaxAttempts + + 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, + } + } + } + + for idx, item := range m.GetRetriableHeaders() { + _, _ = idx, item + + 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 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, + } + } + } + + } + + return nil +} + +// 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, an error +// is returned. +func (m *HedgePolicy) Validate() error { + if m == nil { + return nil + } + + if wrapper := m.GetInitialRequests(); wrapper != nil { + + if wrapper.GetValue() < 1 { + return HedgePolicyValidationError{ + field: "InitialRequests", + reason: "value must be greater than or equal to 1", + } + } + + } + + 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 + + return nil +} + +// 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, an error +// is returned. +func (m *RedirectAction) Validate() error { + if m == nil { + return nil + } + + if !_RedirectAction_HostRedirect_Pattern.MatchString(m.GetHostRedirect()) { + return RedirectActionValidationError{ + field: "HostRedirect", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + // no validation rules for PortRedirect + + if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { + return RedirectActionValidationError{ + field: "ResponseCode", + reason: "value must be one of the defined enum values", + } + } + + // no validation rules for StripQuery + + switch m.SchemeRewriteSpecifier.(type) { + + case *RedirectAction_HttpsRedirect: + // no validation rules for HttpsRedirect + + case *RedirectAction_SchemeRedirect: + // no validation rules for SchemeRedirect + + } + + switch m.PathRewriteSpecifier.(type) { + + case *RedirectAction_PathRedirect: + + if !_RedirectAction_PathRedirect_Pattern.MatchString(m.GetPathRedirect()) { + return RedirectActionValidationError{ + field: "PathRedirect", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + case *RedirectAction_PrefixRewrite: + + if !_RedirectAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { + return RedirectActionValidationError{ + field: "PrefixRewrite", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + } + + return nil +} + +// 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, an error is returned. +func (m *DirectResponseAction) Validate() error { + if m == nil { + return nil + } + + if val := m.GetStatus(); val < 100 || val >= 600 { + return DirectResponseActionValidationError{ + field: "Status", + reason: "value must be inside range [100, 600)", + } + } + + 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, + } + } + } + + return nil +} + +// 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 Decorator with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Decorator) Validate() error { + if m == nil { + return nil + } + + if len(m.GetOperation()) < 1 { + return DecoratorValidationError{ + field: "Operation", + reason: "value length must be at least 1 bytes", + } + } + + 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, + } + } + } + + return nil +} + +// 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, an error is returned. +func (m *Tracing) Validate() error { + if m == nil { + return nil + } + + 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 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 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 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, + } + } + } + + } + + return nil +} + +// 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, an error +// is returned. +func (m *VirtualCluster) Validate() error { + if m == nil { + return nil + } + + if len(m.GetPattern()) > 1024 { + return VirtualClusterValidationError{ + field: "Pattern", + reason: "value length must be at most 1024 bytes", + } + } + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + 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 len(m.GetName()) < 1 { + return VirtualClusterValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for Method + + return nil +} + +// 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, an error is returned. +func (m *RateLimit) Validate() error { + if m == nil { + return nil + } + + if wrapper := m.GetStage(); wrapper != nil { + + if wrapper.GetValue() > 10 { + return RateLimitValidationError{ + field: "Stage", + reason: "value must be less than or equal to 10", + } + } + + } + + // no validation rules for DisableKey + + if len(m.GetActions()) < 1 { + return RateLimitValidationError{ + field: "Actions", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetActions() { + _, _ = idx, item + + 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, + } + } + } + + } + + return nil +} + +// 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, an error +// is returned. +func (m *HeaderMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return HeaderMatcherValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if !_HeaderMatcher_Name_Pattern.MatchString(m.GetName()) { + return HeaderMatcherValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + // no validation rules for InvertMatch + + switch m.HeaderMatchSpecifier.(type) { + + case *HeaderMatcher_ExactMatch: + // no validation rules for ExactMatch + + case *HeaderMatcher_RegexMatch: + + if len(m.GetRegexMatch()) > 1024 { + return HeaderMatcherValidationError{ + field: "RegexMatch", + reason: "value length must be at most 1024 bytes", + } + } + + case *HeaderMatcher_SafeRegexMatch: + + 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, 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: + // no validation rules for PresentMatch + + case *HeaderMatcher_PrefixMatch: + + if len(m.GetPrefixMatch()) < 1 { + return HeaderMatcherValidationError{ + field: "PrefixMatch", + reason: "value length must be at least 1 bytes", + } + } + + case *HeaderMatcher_SuffixMatch: + + if len(m.GetSuffixMatch()) < 1 { + return HeaderMatcherValidationError{ + field: "SuffixMatch", + reason: "value length must be at least 1 bytes", + } + } + + } + + return nil +} + +// 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, an error is returned. +func (m *QueryParameterMatcher) Validate() error { + if m == nil { + return nil + } + + if l := len(m.GetName()); l < 1 || l > 1024 { + return QueryParameterMatcherValidationError{ + field: "Name", + reason: "value length must be between 1 and 1024 bytes, inclusive", + } + } + + // no validation rules for Value + + if v, ok := interface{}(m.GetRegex()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QueryParameterMatcherValidationError{ + field: "Regex", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.QueryParameterMatchSpecifier.(type) { + + case *QueryParameterMatcher_StringMatch: + + if m.GetStringMatch() == nil { + return QueryParameterMatcherValidationError{ + field: "StringMatch", + reason: "value is required", + } + } + + 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: + // no validation rules for PresentMatch + + } + + return nil +} + +// 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 WeightedCluster_ClusterWeight with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *WeightedCluster_ClusterWeight) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return WeightedCluster_ClusterWeightValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + 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 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 { + return WeightedCluster_ClusterWeightValidationError{ + field: "RequestHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetRequestHeadersToAdd() { + _, _ = idx, item + + 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, + } + } + } + + } + + if len(m.GetResponseHeadersToAdd()) > 1000 { + return WeightedCluster_ClusterWeightValidationError{ + field: "ResponseHeadersToAdd", + reason: "value must contain no more than 1000 item(s)", + } + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + 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 key, val := range m.GetPerFilterConfig() { + _ = val + + // no validation rules for PerFilterConfig[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WeightedCluster_ClusterWeightValidationError{ + field: fmt.Sprintf("PerFilterConfig[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for key, val := range m.GetTypedPerFilterConfig() { + _ = val + + // no validation rules for TypedPerFilterConfig[key] + + 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, + } + } + } + + } + + return nil +} + +// 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{} + +// Validate checks the field values on RouteMatch_GrpcRouteMatchOptions with +// the rules defined in the proto definition for this message. If any rules +// are violated, an error is returned. +func (m *RouteMatch_GrpcRouteMatchOptions) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an error is returned. +func (m *RouteMatch_TlsContextMatchOptions) Validate() error { + if m == nil { + return nil + } + + 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 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, + } + } + } + + return nil +} + +// 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 RouteAction_RequestMirrorPolicy with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RouteAction_RequestMirrorPolicy) Validate() error { + if m == nil { + return nil + } + + if len(m.GetCluster()) < 1 { + return RouteAction_RequestMirrorPolicyValidationError{ + field: "Cluster", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for RuntimeKey + + 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 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, + } + } + } + + return nil +} + +// 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{} + +// Validate checks the field values on RouteAction_HashPolicy with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RouteAction_HashPolicy) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Terminal + + switch m.PolicySpecifier.(type) { + + case *RouteAction_HashPolicy_Header_: + + 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, 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, 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, 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, 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: + return RouteAction_HashPolicyValidationError{ + field: "PolicySpecifier", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error is returned. +func (m *RouteAction_UpgradeConfig) Validate() error { + if m == nil { + return nil + } + + if !_RouteAction_UpgradeConfig_UpgradeType_Pattern.MatchString(m.GetUpgradeType()) { + return RouteAction_UpgradeConfigValidationError{ + field: "UpgradeType", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + 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, + } + } + } + + return nil +} + +// 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_HashPolicy_Header with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RouteAction_HashPolicy_Header) Validate() error { + if m == nil { + return nil + } + + if len(m.GetHeaderName()) < 1 { + return RouteAction_HashPolicy_HeaderValidationError{ + field: "HeaderName", + reason: "value length must be at least 1 bytes", + } + } + + if !_RouteAction_HashPolicy_Header_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + return RouteAction_HashPolicy_HeaderValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + return nil +} + +// 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_Cookie with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RouteAction_HashPolicy_Cookie) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return RouteAction_HashPolicy_CookieValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + 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 + + return nil +} + +// 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, an error is returned. +func (m *RouteAction_HashPolicy_ConnectionProperties) Validate() error { + if m == nil { + return nil + } + + // no validation rules for SourceIp + + return nil +} + +// 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, an error is returned. +func (m *RouteAction_HashPolicy_QueryParameter) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return RouteAction_HashPolicy_QueryParameterValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// 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, an error is returned. +func (m *RouteAction_HashPolicy_FilterState) Validate() error { + if m == nil { + return nil + } + + if len(m.GetKey()) < 1 { + return RouteAction_HashPolicy_FilterStateValidationError{ + field: "Key", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// 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 RetryPolicy_RetryPriority with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RetryPolicy_RetryPriority) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return RetryPolicy_RetryPriorityValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + switch m.ConfigType.(type) { + + case *RetryPolicy_RetryPriority_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RetryPolicy_RetryPriorityValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RetryPolicy_RetryPriority_TypedConfig: + + 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, + } + } + } + + } + + return nil +} + +// 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, an error is returned. +func (m *RetryPolicy_RetryHostPredicate) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return RetryPolicy_RetryHostPredicateValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + switch m.ConfigType.(type) { + + case *RetryPolicy_RetryHostPredicate_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RetryPolicy_RetryHostPredicateValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RetryPolicy_RetryHostPredicate_TypedConfig: + + 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, + } + } + } + + } + + return nil +} + +// 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, an error is returned. +func (m *RetryPolicy_RetryBackOff) Validate() error { + if m == nil { + return nil + } + + if m.GetBaseInterval() == nil { + return RetryPolicy_RetryBackOffValidationError{ + field: "BaseInterval", + reason: "value is required", + } + } + + if d := m.GetBaseInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return RetryPolicy_RetryBackOffValidationError{ + field: "BaseInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return RetryPolicy_RetryBackOffValidationError{ + field: "BaseInterval", + reason: "value must be greater than 0s", + } + } + + } + + if d := m.GetMaxInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return RetryPolicy_RetryBackOffValidationError{ + field: "MaxInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return RetryPolicy_RetryBackOffValidationError{ + field: "MaxInterval", + reason: "value must be greater than 0s", + } + } + + } + + return nil +} + +// 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 RateLimit_Action with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *RateLimit_Action) Validate() error { + if m == nil { + return nil + } + + switch m.ActionSpecifier.(type) { + + case *RateLimit_Action_SourceCluster_: + + 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, 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, 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, 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, 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, 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, + } + } + } + + default: + return RateLimit_ActionValidationError{ + field: "ActionSpecifier", + reason: "value is required", + } + + } + + return nil +} + +// 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_Action_SourceCluster with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RateLimit_Action_SourceCluster) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an error is returned. +func (m *RateLimit_Action_DestinationCluster) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an error is returned. +func (m *RateLimit_Action_RequestHeaders) Validate() error { + if m == nil { + return nil + } + + if len(m.GetHeaderName()) < 1 { + return RateLimit_Action_RequestHeadersValidationError{ + field: "HeaderName", + reason: "value length must be at least 1 bytes", + } + } + + if !_RateLimit_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + return RateLimit_Action_RequestHeadersValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + if len(m.GetDescriptorKey()) < 1 { + return RateLimit_Action_RequestHeadersValidationError{ + field: "DescriptorKey", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// 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, an error is returned. +func (m *RateLimit_Action_RemoteAddress) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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_GenericKey with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RateLimit_Action_GenericKey) Validate() error { + if m == nil { + return nil + } + + if len(m.GetDescriptorValue()) < 1 { + return RateLimit_Action_GenericKeyValidationError{ + field: "DescriptorValue", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// 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, an error is returned. +func (m *RateLimit_Action_HeaderValueMatch) Validate() error { + if m == nil { + return nil + } + + if len(m.GetDescriptorValue()) < 1 { + return RateLimit_Action_HeaderValueMatchValidationError{ + field: "DescriptorValue", + reason: "value length must be at least 1 bytes", + } + } + + 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 { + return RateLimit_Action_HeaderValueMatchValidationError{ + field: "Headers", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + 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, + } + } + } + + } + + return nil +} + +// 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{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go new file mode 100644 index 0000000000..89737954e5 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go @@ -0,0 +1,219 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/scoped_route.proto + +package envoy_api_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type ScopedRouteConfiguration struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + RouteConfigurationName string `protobuf:"bytes,2,opt,name=route_configuration_name,json=routeConfigurationName,proto3" json:"route_configuration_name,omitempty"` + Key *ScopedRouteConfiguration_Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRouteConfiguration) Reset() { *m = ScopedRouteConfiguration{} } +func (m *ScopedRouteConfiguration) String() string { return proto.CompactTextString(m) } +func (*ScopedRouteConfiguration) ProtoMessage() {} +func (*ScopedRouteConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_e1eeeae73441b687, []int{0} +} + +func (m *ScopedRouteConfiguration) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRouteConfiguration.Unmarshal(m, b) +} +func (m *ScopedRouteConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRouteConfiguration.Marshal(b, m, deterministic) +} +func (m *ScopedRouteConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRouteConfiguration.Merge(m, src) +} +func (m *ScopedRouteConfiguration) XXX_Size() int { + return xxx_messageInfo_ScopedRouteConfiguration.Size(m) +} +func (m *ScopedRouteConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRouteConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRouteConfiguration proto.InternalMessageInfo + +func (m *ScopedRouteConfiguration) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ScopedRouteConfiguration) GetRouteConfigurationName() string { + if m != nil { + return m.RouteConfigurationName + } + return "" +} + +func (m *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key { + if m != nil { + return m.Key + } + return nil +} + +type ScopedRouteConfiguration_Key struct { + Fragments []*ScopedRouteConfiguration_Key_Fragment `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRouteConfiguration_Key) Reset() { *m = ScopedRouteConfiguration_Key{} } +func (m *ScopedRouteConfiguration_Key) String() string { return proto.CompactTextString(m) } +func (*ScopedRouteConfiguration_Key) ProtoMessage() {} +func (*ScopedRouteConfiguration_Key) Descriptor() ([]byte, []int) { + return fileDescriptor_e1eeeae73441b687, []int{0, 0} +} + +func (m *ScopedRouteConfiguration_Key) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRouteConfiguration_Key.Unmarshal(m, b) +} +func (m *ScopedRouteConfiguration_Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRouteConfiguration_Key.Marshal(b, m, deterministic) +} +func (m *ScopedRouteConfiguration_Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRouteConfiguration_Key.Merge(m, src) +} +func (m *ScopedRouteConfiguration_Key) XXX_Size() int { + return xxx_messageInfo_ScopedRouteConfiguration_Key.Size(m) +} +func (m *ScopedRouteConfiguration_Key) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRouteConfiguration_Key.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRouteConfiguration_Key proto.InternalMessageInfo + +func (m *ScopedRouteConfiguration_Key) GetFragments() []*ScopedRouteConfiguration_Key_Fragment { + if m != nil { + return m.Fragments + } + return nil +} + +type ScopedRouteConfiguration_Key_Fragment struct { + // Types that are valid to be assigned to Type: + // *ScopedRouteConfiguration_Key_Fragment_StringKey + Type isScopedRouteConfiguration_Key_Fragment_Type `protobuf_oneof:"type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRouteConfiguration_Key_Fragment) Reset() { *m = ScopedRouteConfiguration_Key_Fragment{} } +func (m *ScopedRouteConfiguration_Key_Fragment) String() string { return proto.CompactTextString(m) } +func (*ScopedRouteConfiguration_Key_Fragment) ProtoMessage() {} +func (*ScopedRouteConfiguration_Key_Fragment) Descriptor() ([]byte, []int) { + return fileDescriptor_e1eeeae73441b687, []int{0, 0, 0} +} + +func (m *ScopedRouteConfiguration_Key_Fragment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRouteConfiguration_Key_Fragment.Unmarshal(m, b) +} +func (m *ScopedRouteConfiguration_Key_Fragment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRouteConfiguration_Key_Fragment.Marshal(b, m, deterministic) +} +func (m *ScopedRouteConfiguration_Key_Fragment) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRouteConfiguration_Key_Fragment.Merge(m, src) +} +func (m *ScopedRouteConfiguration_Key_Fragment) XXX_Size() int { + return xxx_messageInfo_ScopedRouteConfiguration_Key_Fragment.Size(m) +} +func (m *ScopedRouteConfiguration_Key_Fragment) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRouteConfiguration_Key_Fragment.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRouteConfiguration_Key_Fragment proto.InternalMessageInfo + +type isScopedRouteConfiguration_Key_Fragment_Type interface { + isScopedRouteConfiguration_Key_Fragment_Type() +} + +type ScopedRouteConfiguration_Key_Fragment_StringKey struct { + StringKey string `protobuf:"bytes,1,opt,name=string_key,json=stringKey,proto3,oneof"` +} + +func (*ScopedRouteConfiguration_Key_Fragment_StringKey) isScopedRouteConfiguration_Key_Fragment_Type() { +} + +func (m *ScopedRouteConfiguration_Key_Fragment) GetType() isScopedRouteConfiguration_Key_Fragment_Type { + if m != nil { + return m.Type + } + return nil +} + +func (m *ScopedRouteConfiguration_Key_Fragment) GetStringKey() string { + if x, ok := m.GetType().(*ScopedRouteConfiguration_Key_Fragment_StringKey); ok { + return x.StringKey + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ScopedRouteConfiguration_Key_Fragment) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ScopedRouteConfiguration_Key_Fragment_StringKey)(nil), + } +} + +func init() { + proto.RegisterType((*ScopedRouteConfiguration)(nil), "envoy.api.v2.ScopedRouteConfiguration") + proto.RegisterType((*ScopedRouteConfiguration_Key)(nil), "envoy.api.v2.ScopedRouteConfiguration.Key") + proto.RegisterType((*ScopedRouteConfiguration_Key_Fragment)(nil), "envoy.api.v2.ScopedRouteConfiguration.Key.Fragment") +} + +func init() { proto.RegisterFile("envoy/api/v2/scoped_route.proto", fileDescriptor_e1eeeae73441b687) } + +var fileDescriptor_e1eeeae73441b687 = []byte{ + // 372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0x4a, 0xeb, 0x40, + 0x14, 0x86, 0xef, 0x24, 0x6d, 0x6f, 0x3b, 0xbd, 0x8b, 0x12, 0xb8, 0xb7, 0x21, 0x17, 0x6d, 0x70, + 0x55, 0x5c, 0x4c, 0x20, 0xdd, 0xb8, 0x75, 0x84, 0x22, 0x14, 0xa4, 0x44, 0x5c, 0xb9, 0x08, 0x63, + 0x3b, 0x0d, 0x83, 0x76, 0x66, 0x98, 0x4c, 0x82, 0xd9, 0xb9, 0x76, 0x23, 0xb8, 0x72, 0xe1, 0x93, + 0xf8, 0x04, 0x6e, 0x7d, 0x04, 0x5f, 0xc1, 0x95, 0x74, 0x21, 0x92, 0x49, 0x8b, 0x2d, 0x45, 0x70, + 0x17, 0xe6, 0x9c, 0xff, 0x3b, 0x5f, 0xce, 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xe1, 0x32, 0x6b, 0xf0, + 0xf7, 0xc0, 0x6a, 0x82, 0xe8, 0x8b, 0xe7, 0x1d, 0xc0, 0xe6, 0xaa, 0xc1, 0xe9, 0x41, 0x98, 0x6a, + 0xc5, 0x78, 0x12, 0x97, 0xfe, 0x66, 0x3d, 0xc7, 0xbf, 0xa2, 0x56, 0xf5, 0x56, 0x0a, 0xb6, 0x61, + 0x4d, 0x17, 0x92, 0x3a, 0xf6, 0x3b, 0x06, 0xf8, 0xec, 0xed, 0xe1, 0xe3, 0xae, 0xde, 0x75, 0xfe, + 0x56, 0x2a, 0xd5, 0xbe, 0x50, 0x75, 0xeb, 0x7c, 0xf0, 0x74, 0xf3, 0xfc, 0xd2, 0xb0, 0x3a, 0x00, + 0x7a, 0x4c, 0x54, 0xb2, 0x52, 0x89, 0xeb, 0x62, 0xc3, 0x1b, 0x77, 0xd6, 0xc4, 0xc7, 0xe5, 0xe1, + 0xc6, 0xe0, 0xa2, 0x61, 0x2e, 0x38, 0xf8, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x93, 0xa7, 0xd0, + 0x4a, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go new file mode 100644 index 0000000000..2ee79fb3f0 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go @@ -0,0 +1,306 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/scoped_route.proto + +package envoy_api_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _scoped_route_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on ScopedRouteConfiguration with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ScopedRouteConfiguration) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return ScopedRouteConfigurationValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetRouteConfigurationName()) < 1 { + return ScopedRouteConfigurationValidationError{ + field: "RouteConfigurationName", + reason: "value length must be at least 1 bytes", + } + } + + if m.GetKey() == nil { + return ScopedRouteConfigurationValidationError{ + field: "Key", + reason: "value is required", + } + } + + 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, + } + } + } + + return nil +} + +// 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, an error is returned. +func (m *ScopedRouteConfiguration_Key) Validate() error { + if m == nil { + return nil + } + + if len(m.GetFragments()) < 1 { + return ScopedRouteConfiguration_KeyValidationError{ + field: "Fragments", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetFragments() { + _, _ = idx, item + + 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, + } + } + } + + } + + return nil +} + +// 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, an error is returned. +func (m *ScopedRouteConfiguration_Key_Fragment) Validate() error { + if m == nil { + return nil + } + + switch m.Type.(type) { + + case *ScopedRouteConfiguration_Key_Fragment_StringKey: + // no validation rules for StringKey + + default: + return ScopedRouteConfiguration_Key_FragmentValidationError{ + field: "Type", + reason: "value is required", + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go new file mode 100644 index 0000000000..96bb17d20a --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go @@ -0,0 +1,310 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/api/v2/srds.proto + +package envoy_api_v2 + +import ( + context "context" + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + 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" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type SrdsDummy struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SrdsDummy) Reset() { *m = SrdsDummy{} } +func (m *SrdsDummy) String() string { return proto.CompactTextString(m) } +func (*SrdsDummy) ProtoMessage() {} +func (*SrdsDummy) Descriptor() ([]byte, []int) { + return fileDescriptor_92f394721ede65e9, []int{0} +} + +func (m *SrdsDummy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SrdsDummy.Unmarshal(m, b) +} +func (m *SrdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SrdsDummy.Marshal(b, m, deterministic) +} +func (m *SrdsDummy) XXX_Merge(src proto.Message) { + xxx_messageInfo_SrdsDummy.Merge(m, src) +} +func (m *SrdsDummy) XXX_Size() int { + return xxx_messageInfo_SrdsDummy.Size(m) +} +func (m *SrdsDummy) XXX_DiscardUnknown() { + xxx_messageInfo_SrdsDummy.DiscardUnknown(m) +} + +var xxx_messageInfo_SrdsDummy proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SrdsDummy)(nil), "envoy.api.v2.SrdsDummy") +} + +func init() { proto.RegisterFile("envoy/api/v2/srds.proto", fileDescriptor_92f394721ede65e9) } + +var fileDescriptor_92f394721ede65e9 = []byte{ + // 380 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xbd, 0x4e, 0xe3, 0x40, + 0x14, 0x85, 0x77, 0x12, 0x25, 0xab, 0x9d, 0xdd, 0x62, 0xe3, 0x62, 0x17, 0x99, 0xfc, 0xa0, 0x00, + 0x02, 0x21, 0x62, 0xa3, 0xa4, 0x4b, 0x19, 0x22, 0xea, 0x28, 0x2e, 0x29, 0xd0, 0x60, 0x0f, 0x66, + 0xa4, 0xd8, 0xd7, 0xcc, 0x8c, 0x2d, 0xdc, 0xa1, 0x54, 0x88, 0x86, 0x02, 0x81, 0x78, 0x00, 0x9e, + 0x82, 0x27, 0xa0, 0x45, 0xbc, 0x02, 0x4f, 0x00, 0x3d, 0x42, 0x19, 0xc7, 0x90, 0x21, 0x82, 0x8a, + 0xfa, 0x7c, 0xe7, 0xfe, 0x9d, 0x8b, 0xff, 0xd3, 0x30, 0x81, 0xd4, 0x26, 0x11, 0xb3, 0x93, 0xb6, + 0x2d, 0xb8, 0x27, 0xac, 0x88, 0x83, 0x04, 0xe3, 0x8f, 0x12, 0x2c, 0x12, 0x31, 0x2b, 0x69, 0x9b, + 0x55, 0x0d, 0xf3, 0x98, 0x70, 0x21, 0xa1, 0x3c, 0xcd, 0x58, 0xb3, 0xea, 0x03, 0xf8, 0x23, 0xaa, + 0x64, 0x12, 0x86, 0x20, 0x89, 0x64, 0x10, 0x4e, 0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, 0x97, 0xf3, + 0xd2, 0x82, 0xf1, 0x2f, 0xc3, 0x45, 0x96, 0x86, 0x95, 0xe5, 0x98, 0x74, 0x6e, 0x4f, 0xee, 0xee, + 0xcb, 0x85, 0xbf, 0x08, 0x9b, 0x0c, 0xb2, 0x39, 0x23, 0x0e, 0xc7, 0xa9, 0x36, 0x72, 0x4f, 0xc5, + 0x3c, 0x98, 0x64, 0x3e, 0x40, 0xa7, 0x08, 0x0d, 0x4a, 0xfb, 0x65, 0xf5, 0x01, 0x9d, 0xd7, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xad, 0x06, 0xf9, 0x5a, 0xe8, 0x02, 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 + +// ScopedRoutesDiscoveryServiceClient is the client API for ScopedRoutesDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ScopedRoutesDiscoveryServiceClient interface { + StreamScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_StreamScopedRoutesClient, error) + DeltaScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_DeltaScopedRoutesClient, error) + FetchScopedRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) +} + +type scopedRoutesDiscoveryServiceClient struct { + cc *grpc.ClientConn +} + +func NewScopedRoutesDiscoveryServiceClient(cc *grpc.ClientConn) ScopedRoutesDiscoveryServiceClient { + return &scopedRoutesDiscoveryServiceClient{cc} +} + +func (c *scopedRoutesDiscoveryServiceClient) StreamScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_StreamScopedRoutesClient, error) { + stream, err := c.cc.NewStream(ctx, &_ScopedRoutesDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ScopedRoutesDiscoveryService/StreamScopedRoutes", opts...) + if err != nil { + return nil, err + } + x := &scopedRoutesDiscoveryServiceStreamScopedRoutesClient{stream} + return x, nil +} + +type ScopedRoutesDiscoveryService_StreamScopedRoutesClient interface { + Send(*DiscoveryRequest) error + Recv() (*DiscoveryResponse, error) + grpc.ClientStream +} + +type scopedRoutesDiscoveryServiceStreamScopedRoutesClient struct { + grpc.ClientStream +} + +func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesClient) Send(m *DiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesClient) Recv() (*DiscoveryResponse, error) { + m := new(DiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *scopedRoutesDiscoveryServiceClient) DeltaScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_DeltaScopedRoutesClient, error) { + stream, err := c.cc.NewStream(ctx, &_ScopedRoutesDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.ScopedRoutesDiscoveryService/DeltaScopedRoutes", opts...) + if err != nil { + return nil, err + } + x := &scopedRoutesDiscoveryServiceDeltaScopedRoutesClient{stream} + return x, nil +} + +type ScopedRoutesDiscoveryService_DeltaScopedRoutesClient interface { + Send(*DeltaDiscoveryRequest) error + Recv() (*DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type scopedRoutesDiscoveryServiceDeltaScopedRoutesClient struct { + grpc.ClientStream +} + +func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesClient) Send(m *DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesClient) Recv() (*DeltaDiscoveryResponse, error) { + m := new(DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *scopedRoutesDiscoveryServiceClient) FetchScopedRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { + out := new(DiscoveryResponse) + err := c.cc.Invoke(ctx, "/envoy.api.v2.ScopedRoutesDiscoveryService/FetchScopedRoutes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ScopedRoutesDiscoveryServiceServer is the server API for ScopedRoutesDiscoveryService service. +type ScopedRoutesDiscoveryServiceServer interface { + StreamScopedRoutes(ScopedRoutesDiscoveryService_StreamScopedRoutesServer) error + DeltaScopedRoutes(ScopedRoutesDiscoveryService_DeltaScopedRoutesServer) error + FetchScopedRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) +} + +// UnimplementedScopedRoutesDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedScopedRoutesDiscoveryServiceServer struct { +} + +func (*UnimplementedScopedRoutesDiscoveryServiceServer) StreamScopedRoutes(srv ScopedRoutesDiscoveryService_StreamScopedRoutesServer) error { + return status.Errorf(codes.Unimplemented, "method StreamScopedRoutes not implemented") +} +func (*UnimplementedScopedRoutesDiscoveryServiceServer) DeltaScopedRoutes(srv ScopedRoutesDiscoveryService_DeltaScopedRoutesServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaScopedRoutes not implemented") +} +func (*UnimplementedScopedRoutesDiscoveryServiceServer) FetchScopedRoutes(ctx context.Context, req *DiscoveryRequest) (*DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchScopedRoutes not implemented") +} + +func RegisterScopedRoutesDiscoveryServiceServer(s *grpc.Server, srv ScopedRoutesDiscoveryServiceServer) { + s.RegisterService(&_ScopedRoutesDiscoveryService_serviceDesc, srv) +} + +func _ScopedRoutesDiscoveryService_StreamScopedRoutes_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ScopedRoutesDiscoveryServiceServer).StreamScopedRoutes(&scopedRoutesDiscoveryServiceStreamScopedRoutesServer{stream}) +} + +type ScopedRoutesDiscoveryService_StreamScopedRoutesServer interface { + Send(*DiscoveryResponse) error + Recv() (*DiscoveryRequest, error) + grpc.ServerStream +} + +type scopedRoutesDiscoveryServiceStreamScopedRoutesServer struct { + grpc.ServerStream +} + +func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesServer) Send(m *DiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesServer) Recv() (*DiscoveryRequest, error) { + m := new(DiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ScopedRoutesDiscoveryService_DeltaScopedRoutes_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ScopedRoutesDiscoveryServiceServer).DeltaScopedRoutes(&scopedRoutesDiscoveryServiceDeltaScopedRoutesServer{stream}) +} + +type ScopedRoutesDiscoveryService_DeltaScopedRoutesServer interface { + Send(*DeltaDiscoveryResponse) error + Recv() (*DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type scopedRoutesDiscoveryServiceDeltaScopedRoutesServer struct { + grpc.ServerStream +} + +func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesServer) Send(m *DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesServer) Recv() (*DeltaDiscoveryRequest, error) { + m := new(DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ScopedRoutesDiscoveryService_FetchScopedRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiscoveryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScopedRoutesDiscoveryServiceServer).FetchScopedRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.api.v2.ScopedRoutesDiscoveryService/FetchScopedRoutes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScopedRoutesDiscoveryServiceServer).FetchScopedRoutes(ctx, req.(*DiscoveryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ScopedRoutesDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.api.v2.ScopedRoutesDiscoveryService", + HandlerType: (*ScopedRoutesDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchScopedRoutes", + Handler: _ScopedRoutesDiscoveryService_FetchScopedRoutes_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamScopedRoutes", + Handler: _ScopedRoutesDiscoveryService_StreamScopedRoutes_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "DeltaScopedRoutes", + Handler: _ScopedRoutesDiscoveryService_DeltaScopedRoutes_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/api/v2/srds.proto", +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go new file mode 100644 index 0000000000..73f839eada --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go @@ -0,0 +1,101 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/api/v2/srds.proto + +package envoy_api_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _srds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on SrdsDummy with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *SrdsDummy) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// SrdsDummyValidationError is the validation error returned by +// SrdsDummy.Validate if the designated constraints aren't met. +type SrdsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SrdsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SrdsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SrdsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SrdsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SrdsDummyValidationError) ErrorName() string { return "SrdsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e SrdsDummyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSrdsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SrdsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SrdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go index 1515757a1c..5dfe11a44c 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go @@ -1,20 +1,19 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/accesslog/v2/accesslog.proto -package v2 +package envoy_config_filter_accesslog_v2 import ( fmt "fmt" - io "io" - math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route" _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + _struct "github.com/golang/protobuf/ptypes/struct" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,16 +25,13 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type ComparisonFilter_Op int32 const ( - // = ComparisonFilter_EQ ComparisonFilter_Op = 0 - // >= ComparisonFilter_GE ComparisonFilter_Op = 1 - // <= ComparisonFilter_LE ComparisonFilter_Op = 2 ) @@ -130,22 +126,8 @@ func (GrpcStatusFilter_Status) EnumDescriptor() ([]byte, []int) { } type AccessLog struct { - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.file_access_log" - // #. "envoy.http_grpc_access_log" - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter which is used to determine if the access log needs to be written. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Filter *AccessLogFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` - // Custom configuration that depends on the access log being instantiated. Built-in - // configurations include: - // - // #. "envoy.file_access_log": :ref:`FileAccessLog - // ` - // #. "envoy.http_grpc_access_log": :ref:`HttpGrpcAccessLogConfig - // ` - // // Types that are valid to be assigned to ConfigType: // *AccessLog_Config // *AccessLog_TypedConfig @@ -161,26 +143,18 @@ func (*AccessLog) ProtoMessage() {} func (*AccessLog) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{0} } + func (m *AccessLog) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AccessLog.Unmarshal(m, b) } func (m *AccessLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessLog.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AccessLog.Marshal(b, m, deterministic) } func (m *AccessLog) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessLog.Merge(m, src) } func (m *AccessLog) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AccessLog.Size(m) } func (m *AccessLog) XXX_DiscardUnknown() { xxx_messageInfo_AccessLog.DiscardUnknown(m) @@ -188,29 +162,6 @@ func (m *AccessLog) XXX_DiscardUnknown() { var xxx_messageInfo_AccessLog proto.InternalMessageInfo -type isAccessLog_ConfigType interface { - isAccessLog_ConfigType() - MarshalTo([]byte) (int, error) - Size() int -} - -type AccessLog_Config struct { - Config *types.Struct `protobuf:"bytes,3,opt,name=config,proto3,oneof"` -} -type AccessLog_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*AccessLog_Config) isAccessLog_ConfigType() {} -func (*AccessLog_TypedConfig) isAccessLog_ConfigType() {} - -func (m *AccessLog) GetConfigType() isAccessLog_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - func (m *AccessLog) GetName() string { if m != nil { return m.Name @@ -225,94 +176,52 @@ func (m *AccessLog) GetFilter() *AccessLogFilter { return nil } -func (m *AccessLog) GetConfig() *types.Struct { +type isAccessLog_ConfigType interface { + isAccessLog_ConfigType() +} + +type AccessLog_Config struct { + Config *_struct.Struct `protobuf:"bytes,3,opt,name=config,proto3,oneof"` +} + +type AccessLog_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*AccessLog_Config) isAccessLog_ConfigType() {} + +func (*AccessLog_TypedConfig) isAccessLog_ConfigType() {} + +func (m *AccessLog) GetConfigType() isAccessLog_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *AccessLog) GetConfig() *_struct.Struct { if x, ok := m.GetConfigType().(*AccessLog_Config); ok { return x.Config } return nil } -func (m *AccessLog) GetTypedConfig() *types.Any { +func (m *AccessLog) GetTypedConfig() *any.Any { if x, ok := m.GetConfigType().(*AccessLog_TypedConfig); ok { return x.TypedConfig } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AccessLog) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _AccessLog_OneofMarshaler, _AccessLog_OneofUnmarshaler, _AccessLog_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AccessLog) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*AccessLog_Config)(nil), (*AccessLog_TypedConfig)(nil), } } -func _AccessLog_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AccessLog) - // config_type - switch x := m.ConfigType.(type) { - case *AccessLog_Config: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *AccessLog_TypedConfig: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AccessLog.ConfigType has unexpected type %T", x) - } - return nil -} - -func _AccessLog_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AccessLog) - switch tag { - case 3: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &AccessLog_Config{msg} - return true, err - case 4: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &AccessLog_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _AccessLog_OneofSizer(msg proto.Message) (n int) { - m := msg.(*AccessLog) - // config_type - switch x := m.ConfigType.(type) { - case *AccessLog_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLog_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type AccessLogFilter struct { // Types that are valid to be assigned to FilterSpecifier: // *AccessLogFilter_StatusCodeFilter @@ -325,6 +234,7 @@ type AccessLogFilter struct { // *AccessLogFilter_HeaderFilter // *AccessLogFilter_ResponseFlagFilter // *AccessLogFilter_GrpcStatusFilter + // *AccessLogFilter_ExtensionFilter FilterSpecifier isAccessLogFilter_FilterSpecifier `protobuf_oneof:"filter_specifier"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -337,26 +247,18 @@ func (*AccessLogFilter) ProtoMessage() {} func (*AccessLogFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{1} } + func (m *AccessLogFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AccessLogFilter.Unmarshal(m, b) } func (m *AccessLogFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessLogFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AccessLogFilter.Marshal(b, m, deterministic) } func (m *AccessLogFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessLogFilter.Merge(m, src) } func (m *AccessLogFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AccessLogFilter.Size(m) } func (m *AccessLogFilter) XXX_DiscardUnknown() { xxx_messageInfo_AccessLogFilter.DiscardUnknown(m) @@ -366,51 +268,73 @@ var xxx_messageInfo_AccessLogFilter proto.InternalMessageInfo type isAccessLogFilter_FilterSpecifier interface { isAccessLogFilter_FilterSpecifier() - MarshalTo([]byte) (int, error) - Size() int } type AccessLogFilter_StatusCodeFilter struct { StatusCodeFilter *StatusCodeFilter `protobuf:"bytes,1,opt,name=status_code_filter,json=statusCodeFilter,proto3,oneof"` } + type AccessLogFilter_DurationFilter struct { DurationFilter *DurationFilter `protobuf:"bytes,2,opt,name=duration_filter,json=durationFilter,proto3,oneof"` } + type AccessLogFilter_NotHealthCheckFilter struct { NotHealthCheckFilter *NotHealthCheckFilter `protobuf:"bytes,3,opt,name=not_health_check_filter,json=notHealthCheckFilter,proto3,oneof"` } + type AccessLogFilter_TraceableFilter struct { TraceableFilter *TraceableFilter `protobuf:"bytes,4,opt,name=traceable_filter,json=traceableFilter,proto3,oneof"` } + type AccessLogFilter_RuntimeFilter struct { RuntimeFilter *RuntimeFilter `protobuf:"bytes,5,opt,name=runtime_filter,json=runtimeFilter,proto3,oneof"` } + type AccessLogFilter_AndFilter struct { AndFilter *AndFilter `protobuf:"bytes,6,opt,name=and_filter,json=andFilter,proto3,oneof"` } + type AccessLogFilter_OrFilter struct { OrFilter *OrFilter `protobuf:"bytes,7,opt,name=or_filter,json=orFilter,proto3,oneof"` } + type AccessLogFilter_HeaderFilter struct { HeaderFilter *HeaderFilter `protobuf:"bytes,8,opt,name=header_filter,json=headerFilter,proto3,oneof"` } + type AccessLogFilter_ResponseFlagFilter struct { ResponseFlagFilter *ResponseFlagFilter `protobuf:"bytes,9,opt,name=response_flag_filter,json=responseFlagFilter,proto3,oneof"` } + type AccessLogFilter_GrpcStatusFilter struct { GrpcStatusFilter *GrpcStatusFilter `protobuf:"bytes,10,opt,name=grpc_status_filter,json=grpcStatusFilter,proto3,oneof"` } -func (*AccessLogFilter_StatusCodeFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_DurationFilter) isAccessLogFilter_FilterSpecifier() {} +type AccessLogFilter_ExtensionFilter struct { + ExtensionFilter *ExtensionFilter `protobuf:"bytes,11,opt,name=extension_filter,json=extensionFilter,proto3,oneof"` +} + +func (*AccessLogFilter_StatusCodeFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_DurationFilter) isAccessLogFilter_FilterSpecifier() {} + func (*AccessLogFilter_NotHealthCheckFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_TraceableFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_RuntimeFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_AndFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_OrFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_HeaderFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_ResponseFlagFilter) isAccessLogFilter_FilterSpecifier() {} -func (*AccessLogFilter_GrpcStatusFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_TraceableFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_RuntimeFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_AndFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_OrFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_HeaderFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_ResponseFlagFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_GrpcStatusFilter) isAccessLogFilter_FilterSpecifier() {} + +func (*AccessLogFilter_ExtensionFilter) isAccessLogFilter_FilterSpecifier() {} func (m *AccessLogFilter) GetFilterSpecifier() isAccessLogFilter_FilterSpecifier { if m != nil { @@ -489,9 +413,16 @@ func (m *AccessLogFilter) GetGrpcStatusFilter() *GrpcStatusFilter { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*AccessLogFilter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _AccessLogFilter_OneofMarshaler, _AccessLogFilter_OneofUnmarshaler, _AccessLogFilter_OneofSizer, []interface{}{ +func (m *AccessLogFilter) GetExtensionFilter() *ExtensionFilter { + if x, ok := m.GetFilterSpecifier().(*AccessLogFilter_ExtensionFilter); ok { + return x.ExtensionFilter + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*AccessLogFilter) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*AccessLogFilter_StatusCodeFilter)(nil), (*AccessLogFilter_DurationFilter)(nil), (*AccessLogFilter_NotHealthCheckFilter)(nil), @@ -502,224 +433,12 @@ func (*AccessLogFilter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffe (*AccessLogFilter_HeaderFilter)(nil), (*AccessLogFilter_ResponseFlagFilter)(nil), (*AccessLogFilter_GrpcStatusFilter)(nil), + (*AccessLogFilter_ExtensionFilter)(nil), } } -func _AccessLogFilter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*AccessLogFilter) - // filter_specifier - switch x := m.FilterSpecifier.(type) { - case *AccessLogFilter_StatusCodeFilter: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.StatusCodeFilter); err != nil { - return err - } - case *AccessLogFilter_DurationFilter: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.DurationFilter); err != nil { - return err - } - case *AccessLogFilter_NotHealthCheckFilter: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.NotHealthCheckFilter); err != nil { - return err - } - case *AccessLogFilter_TraceableFilter: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TraceableFilter); err != nil { - return err - } - case *AccessLogFilter_RuntimeFilter: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.RuntimeFilter); err != nil { - return err - } - case *AccessLogFilter_AndFilter: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.AndFilter); err != nil { - return err - } - case *AccessLogFilter_OrFilter: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.OrFilter); err != nil { - return err - } - case *AccessLogFilter_HeaderFilter: - _ = b.EncodeVarint(8<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.HeaderFilter); err != nil { - return err - } - case *AccessLogFilter_ResponseFlagFilter: - _ = b.EncodeVarint(9<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ResponseFlagFilter); err != nil { - return err - } - case *AccessLogFilter_GrpcStatusFilter: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.GrpcStatusFilter); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("AccessLogFilter.FilterSpecifier has unexpected type %T", x) - } - return nil -} - -func _AccessLogFilter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*AccessLogFilter) - switch tag { - case 1: // filter_specifier.status_code_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(StatusCodeFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_StatusCodeFilter{msg} - return true, err - case 2: // filter_specifier.duration_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DurationFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_DurationFilter{msg} - return true, err - case 3: // filter_specifier.not_health_check_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(NotHealthCheckFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_NotHealthCheckFilter{msg} - return true, err - case 4: // filter_specifier.traceable_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TraceableFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_TraceableFilter{msg} - return true, err - case 5: // filter_specifier.runtime_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RuntimeFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_RuntimeFilter{msg} - return true, err - case 6: // filter_specifier.and_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AndFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_AndFilter{msg} - return true, err - case 7: // filter_specifier.or_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(OrFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_OrFilter{msg} - return true, err - case 8: // filter_specifier.header_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HeaderFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_HeaderFilter{msg} - return true, err - case 9: // filter_specifier.response_flag_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ResponseFlagFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_ResponseFlagFilter{msg} - return true, err - case 10: // filter_specifier.grpc_status_filter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GrpcStatusFilter) - err := b.DecodeMessage(msg) - m.FilterSpecifier = &AccessLogFilter_GrpcStatusFilter{msg} - return true, err - default: - return false, nil - } -} - -func _AccessLogFilter_OneofSizer(msg proto.Message) (n int) { - m := msg.(*AccessLogFilter) - // filter_specifier - switch x := m.FilterSpecifier.(type) { - case *AccessLogFilter_StatusCodeFilter: - s := proto.Size(x.StatusCodeFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_DurationFilter: - s := proto.Size(x.DurationFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_NotHealthCheckFilter: - s := proto.Size(x.NotHealthCheckFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_TraceableFilter: - s := proto.Size(x.TraceableFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_RuntimeFilter: - s := proto.Size(x.RuntimeFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_AndFilter: - s := proto.Size(x.AndFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_OrFilter: - s := proto.Size(x.OrFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_HeaderFilter: - s := proto.Size(x.HeaderFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_ResponseFlagFilter: - s := proto.Size(x.ResponseFlagFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *AccessLogFilter_GrpcStatusFilter: - s := proto.Size(x.GrpcStatusFilter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Filter on an integer comparison. type ComparisonFilter struct { - // Comparison operator. - Op ComparisonFilter_Op `protobuf:"varint,1,opt,name=op,proto3,enum=envoy.config.filter.accesslog.v2.ComparisonFilter_Op" json:"op,omitempty"` - // Value to compare against. + Op ComparisonFilter_Op `protobuf:"varint,1,opt,name=op,proto3,enum=envoy.config.filter.accesslog.v2.ComparisonFilter_Op" json:"op,omitempty"` Value *core.RuntimeUInt32 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -732,26 +451,18 @@ func (*ComparisonFilter) ProtoMessage() {} func (*ComparisonFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{2} } + func (m *ComparisonFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ComparisonFilter.Unmarshal(m, b) } func (m *ComparisonFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ComparisonFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ComparisonFilter.Marshal(b, m, deterministic) } func (m *ComparisonFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_ComparisonFilter.Merge(m, src) } func (m *ComparisonFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ComparisonFilter.Size(m) } func (m *ComparisonFilter) XXX_DiscardUnknown() { xxx_messageInfo_ComparisonFilter.DiscardUnknown(m) @@ -773,9 +484,7 @@ func (m *ComparisonFilter) GetValue() *core.RuntimeUInt32 { return nil } -// Filters on HTTP response/status code. type StatusCodeFilter struct { - // Comparison. Comparison *ComparisonFilter `protobuf:"bytes,1,opt,name=comparison,proto3" json:"comparison,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -788,26 +497,18 @@ func (*StatusCodeFilter) ProtoMessage() {} func (*StatusCodeFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{3} } + func (m *StatusCodeFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_StatusCodeFilter.Unmarshal(m, b) } func (m *StatusCodeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusCodeFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_StatusCodeFilter.Marshal(b, m, deterministic) } func (m *StatusCodeFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_StatusCodeFilter.Merge(m, src) } func (m *StatusCodeFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_StatusCodeFilter.Size(m) } func (m *StatusCodeFilter) XXX_DiscardUnknown() { xxx_messageInfo_StatusCodeFilter.DiscardUnknown(m) @@ -822,9 +523,7 @@ func (m *StatusCodeFilter) GetComparison() *ComparisonFilter { return nil } -// Filters on total request duration in milliseconds. type DurationFilter struct { - // Comparison. Comparison *ComparisonFilter `protobuf:"bytes,1,opt,name=comparison,proto3" json:"comparison,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -837,26 +536,18 @@ func (*DurationFilter) ProtoMessage() {} func (*DurationFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{4} } + func (m *DurationFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DurationFilter.Unmarshal(m, b) } func (m *DurationFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DurationFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_DurationFilter.Marshal(b, m, deterministic) } func (m *DurationFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_DurationFilter.Merge(m, src) } func (m *DurationFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DurationFilter.Size(m) } func (m *DurationFilter) XXX_DiscardUnknown() { xxx_messageInfo_DurationFilter.DiscardUnknown(m) @@ -871,8 +562,6 @@ func (m *DurationFilter) GetComparison() *ComparisonFilter { return nil } -// Filters for requests that are not health check requests. A health check -// request is marked by the health check filter. type NotHealthCheckFilter struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -885,26 +574,18 @@ func (*NotHealthCheckFilter) ProtoMessage() {} func (*NotHealthCheckFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{5} } + func (m *NotHealthCheckFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_NotHealthCheckFilter.Unmarshal(m, b) } func (m *NotHealthCheckFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NotHealthCheckFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_NotHealthCheckFilter.Marshal(b, m, deterministic) } func (m *NotHealthCheckFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_NotHealthCheckFilter.Merge(m, src) } func (m *NotHealthCheckFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_NotHealthCheckFilter.Size(m) } func (m *NotHealthCheckFilter) XXX_DiscardUnknown() { xxx_messageInfo_NotHealthCheckFilter.DiscardUnknown(m) @@ -912,8 +593,6 @@ func (m *NotHealthCheckFilter) XXX_DiscardUnknown() { var xxx_messageInfo_NotHealthCheckFilter proto.InternalMessageInfo -// Filters for requests that are traceable. See the tracing overview for more -// information on how a request becomes traceable. type TraceableFilter struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -926,26 +605,18 @@ func (*TraceableFilter) ProtoMessage() {} func (*TraceableFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{6} } + func (m *TraceableFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TraceableFilter.Unmarshal(m, b) } func (m *TraceableFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TraceableFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TraceableFilter.Marshal(b, m, deterministic) } func (m *TraceableFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_TraceableFilter.Merge(m, src) } func (m *TraceableFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TraceableFilter.Size(m) } func (m *TraceableFilter) XXX_DiscardUnknown() { xxx_messageInfo_TraceableFilter.DiscardUnknown(m) @@ -953,29 +624,13 @@ func (m *TraceableFilter) XXX_DiscardUnknown() { var xxx_messageInfo_TraceableFilter proto.InternalMessageInfo -// Filters for random sampling of requests. type RuntimeFilter struct { - // Runtime key to get an optional overridden numerator for use in the *percent_sampled* field. - // If found in runtime, this value will replace the default numerator. - RuntimeKey string `protobuf:"bytes,1,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` - // The default sampling percentage. If not specified, defaults to 0% with denominator of 100. - PercentSampled *_type.FractionalPercent `protobuf:"bytes,2,opt,name=percent_sampled,json=percentSampled,proto3" json:"percent_sampled,omitempty"` - // By default, sampling pivots on the header - // :ref:`x-request-id` being present. If - // :ref:`x-request-id` is present, the filter will - // consistently sample across multiple hosts based on the runtime key value and the value - // extracted from :ref:`x-request-id`. If it is - // missing, or *use_independent_randomness* is set to true, the filter will randomly sample based - // on the runtime key value alone. *use_independent_randomness* can be used for logging kill - // switches within complex nested :ref:`AndFilter - // ` and :ref:`OrFilter - // ` blocks that are easier to reason about - // from a probability perspective (i.e., setting to true will cause the filter to behave like - // an independent random variable when composed within logical operator filters). - UseIndependentRandomness bool `protobuf:"varint,3,opt,name=use_independent_randomness,json=useIndependentRandomness,proto3" json:"use_independent_randomness,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RuntimeKey string `protobuf:"bytes,1,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` + PercentSampled *_type.FractionalPercent `protobuf:"bytes,2,opt,name=percent_sampled,json=percentSampled,proto3" json:"percent_sampled,omitempty"` + UseIndependentRandomness bool `protobuf:"varint,3,opt,name=use_independent_randomness,json=useIndependentRandomness,proto3" json:"use_independent_randomness,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RuntimeFilter) Reset() { *m = RuntimeFilter{} } @@ -984,26 +639,18 @@ func (*RuntimeFilter) ProtoMessage() {} func (*RuntimeFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{7} } + func (m *RuntimeFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_RuntimeFilter.Unmarshal(m, b) } func (m *RuntimeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RuntimeFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_RuntimeFilter.Marshal(b, m, deterministic) } func (m *RuntimeFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_RuntimeFilter.Merge(m, src) } func (m *RuntimeFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_RuntimeFilter.Size(m) } func (m *RuntimeFilter) XXX_DiscardUnknown() { xxx_messageInfo_RuntimeFilter.DiscardUnknown(m) @@ -1032,9 +679,6 @@ func (m *RuntimeFilter) GetUseIndependentRandomness() bool { return false } -// Performs a logical “and” operation on the result of each filter in filters. -// Filters are evaluated sequentially and if one of them returns false, the -// filter returns false immediately. type AndFilter struct { Filters []*AccessLogFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1048,26 +692,18 @@ func (*AndFilter) ProtoMessage() {} func (*AndFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{8} } + func (m *AndFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AndFilter.Unmarshal(m, b) } func (m *AndFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AndFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AndFilter.Marshal(b, m, deterministic) } func (m *AndFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AndFilter.Merge(m, src) } func (m *AndFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AndFilter.Size(m) } func (m *AndFilter) XXX_DiscardUnknown() { xxx_messageInfo_AndFilter.DiscardUnknown(m) @@ -1082,9 +718,6 @@ func (m *AndFilter) GetFilters() []*AccessLogFilter { return nil } -// Performs a logical “or” operation on the result of each individual filter. -// Filters are evaluated sequentially and if one of them returns true, the -// filter returns true immediately. type OrFilter struct { Filters []*AccessLogFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1098,26 +731,18 @@ func (*OrFilter) ProtoMessage() {} func (*OrFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{9} } + func (m *OrFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_OrFilter.Unmarshal(m, b) } func (m *OrFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OrFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_OrFilter.Marshal(b, m, deterministic) } func (m *OrFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_OrFilter.Merge(m, src) } func (m *OrFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_OrFilter.Size(m) } func (m *OrFilter) XXX_DiscardUnknown() { xxx_messageInfo_OrFilter.DiscardUnknown(m) @@ -1132,10 +757,7 @@ func (m *OrFilter) GetFilters() []*AccessLogFilter { return nil } -// Filters requests based on the presence or value of a request header. type HeaderFilter struct { - // Only requests with a header which matches the specified HeaderMatcher will pass the filter - // check. Header *route.HeaderMatcher `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1148,26 +770,18 @@ func (*HeaderFilter) ProtoMessage() {} func (*HeaderFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{10} } + func (m *HeaderFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HeaderFilter.Unmarshal(m, b) } func (m *HeaderFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeaderFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HeaderFilter.Marshal(b, m, deterministic) } func (m *HeaderFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_HeaderFilter.Merge(m, src) } func (m *HeaderFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HeaderFilter.Size(m) } func (m *HeaderFilter) XXX_DiscardUnknown() { xxx_messageInfo_HeaderFilter.DiscardUnknown(m) @@ -1182,13 +796,7 @@ func (m *HeaderFilter) GetHeader() *route.HeaderMatcher { return nil } -// Filters requests that received responses with an Envoy response flag set. -// A list of the response flags can be found -// in the access log formatter :ref:`documentation`. type ResponseFlagFilter struct { - // Only responses with the any of the flags listed in this field will be logged. - // This field is optional. If it is not specified, then any response flag will pass - // the filter check. Flags []string `protobuf:"bytes,1,rep,name=flags,proto3" json:"flags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1201,26 +809,18 @@ func (*ResponseFlagFilter) ProtoMessage() {} func (*ResponseFlagFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{11} } + func (m *ResponseFlagFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ResponseFlagFilter.Unmarshal(m, b) } func (m *ResponseFlagFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseFlagFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ResponseFlagFilter.Marshal(b, m, deterministic) } func (m *ResponseFlagFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_ResponseFlagFilter.Merge(m, src) } func (m *ResponseFlagFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ResponseFlagFilter.Size(m) } func (m *ResponseFlagFilter) XXX_DiscardUnknown() { xxx_messageInfo_ResponseFlagFilter.DiscardUnknown(m) @@ -1235,17 +835,12 @@ func (m *ResponseFlagFilter) GetFlags() []string { return nil } -// Filters gRPC requests based on their response status. If a gRPC status is not provided, the -// filter will infer the status from the HTTP status code. type GrpcStatusFilter struct { - // Logs only responses that have any one of the gRPC statuses in this field. - Statuses []GrpcStatusFilter_Status `protobuf:"varint,1,rep,packed,name=statuses,proto3,enum=envoy.config.filter.accesslog.v2.GrpcStatusFilter_Status" json:"statuses,omitempty"` - // If included and set to true, the filter will instead block all responses with a gRPC status or - // inferred gRPC status enumerated in statuses, and allow all other responses. - Exclude bool `protobuf:"varint,2,opt,name=exclude,proto3" json:"exclude,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Statuses []GrpcStatusFilter_Status `protobuf:"varint,1,rep,packed,name=statuses,proto3,enum=envoy.config.filter.accesslog.v2.GrpcStatusFilter_Status" json:"statuses,omitempty"` + Exclude bool `protobuf:"varint,2,opt,name=exclude,proto3" json:"exclude,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GrpcStatusFilter) Reset() { *m = GrpcStatusFilter{} } @@ -1254,26 +849,18 @@ func (*GrpcStatusFilter) ProtoMessage() {} func (*GrpcStatusFilter) Descriptor() ([]byte, []int) { return fileDescriptor_67bfd82f8b509e9f, []int{12} } + func (m *GrpcStatusFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GrpcStatusFilter.Unmarshal(m, b) } func (m *GrpcStatusFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GrpcStatusFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GrpcStatusFilter.Marshal(b, m, deterministic) } func (m *GrpcStatusFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_GrpcStatusFilter.Merge(m, src) } func (m *GrpcStatusFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GrpcStatusFilter.Size(m) } func (m *GrpcStatusFilter) XXX_DiscardUnknown() { xxx_messageInfo_GrpcStatusFilter.DiscardUnknown(m) @@ -1295,6 +882,95 @@ func (m *GrpcStatusFilter) GetExclude() bool { return false } +type ExtensionFilter struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *ExtensionFilter_Config + // *ExtensionFilter_TypedConfig + ConfigType isExtensionFilter_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtensionFilter) Reset() { *m = ExtensionFilter{} } +func (m *ExtensionFilter) String() string { return proto.CompactTextString(m) } +func (*ExtensionFilter) ProtoMessage() {} +func (*ExtensionFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_67bfd82f8b509e9f, []int{13} +} + +func (m *ExtensionFilter) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtensionFilter.Unmarshal(m, b) +} +func (m *ExtensionFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtensionFilter.Marshal(b, m, deterministic) +} +func (m *ExtensionFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionFilter.Merge(m, src) +} +func (m *ExtensionFilter) XXX_Size() int { + return xxx_messageInfo_ExtensionFilter.Size(m) +} +func (m *ExtensionFilter) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionFilter proto.InternalMessageInfo + +func (m *ExtensionFilter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isExtensionFilter_ConfigType interface { + isExtensionFilter_ConfigType() +} + +type ExtensionFilter_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type ExtensionFilter_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*ExtensionFilter_Config) isExtensionFilter_ConfigType() {} + +func (*ExtensionFilter_TypedConfig) isExtensionFilter_ConfigType() {} + +func (m *ExtensionFilter) GetConfigType() isExtensionFilter_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *ExtensionFilter) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*ExtensionFilter_Config); ok { + return x.Config + } + return nil +} + +func (m *ExtensionFilter) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*ExtensionFilter_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ExtensionFilter) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ExtensionFilter_Config)(nil), + (*ExtensionFilter_TypedConfig)(nil), + } +} + func init() { proto.RegisterEnum("envoy.config.filter.accesslog.v2.ComparisonFilter_Op", ComparisonFilter_Op_name, ComparisonFilter_Op_value) proto.RegisterEnum("envoy.config.filter.accesslog.v2.GrpcStatusFilter_Status", GrpcStatusFilter_Status_name, GrpcStatusFilter_Status_value) @@ -1311,6 +987,7 @@ func init() { proto.RegisterType((*HeaderFilter)(nil), "envoy.config.filter.accesslog.v2.HeaderFilter") proto.RegisterType((*ResponseFlagFilter)(nil), "envoy.config.filter.accesslog.v2.ResponseFlagFilter") proto.RegisterType((*GrpcStatusFilter)(nil), "envoy.config.filter.accesslog.v2.GrpcStatusFilter") + proto.RegisterType((*ExtensionFilter)(nil), "envoy.config.filter.accesslog.v2.ExtensionFilter") } func init() { @@ -1318,2831 +995,94 @@ func init() { } var fileDescriptor_67bfd82f8b509e9f = []byte{ - // 1321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xdb, 0x46, - 0x16, 0x36, 0x69, 0x5b, 0x96, 0x9e, 0x6d, 0x69, 0x32, 0xf1, 0xc6, 0x4e, 0x90, 0x35, 0xbc, 0x3c, - 0x05, 0x59, 0x40, 0x4a, 0x94, 0xdd, 0x00, 0x01, 0x7a, 0xa1, 0xc4, 0x91, 0x45, 0x98, 0x26, 0x9d, - 0x91, 0x98, 0xb8, 0x2d, 0x10, 0x82, 0x26, 0xc7, 0xb2, 0x10, 0x99, 0x24, 0x48, 0xca, 0x88, 0x8f, - 0xed, 0xb1, 0xc7, 0xfc, 0x35, 0x41, 0x7b, 0x49, 0x6f,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, 0xca, 0x03, 0x9d, 0x8a, 0x18, 0xca, 0xcf, 0xcb, 0x80, 0xe6, 0xc5, - 0x07, 0x9f, 0x42, 0x55, 0xe8, 0x18, 0x13, 0x49, 0xd4, 0xdb, 0xcf, 0xfe, 0xbc, 0x84, 0xe5, 0x5f, - 0x06, 0x9d, 0x06, 0xcf, 0x1f, 0xde, 0x4a, 0x6b, 0x4a, 0xae, 0x23, 0x25, 0x37, 0xde, 0x81, 0x35, - 0xf6, 0xc6, 0x9b, 0x4c, 0x7d, 0xa1, 0x27, 0x55, 0x5a, 0x2c, 0x95, 0x77, 0x32, 0x54, 0x04, 0x9e, - 0x8b, 0x84, 0x75, 0x80, 0x96, 0xf0, 0x06, 0x54, 0xbb, 0xaa, 0xd9, 0x25, 0x06, 0xd1, 0x90, 0x84, - 0xd7, 0x61, 0xcd, 0x36, 0x0f, 0x4c, 0xeb, 0xa5, 0x89, 0x64, 0xbc, 0x05, 0x48, 0x37, 0x5f, 0xa8, - 0x86, 0xae, 0x39, 0x2a, 0xdd, 0xb7, 0x0f, 0x89, 0x39, 0x44, 0xcb, 0xf8, 0x5f, 0x70, 0x4b, 0x23, - 0xaa, 0x66, 0xe8, 0x26, 0x71, 0xc8, 0x71, 0x97, 0x10, 0x8d, 0x68, 0x68, 0x05, 0x6f, 0x42, 0xcd, - 0xb4, 0x86, 0x4e, 0xcf, 0xb2, 0x4d, 0x0d, 0xad, 0x62, 0x0c, 0x75, 0xd5, 0xa0, 0x44, 0xd5, 0xbe, - 0x74, 0xc8, 0xb1, 0x3e, 0x18, 0x0e, 0x50, 0x85, 0x23, 0x8f, 0x08, 0x3d, 0xd4, 0x07, 0x03, 0xdd, - 0x32, 0x1d, 0x8d, 0x98, 0x3a, 0xd1, 0xd0, 0x1a, 0xbe, 0x03, 0x98, 0x92, 0x81, 0x65, 0xd3, 0x2e, - 0x27, 0xec, 0xab, 0xf6, 0x60, 0x48, 0x34, 0x54, 0xc5, 0xdb, 0x70, 0xbb, 0xa7, 0xea, 0x06, 0xd1, - 0x9c, 0x23, 0x4a, 0xba, 0x96, 0xa9, 0xe9, 0x43, 0xdd, 0x32, 0x51, 0x8d, 0x27, 0xa9, 0x76, 0x2c, - 0xca, 0xbd, 0x00, 0x23, 0xd8, 0xb0, 0xec, 0xa1, 0x63, 0xf5, 0x1c, 0xaa, 0x9a, 0xfb, 0x04, 0xad, - 0xe3, 0x5b, 0xb0, 0x69, 0x9b, 0xfa, 0xe1, 0x91, 0x41, 0x78, 0xc6, 0x44, 0x43, 0x1b, 0xbc, 0x48, - 0xdd, 0x1c, 0x12, 0x6a, 0xaa, 0x06, 0xda, 0xc4, 0x0d, 0x58, 0xb7, 0x4d, 0xf5, 0x85, 0xaa, 0x1b, - 0x6a, 0xc7, 0x20, 0xa8, 0xce, 0x73, 0xd7, 0xd4, 0xa1, 0xea, 0x18, 0xd6, 0x60, 0x80, 0x1a, 0xf8, - 0x36, 0x34, 0x6c, 0x53, 0xb5, 0x87, 0x7d, 0x62, 0x0e, 0xf5, 0xae, 0xca, 0x29, 0x50, 0x87, 0xfe, - 0xf4, 0x61, 0x57, 0xfa, 0xe5, 0xc3, 0xae, 0xf4, 0xdb, 0x87, 0x5d, 0x09, 0x9a, 0xe3, 0x50, 0x3c, - 0xba, 0x28, 0x0e, 0xdf, 0x5c, 0x2e, 0x7c, 0x8a, 0x9d, 0xba, 0x5a, 0xac, 0x8e, 0xf8, 0x67, 0xe5, - 0x91, 0xf4, 0x95, 0x7c, 0xd1, 0x3e, 0xa9, 0x64, 0xdf, 0x98, 0x4f, 0xfe, 0x08, 0x00, 0x00, 0xff, - 0xff, 0x97, 0xa8, 0x58, 0x3d, 0x28, 0x0c, 0x00, 0x00, + // 1418 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x3f, 0x6f, 0xdb, 0x46, + 0x1b, 0x37, 0x29, 0x5b, 0x96, 0x1e, 0x59, 0x12, 0x73, 0xf1, 0x1b, 0x2b, 0x79, 0x93, 0x17, 0x7e, + 0x39, 0xa5, 0x2d, 0x20, 0xa5, 0x4e, 0x13, 0x20, 0x40, 0x17, 0x52, 0x3c, 0x59, 0x44, 0x68, 0xd2, + 0x3d, 0x8a, 0xa9, 0x83, 0x06, 0x25, 0x68, 0xf2, 0x2c, 0x0b, 0x91, 0x49, 0x82, 0xa4, 0x8c, 0x78, + 0x2b, 0x3a, 0x15, 0x5d, 0x0a, 0x64, 0xea, 0x27, 0xe8, 0x27, 0xe8, 0xd0, 0x76, 0xe9, 0xda, 0xa5, + 0x43, 0x3f, 0x47, 0xb7, 0x4e, 0x85, 0x87, 0xa2, 0x20, 0x8f, 0xa4, 0x2d, 0x39, 0x80, 0xdc, 0xb4, + 0x1d, 0x24, 0xf2, 0xee, 0x9e, 0xdf, 0xef, 0xf9, 0xc3, 0xe7, 0x7e, 0x77, 0xf0, 0x80, 0xfa, 0xa7, + 0xc1, 0x59, 0xcf, 0x0d, 0xfc, 0xa3, 0xc9, 0xb8, 0x77, 0x34, 0x99, 0x26, 0x34, 0xea, 0x39, 0xae, + 0x4b, 0xe3, 0x78, 0x1a, 0x8c, 0x7b, 0xa7, 0x3b, 0x17, 0x83, 0x6e, 0x18, 0x05, 0x49, 0x80, 0xb6, + 0x33, 0x44, 0x97, 0x21, 0xba, 0x0c, 0xd1, 0xbd, 0x30, 0x3a, 0xdd, 0xb9, 0x73, 0x97, 0x71, 0x3a, + 0xe1, 0x24, 0xc5, 0xbb, 0x41, 0x44, 0x7b, 0x87, 0x4e, 0x4c, 0x19, 0xfe, 0xce, 0x3b, 0x73, 0xab, + 0x51, 0x30, 0x4b, 0x28, 0xfb, 0xb7, 0xdd, 0xe0, 0x24, 0x0c, 0x7c, 0xea, 0x27, 0x71, 0x6e, 0xda, + 0x61, 0xa6, 0xc9, 0x59, 0x48, 0x7b, 0x21, 0x8d, 0x5c, 0xea, 0x27, 0xf9, 0xca, 0xed, 0x71,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a8, 0xf5, 0x25, 0xbd, 0x8f, + 0x35, 0xac, 0x08, 0x1c, 0x6a, 0xc0, 0xba, 0xa5, 0x3f, 0xd5, 0x8d, 0x8f, 0x75, 0x81, 0x47, 0x9b, + 0x20, 0xa8, 0xfa, 0x33, 0x49, 0x53, 0x15, 0x5b, 0x22, 0xbb, 0xd6, 0x1e, 0xd6, 0x47, 0x42, 0x05, + 0xfd, 0x07, 0x6e, 0x28, 0x58, 0x52, 0x34, 0x55, 0xc7, 0x36, 0x3e, 0xe8, 0x63, 0xac, 0x60, 0x45, + 0x58, 0x45, 0x4d, 0xa8, 0xeb, 0xc6, 0xc8, 0x1e, 0x18, 0x96, 0xae, 0x08, 0x6b, 0x08, 0x41, 0x4b, + 0xd2, 0x08, 0x96, 0x94, 0xe7, 0x36, 0x3e, 0x50, 0xcd, 0x91, 0x29, 0x54, 0x53, 0xe4, 0x3e, 0x26, + 0x7b, 0xaa, 0x69, 0xaa, 0x86, 0x6e, 0x2b, 0x58, 0x57, 0xb1, 0x22, 0xac, 0xa3, 0x5b, 0x80, 0x08, + 0x36, 0x0d, 0x8b, 0xf4, 0x53, 0xc2, 0xa1, 0x64, 0x99, 0x23, 0xac, 0x08, 0x35, 0xb4, 0x05, 0x37, + 0x07, 0x92, 0xaa, 0x61, 0xc5, 0xde, 0x27, 0xb8, 0x6f, 0xe8, 0x8a, 0x3a, 0x52, 0x0d, 0x5d, 0xa8, + 0xa7, 0x41, 0x4a, 0xb2, 0x41, 0x52, 0x2b, 0x40, 0x02, 0x6c, 0x18, 0xd6, 0xc8, 0x36, 0x06, 0x36, + 0x91, 0xf4, 0x5d, 0x2c, 0x34, 0xd0, 0x0d, 0x68, 0x5a, 0xba, 0xba, 0xb7, 0xaf, 0xe1, 0x34, 0x62, + 0xac, 0x08, 0x1b, 0x69, 0x92, 0xaa, 0x3e, 0xc2, 0x44, 0x97, 0x34, 0xa1, 0x89, 0xda, 0xd0, 0xb0, + 0x74, 0xe9, 0x99, 0xa4, 0x6a, 0x92, 0xac, 0x61, 0xa1, 0x95, 0xc6, 0xae, 0x48, 0x23, 0xc9, 0xd6, + 0x0c, 0xd3, 0x14, 0xda, 0xe8, 0x26, 0xb4, 0x2d, 0x5d, 0xb2, 0x46, 0x43, 0xac, 0x8f, 0xd4, 0xbe, + 0x94, 0x52, 0x08, 0xe2, 0x37, 0x1c, 0xb4, 0x17, 0x4e, 0x90, 0x37, 0x5e, 0x96, 0x2f, 0x6e, 0xb8, + 0xfc, 0xdf, 0xb9, 0xe1, 0x56, 0xde, 0xf6, 0x86, 0x2b, 0xbf, 0xfc, 0xed, 0xeb, 0x3f, 0xbe, 0x5a, + 0xfb, 0x2f, 0xba, 0x3d, 0xd7, 0x58, 0x97, 0x3a, 0xea, 0xe1, 0x0f, 0x9f, 0xfd, 0xf4, 0x4b, 0x95, + 0x17, 0x38, 0xe8, 0x4e, 0x02, 0xd6, 0x7e, 0x61, 0x14, 0xbc, 0x3a, 0x5b, 0xda, 0x89, 0x72, 0x4b, + 0x2a, 0x46, 0xfb, 0x69, 0x3c, 0xfb, 0xdc, 0x61, 0x35, 0x0b, 0xec, 0xe1, 0x9f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x6e, 0x9f, 0xa8, 0xb4, 0x8d, 0x0d, 0x00, 0x00, } - -func (m *AccessLog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessLog) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Filter != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Filter.Size())) - n1, err := m.Filter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.ConfigType != nil { - nn2, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AccessLog_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Config.Size())) - n3, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - return i, nil -} -func (m *AccessLog_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.TypedConfig.Size())) - n4, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - return i, nil -} -func (m *AccessLogFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessLogFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.FilterSpecifier != nil { - nn5, err := m.FilterSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn5 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AccessLogFilter_StatusCodeFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.StatusCodeFilter != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.StatusCodeFilter.Size())) - n6, err := m.StatusCodeFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - return i, nil -} -func (m *AccessLogFilter_DurationFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.DurationFilter != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.DurationFilter.Size())) - n7, err := m.DurationFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - return i, nil -} -func (m *AccessLogFilter_NotHealthCheckFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.NotHealthCheckFilter != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.NotHealthCheckFilter.Size())) - n8, err := m.NotHealthCheckFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} -func (m *AccessLogFilter_TraceableFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TraceableFilter != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.TraceableFilter.Size())) - n9, err := m.TraceableFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - return i, nil -} -func (m *AccessLogFilter_RuntimeFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.RuntimeFilter != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.RuntimeFilter.Size())) - n10, err := m.RuntimeFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - return i, nil -} -func (m *AccessLogFilter_AndFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.AndFilter != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.AndFilter.Size())) - n11, err := m.AndFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} -func (m *AccessLogFilter_OrFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.OrFilter != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.OrFilter.Size())) - n12, err := m.OrFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - return i, nil -} -func (m *AccessLogFilter_HeaderFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.HeaderFilter != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.HeaderFilter.Size())) - n13, err := m.HeaderFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - return i, nil -} -func (m *AccessLogFilter_ResponseFlagFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.ResponseFlagFilter != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.ResponseFlagFilter.Size())) - n14, err := m.ResponseFlagFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - return i, nil -} -func (m *AccessLogFilter_GrpcStatusFilter) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.GrpcStatusFilter != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.GrpcStatusFilter.Size())) - n15, err := m.GrpcStatusFilter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - return i, nil -} -func (m *ComparisonFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ComparisonFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Op != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Op)) - } - if m.Value != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Value.Size())) - n16, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *StatusCodeFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatusCodeFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Comparison != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Comparison.Size())) - n17, err := m.Comparison.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DurationFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DurationFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Comparison != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Comparison.Size())) - n18, err := m.Comparison.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NotHealthCheckFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NotHealthCheckFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TraceableFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceableFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RuntimeFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RuntimeFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.RuntimeKey) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(len(m.RuntimeKey))) - i += copy(dAtA[i:], m.RuntimeKey) - } - if m.PercentSampled != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.PercentSampled.Size())) - n19, err := m.PercentSampled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.UseIndependentRandomness { - dAtA[i] = 0x18 - i++ - if m.UseIndependentRandomness { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AndFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AndFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Filters) > 0 { - for _, msg := range m.Filters { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OrFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OrFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Filters) > 0 { - for _, msg := range m.Filters { - dAtA[i] = 0x12 - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HeaderFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HeaderFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Header != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(m.Header.Size())) - n20, err := m.Header.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ResponseFlagFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseFlagFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Flags) > 0 { - for _, s := range m.Flags { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *GrpcStatusFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GrpcStatusFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Statuses) > 0 { - dAtA22 := make([]byte, len(m.Statuses)*10) - var j21 int - for _, num := range m.Statuses { - for num >= 1<<7 { - dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j21++ - } - dAtA22[j21] = uint8(num) - j21++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintAccesslog(dAtA, i, uint64(j21)) - i += copy(dAtA[i:], dAtA22[:j21]) - } - if m.Exclude { - dAtA[i] = 0x10 - i++ - if m.Exclude { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintAccesslog(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *AccessLog) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.Filter != nil { - l = m.Filter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AccessLog_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLog_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FilterSpecifier != nil { - n += m.FilterSpecifier.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AccessLogFilter_StatusCodeFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StatusCodeFilter != nil { - l = m.StatusCodeFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_DurationFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DurationFilter != nil { - l = m.DurationFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_NotHealthCheckFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NotHealthCheckFilter != nil { - l = m.NotHealthCheckFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_TraceableFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TraceableFilter != nil { - l = m.TraceableFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_RuntimeFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RuntimeFilter != nil { - l = m.RuntimeFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_AndFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AndFilter != nil { - l = m.AndFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_OrFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OrFilter != nil { - l = m.OrFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_HeaderFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HeaderFilter != nil { - l = m.HeaderFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_ResponseFlagFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseFlagFilter != nil { - l = m.ResponseFlagFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *AccessLogFilter_GrpcStatusFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GrpcStatusFilter != nil { - l = m.GrpcStatusFilter.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - return n -} -func (m *ComparisonFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Op != 0 { - n += 1 + sovAccesslog(uint64(m.Op)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StatusCodeFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Comparison != nil { - l = m.Comparison.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DurationFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Comparison != nil { - l = m.Comparison.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NotHealthCheckFilter) 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 *TraceableFilter) 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 *RuntimeFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RuntimeKey) - if l > 0 { - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.PercentSampled != nil { - l = m.PercentSampled.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.UseIndependentRandomness { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AndFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Filters) > 0 { - for _, e := range m.Filters { - l = e.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OrFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Filters) > 0 { - for _, e := range m.Filters { - l = e.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HeaderFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovAccesslog(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ResponseFlagFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Flags) > 0 { - for _, s := range m.Flags { - l = len(s) - n += 1 + l + sovAccesslog(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GrpcStatusFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Statuses) > 0 { - l = 0 - for _, e := range m.Statuses { - l += sovAccesslog(uint64(e)) - } - n += 1 + sovAccesslog(uint64(l)) + l - } - if m.Exclude { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAccesslog(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAccesslog(x uint64) (n int) { - return sovAccesslog(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AccessLog) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessLog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessLog: 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 ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - 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 Filter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Filter == nil { - m.Filter = &AccessLogFilter{} - } - if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &AccessLog_Config{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &AccessLog_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *AccessLogFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessLogFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessLogFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusCodeFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &StatusCodeFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_StatusCodeFilter{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DurationFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_DurationFilter{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotHealthCheckFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &NotHealthCheckFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_NotHealthCheckFilter{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceableFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TraceableFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_TraceableFilter{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RuntimeFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_RuntimeFilter{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AndFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AndFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_AndFilter{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &OrFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_OrFilter{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeaderFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &HeaderFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_HeaderFilter{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseFlagFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ResponseFlagFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_ResponseFlagFilter{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcStatusFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GrpcStatusFilter{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FilterSpecifier = &AccessLogFilter_GrpcStatusFilter{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *ComparisonFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ComparisonFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ComparisonFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - m.Op = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Op |= ComparisonFilter_Op(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &core.RuntimeUInt32{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *StatusCodeFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusCodeFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusCodeFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comparison", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Comparison == nil { - m.Comparison = &ComparisonFilter{} - } - if err := m.Comparison.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *DurationFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DurationFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DurationFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Comparison", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Comparison == nil { - m.Comparison = &ComparisonFilter{} - } - if err := m.Comparison.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *NotHealthCheckFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NotHealthCheckFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotHealthCheckFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *TraceableFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceableFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceableFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *RuntimeFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RuntimeFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RuntimeFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PercentSampled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PercentSampled == nil { - m.PercentSampled = &_type.FractionalPercent{} - } - if err := m.PercentSampled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UseIndependentRandomness", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UseIndependentRandomness = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *AndFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AndFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AndFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, &AccessLogFilter{}) - if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *OrFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OrFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OrFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, &AccessLogFilter{}) - if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *HeaderFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderFilter: 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 ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &route.HeaderMatcher{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *ResponseFlagFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseFlagFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseFlagFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Flags = append(m.Flags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 *GrpcStatusFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GrpcStatusFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GrpcStatusFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v GrpcStatusFilter_Status - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= GrpcStatusFilter_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Statuses = append(m.Statuses, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthAccesslog - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthAccesslog - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Statuses) == 0 { - m.Statuses = make([]GrpcStatusFilter_Status, 0, elementCount) - } - for iNdEx < postIndex { - var v GrpcStatusFilter_Status - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= GrpcStatusFilter_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Statuses = append(m.Statuses, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exclude", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccesslog - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exclude = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAccesslog(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAccesslog - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAccesslog - } - 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 skipAccesslog(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccesslog - } - 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, ErrIntOverflowAccesslog - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccesslog - } - 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, ErrInvalidLengthAccesslog - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthAccesslog - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccesslog - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAccesslog(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthAccesslog - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAccesslog = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccesslog = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go index d460d200a6..c450ae9450 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/accesslog/v2/accesslog.proto -package v2 +package envoy_config_filter_accesslog_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _accesslog_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on AccessLog with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *AccessLog) Validate() error { @@ -42,17 +45,12 @@ func (m *AccessLog) Validate() error { // no validation rules for Name - { - tmp := m.GetFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, } } } @@ -61,34 +59,24 @@ func (m *AccessLog) Validate() error { case *AccessLog_Config: - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLog_TypedConfig: - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, } } } @@ -164,170 +152,132 @@ func (m *AccessLogFilter) Validate() error { case *AccessLogFilter_StatusCodeFilter: - { - tmp := m.GetStatusCodeFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "StatusCodeFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetStatusCodeFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "StatusCodeFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_DurationFilter: - { - tmp := m.GetDurationFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "DurationFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDurationFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "DurationFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_NotHealthCheckFilter: - { - tmp := m.GetNotHealthCheckFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "NotHealthCheckFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetNotHealthCheckFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "NotHealthCheckFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_TraceableFilter: - { - tmp := m.GetTraceableFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "TraceableFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTraceableFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "TraceableFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_RuntimeFilter: - { - tmp := m.GetRuntimeFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "RuntimeFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRuntimeFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "RuntimeFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_AndFilter: - { - tmp := m.GetAndFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "AndFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetAndFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "AndFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_OrFilter: - { - tmp := m.GetOrFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "OrFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetOrFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "OrFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_HeaderFilter: - { - tmp := m.GetHeaderFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "HeaderFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetHeaderFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "HeaderFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_ResponseFlagFilter: - { - tmp := m.GetResponseFlagFilter() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "ResponseFlagFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetResponseFlagFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "ResponseFlagFilter", + reason: "embedded message failed validation", + cause: err, } } } case *AccessLogFilter_GrpcStatusFilter: - { - tmp := m.GetGrpcStatusFilter() + if v, ok := interface{}(m.GetGrpcStatusFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "GrpcStatusFilter", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + case *AccessLogFilter_ExtensionFilter: - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "GrpcStatusFilter", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetExtensionFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogFilterValidationError{ + field: "ExtensionFilter", + reason: "embedded message failed validation", + cause: err, } } } @@ -412,17 +362,12 @@ func (m *ComparisonFilter) Validate() error { } } - { - tmp := m.GetValue() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ComparisonFilterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ComparisonFilterValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, } } } @@ -499,17 +444,12 @@ func (m *StatusCodeFilter) Validate() error { } } - { - tmp := m.GetComparison() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return StatusCodeFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StatusCodeFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, } } } @@ -586,17 +526,12 @@ func (m *DurationFilter) Validate() error { } } - { - tmp := m.GetComparison() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DurationFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationFilterValidationError{ + field: "Comparison", + reason: "embedded message failed validation", + cause: err, } } } @@ -805,17 +740,12 @@ func (m *RuntimeFilter) Validate() error { } } - { - tmp := m.GetPercentSampled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RuntimeFilterValidationError{ - field: "PercentSampled", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetPercentSampled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RuntimeFilterValidationError{ + field: "PercentSampled", + reason: "embedded message failed validation", + cause: err, } } } @@ -896,17 +826,12 @@ func (m *AndFilter) Validate() error { for idx, item := range m.GetFilters() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AndFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AndFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -987,17 +912,12 @@ func (m *OrFilter) Validate() error { for idx, item := range m.GetFilters() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OrFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OrFilterValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -1076,17 +996,12 @@ func (m *HeaderFilter) Validate() error { } } - { - tmp := m.GetHeader() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HeaderFilterValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderFilterValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, } } } @@ -1162,7 +1077,7 @@ func (m *ResponseFlagFilter) Validate() error { if _, ok := _ResponseFlagFilter_Flags_InLookup[item]; !ok { return ResponseFlagFilterValidationError{ field: fmt.Sprintf("Flags[%v]", idx), - reason: "value must be in list [LH UH UT LR UR UF UC UO NR DI FI RL UAEX RLSE DC URX SI]", + reason: "value must be in list [LH UH UT LR UR UF UC UO NR DI FI RL UAEX RLSE DC URX SI IH DPE]", } } @@ -1245,6 +1160,8 @@ var _ResponseFlagFilter_Flags_InLookup = map[string]struct{}{ "DC": {}, "URX": {}, "SI": {}, + "IH": {}, + "DPE": {}, } // Validate checks the field values on GrpcStatusFilter with the rules defined @@ -1325,3 +1242,98 @@ var _ interface { Cause() error ErrorName() string } = GrpcStatusFilterValidationError{} + +// Validate checks the field values on ExtensionFilter with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ExtensionFilter) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + switch m.ConfigType.(type) { + + case *ExtensionFilter_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ExtensionFilter_TypedConfig: + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ExtensionFilterValidationError is the validation error returned by +// ExtensionFilter.Validate if the designated constraints aren't met. +type ExtensionFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtensionFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtensionFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtensionFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtensionFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtensionFilterValidationError) ErrorName() string { return "ExtensionFilterValidationError" } + +// Error satisfies the builtin error interface +func (e ExtensionFilterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExtensionFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtensionFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtensionFilterValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go index aacacc8fda..484489b808 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.go @@ -1,17 +1,15 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/network/ext_authz/v2/ext_authz.proto -package v2 +package envoy_config_filter_network_ext_authz_v2 import ( fmt "fmt" - io "io" - math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/gogo/protobuf/proto" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,26 +21,16 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// External Authorization filter calls out to an external service over the -// gRPC Authorization API defined by -// :ref:`CheckRequest `. -// A failed check will cause this filter to close the TCP connection. type ExtAuthz struct { - // The prefix to use when emitting statistics. - StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The external authorization gRPC service configuration. - // The default timeout is set to 200ms by this filter. - GrpcService *core.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` - // The filter's behaviour in case the external authorization service does - // not respond back. When it is set to true, Envoy will also allow traffic in case of - // communication failure between authorization service and the proxy. - // Defaults to false. - FailureModeAllow bool `protobuf:"varint,3,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + GrpcService *core.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + FailureModeAllow bool `protobuf:"varint,3,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` + IncludePeerCertificate bool `protobuf:"varint,4,opt,name=include_peer_certificate,json=includePeerCertificate,proto3" json:"include_peer_certificate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ExtAuthz) Reset() { *m = ExtAuthz{} } @@ -51,26 +39,18 @@ func (*ExtAuthz) ProtoMessage() {} func (*ExtAuthz) Descriptor() ([]byte, []int) { return fileDescriptor_3ec2615c2696024a, []int{0} } + func (m *ExtAuthz) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ExtAuthz.Unmarshal(m, b) } func (m *ExtAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtAuthz.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ExtAuthz.Marshal(b, m, deterministic) } func (m *ExtAuthz) XXX_Merge(src proto.Message) { xxx_messageInfo_ExtAuthz.Merge(m, src) } func (m *ExtAuthz) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ExtAuthz.Size(m) } func (m *ExtAuthz) XXX_DiscardUnknown() { xxx_messageInfo_ExtAuthz.DiscardUnknown(m) @@ -99,6 +79,13 @@ func (m *ExtAuthz) GetFailureModeAllow() bool { return false } +func (m *ExtAuthz) GetIncludePeerCertificate() bool { + if m != nil { + return m.IncludePeerCertificate + } + return false +} + func init() { proto.RegisterType((*ExtAuthz)(nil), "envoy.config.filter.network.ext_authz.v2.ExtAuthz") } @@ -108,370 +95,29 @@ func init() { } var fileDescriptor_3ec2615c2696024a = []byte{ - // 307 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x41, 0x4b, 0xc3, 0x30, - 0x14, 0xc7, 0xc9, 0x26, 0xb2, 0x65, 0x0a, 0xd2, 0x8b, 0x63, 0x87, 0x52, 0xc4, 0x43, 0x11, 0x49, - 0xa0, 0x82, 0x78, 0xdd, 0x40, 0x3c, 0x09, 0xa5, 0x9e, 0xf4, 0x52, 0x62, 0xfb, 0x5a, 0x83, 0xb5, - 0x09, 0x59, 0x96, 0x75, 0x7e, 0x21, 0xbf, 0x83, 0x27, 0x8f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- 0x3d, 0x1d, 0x06, 0x28, 0x1c, 0x25, 0x47, 0x5b, 0xe5, 0x56, 0xe4, 0x30, 0xb7, 0xff, 0x8b, 0xfb, - 0xcf, 0xd6, 0x47, 0x5f, 0xad, 0x8f, 0xbe, 0x5b, 0x1f, 0xe1, 0x4b, 0x2e, 0x5c, 0x94, 0x54, 0xa2, - 0xd9, 0x90, 0xff, 0x9e, 0x6b, 0x71, 0xb8, 0x5b, 0x36, 0xb6, 0xeb, 0xc7, 0xe8, 0x61, 0x60, 0xa2, - 0xc7, 0xfd, 0xee, 0x16, 0x17, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x17, 0xc6, 0x56, 0xb0, - 0x01, 0x00, 0x00, + // 384 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0xee, 0xd3, 0x30, + 0x10, 0xc6, 0xe5, 0x52, 0x4a, 0x71, 0x41, 0xaa, 0x32, 0x40, 0x54, 0x89, 0x2a, 0x42, 0x0c, 0x19, + 0xc0, 0x96, 0x52, 0x09, 0x75, 0x6d, 0x10, 0x62, 0x42, 0x8a, 0xca, 0x03, 0x44, 0xc6, 0xb9, 0x04, + 0x8b, 0xd4, 0xb6, 0x1c, 0x27, 0x4d, 0x99, 0x98, 0x58, 0x59, 0x79, 0x16, 0x9e, 0x80, 0x95, 0x27, + 0xe0, 0x1d, 0x18, 0x19, 0x10, 0x72, 0x9c, 0x2a, 0x48, 0x30, 0xfc, 0xb7, 0x5c, 0x7e, 0xf7, 0x9d, + 0xef, 0xbe, 0x0f, 0xef, 0x41, 0x76, 0xea, 0x42, 0xb9, 0x92, 0xa5, 0xa8, 0x68, 0x29, 0x6a, 0x0b, + 0x86, 0x4a, 0xb0, 0x67, 0x65, 0xde, 0x53, 0xe8, 0x6d, 0xce, 0x5a, 0xfb, 0xee, 0x03, 0xed, 0x92, + 0xa9, 0x20,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, 0x83, 0xb1, 0xa2, 0x14, 0x9c, 0x59, 0x08, 0xe7, + 0x83, 0xe6, 0xc1, 0xc8, 0x33, 0x00, 0xf3, 0x62, 0xa2, 0xe9, 0x27, 0xf4, 0xf3, 0xcb, 0xef, 0xcf, + 0xb7, 0x69, 0xf0, 0xcc, 0x2f, 0x07, 0xbd, 0x05, 0xd9, 0x38, 0x8b, 0xc6, 0x58, 0x9a, 0xff, 0xe5, + 0xb2, 0xfb, 0xfa, 0xf1, 0xdb, 0xf7, 0xc5, 0x6c, 0x8d, 0xf0, 0x73, 0xa1, 0xfc, 0x59, 0xda, 0xa8, + 0xfe, 0x42, 0x6e, 0x9a, 0x6b, 0x7a, 0xff, 0x6a, 0x6b, 0xe6, 0x8c, 0xce, 0xd0, 0xdb, 0xc5, 0xe0, + 0xf8, 0xee, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x56, 0xa0, 0x9b, 0x55, 0x02, 0x00, 0x00, } - -func (m *ExtAuthz) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtAuthz) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StatPrefix) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintExtAuthz(dAtA, i, uint64(len(m.StatPrefix))) - i += copy(dAtA[i:], m.StatPrefix) - } - if m.GrpcService != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExtAuthz(dAtA, i, uint64(m.GrpcService.Size())) - n1, err := m.GrpcService.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.FailureModeAllow { - dAtA[i] = 0x18 - i++ - if m.FailureModeAllow { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintExtAuthz(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ExtAuthz) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StatPrefix) - if l > 0 { - n += 1 + l + sovExtAuthz(uint64(l)) - } - if m.GrpcService != nil { - l = m.GrpcService.Size() - n += 1 + l + sovExtAuthz(uint64(l)) - } - if m.FailureModeAllow { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovExtAuthz(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozExtAuthz(x uint64) (n int) { - return sovExtAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExtAuthz) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtAuthz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtAuthz: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtAuthz: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtAuthz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthExtAuthz - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthExtAuthz - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcService", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtAuthz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExtAuthz - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExtAuthz - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GrpcService == nil { - m.GrpcService = &core.GrpcService{} - } - if err := m.GrpcService.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FailureModeAllow", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtAuthz - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FailureModeAllow = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipExtAuthz(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExtAuthz - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthExtAuthz - } - 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 skipExtAuthz(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExtAuthz - } - 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, ErrIntOverflowExtAuthz - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExtAuthz - } - 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, ErrInvalidLengthExtAuthz - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthExtAuthz - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExtAuthz - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipExtAuthz(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthExtAuthz - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthExtAuthz = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowExtAuthz = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go index 6453602e82..5a05f5464f 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2/ext_authz.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/ext_authz/v2/ext_authz.proto -package v2 +package envoy_config_filter_network_ext_authz_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _ext_authz_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on ExtAuthz with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *ExtAuthz) Validate() error { @@ -47,23 +50,20 @@ func (m *ExtAuthz) Validate() error { } } - { - tmp := m.GetGrpcService() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ExtAuthzValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtAuthzValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for FailureModeAllow + // no validation rules for IncludePeerCertificate + return nil } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go index 9f1a8db270..59fa5079ff 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.go @@ -1,65 +1,59 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto -package v2 +package envoy_config_filter_network_http_connection_manager_v2 import ( fmt "fmt" - io "io" - math "math" - time "time" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" v21 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2" + v23 "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2" _type "github.com/envoyproxy/go-control-plane/envoy/type" + v22 "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + duration "github.com/golang/protobuf/ptypes/duration" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type HttpConnectionManager_CodecType int32 const ( - // For every new connection, the connection manager will determine which - // codec to use. This mode supports both ALPN for TLS listeners as well as - // protocol inference for plaintext listeners. If ALPN data is available, it - // is preferred, otherwise protocol inference is used. In almost all cases, - // this is the right option to choose for this setting. - AUTO HttpConnectionManager_CodecType = 0 - // The connection manager will assume that the client is speaking HTTP/1.1. - HTTP1 HttpConnectionManager_CodecType = 1 - // The connection manager will assume that the client is speaking HTTP/2 - // (Envoy does not require HTTP/2 to take place over TLS or to use ALPN. - // Prior knowledge is allowed). - HTTP2 HttpConnectionManager_CodecType = 2 + HttpConnectionManager_AUTO HttpConnectionManager_CodecType = 0 + HttpConnectionManager_HTTP1 HttpConnectionManager_CodecType = 1 + HttpConnectionManager_HTTP2 HttpConnectionManager_CodecType = 2 + HttpConnectionManager_HTTP3 HttpConnectionManager_CodecType = 3 ) var HttpConnectionManager_CodecType_name = map[int32]string{ 0: "AUTO", 1: "HTTP1", 2: "HTTP2", + 3: "HTTP3", } var HttpConnectionManager_CodecType_value = map[string]int32{ "AUTO": 0, "HTTP1": 1, "HTTP2": 2, + "HTTP3": 3, } func (x HttpConnectionManager_CodecType) String() string { @@ -70,25 +64,42 @@ func (HttpConnectionManager_CodecType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{0, 0} } -// How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP -// header. +type HttpConnectionManager_ServerHeaderTransformation int32 + +const ( + HttpConnectionManager_OVERWRITE HttpConnectionManager_ServerHeaderTransformation = 0 + HttpConnectionManager_APPEND_IF_ABSENT HttpConnectionManager_ServerHeaderTransformation = 1 + HttpConnectionManager_PASS_THROUGH HttpConnectionManager_ServerHeaderTransformation = 2 +) + +var HttpConnectionManager_ServerHeaderTransformation_name = map[int32]string{ + 0: "OVERWRITE", + 1: "APPEND_IF_ABSENT", + 2: "PASS_THROUGH", +} + +var HttpConnectionManager_ServerHeaderTransformation_value = map[string]int32{ + "OVERWRITE": 0, + "APPEND_IF_ABSENT": 1, + "PASS_THROUGH": 2, +} + +func (x HttpConnectionManager_ServerHeaderTransformation) String() string { + return proto.EnumName(HttpConnectionManager_ServerHeaderTransformation_name, int32(x)) +} + +func (HttpConnectionManager_ServerHeaderTransformation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{0, 1} +} + type HttpConnectionManager_ForwardClientCertDetails int32 const ( - // Do not send the XFCC header to the next hop. This is the default value. - SANITIZE HttpConnectionManager_ForwardClientCertDetails = 0 - // When the client connection is mTLS (Mutual TLS), forward the XFCC header - // in the request. - FORWARD_ONLY HttpConnectionManager_ForwardClientCertDetails = 1 - // When the client connection is mTLS, append the client certificate - // information to the request’s XFCC header and forward it. - APPEND_FORWARD HttpConnectionManager_ForwardClientCertDetails = 2 - // When the client connection is mTLS, reset the XFCC header with the client - // certificate information and send it to the next hop. - SANITIZE_SET HttpConnectionManager_ForwardClientCertDetails = 3 - // Always forward the XFCC header in the request, regardless of whether the - // client connection is mTLS. - ALWAYS_FORWARD_ONLY HttpConnectionManager_ForwardClientCertDetails = 4 + HttpConnectionManager_SANITIZE HttpConnectionManager_ForwardClientCertDetails = 0 + HttpConnectionManager_FORWARD_ONLY HttpConnectionManager_ForwardClientCertDetails = 1 + HttpConnectionManager_APPEND_FORWARD HttpConnectionManager_ForwardClientCertDetails = 2 + HttpConnectionManager_SANITIZE_SET HttpConnectionManager_ForwardClientCertDetails = 3 + HttpConnectionManager_ALWAYS_FORWARD_ONLY HttpConnectionManager_ForwardClientCertDetails = 4 ) var HttpConnectionManager_ForwardClientCertDetails_name = map[int32]string{ @@ -112,16 +123,14 @@ func (x HttpConnectionManager_ForwardClientCertDetails) String() string { } func (HttpConnectionManager_ForwardClientCertDetails) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8fe65268985a88f7, []int{0, 1} + return fileDescriptor_8fe65268985a88f7, []int{0, 2} } type HttpConnectionManager_Tracing_OperationName int32 const ( - // The HTTP listener is used for ingress/incoming requests. - INGRESS HttpConnectionManager_Tracing_OperationName = 0 - // The HTTP listener is used for egress/outgoing requests. - EGRESS HttpConnectionManager_Tracing_OperationName = 1 + HttpConnectionManager_Tracing_INGRESS HttpConnectionManager_Tracing_OperationName = 0 + HttpConnectionManager_Tracing_EGRESS HttpConnectionManager_Tracing_OperationName = 1 ) var HttpConnectionManager_Tracing_OperationName_name = map[int32]string{ @@ -142,208 +151,47 @@ func (HttpConnectionManager_Tracing_OperationName) EnumDescriptor() ([]byte, []i return fileDescriptor_8fe65268985a88f7, []int{0, 0, 0} } -// [#comment:next free field: 31] type HttpConnectionManager struct { - // Supplies the type of codec that the connection manager should use. - CodecType HttpConnectionManager_CodecType `protobuf:"varint,1,opt,name=codec_type,json=codecType,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_CodecType" json:"codec_type,omitempty"` - // The human readable prefix to use when emitting statistics for the - // connection manager. See the :ref:`statistics documentation ` for - // more information. - StatPrefix string `protobuf:"bytes,2,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + CodecType HttpConnectionManager_CodecType `protobuf:"varint,1,opt,name=codec_type,json=codecType,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_CodecType" json:"codec_type,omitempty"` + StatPrefix string `protobuf:"bytes,2,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // Types that are valid to be assigned to RouteSpecifier: // *HttpConnectionManager_Rds // *HttpConnectionManager_RouteConfig - RouteSpecifier isHttpConnectionManager_RouteSpecifier `protobuf_oneof:"route_specifier"` - // A list of individual HTTP filters that make up the filter chain for - // requests made to the connection manager. Order matters as the filters are - // processed sequentially as request events happen. - HttpFilters []*HttpFilter `protobuf:"bytes,5,rep,name=http_filters,json=httpFilters,proto3" json:"http_filters,omitempty"` - // Whether the connection manager manipulates the :ref:`config_http_conn_man_headers_user-agent` - // and :ref:`config_http_conn_man_headers_downstream-service-cluster` headers. See the linked - // documentation for more information. Defaults to false. - AddUserAgent *types.BoolValue `protobuf:"bytes,6,opt,name=add_user_agent,json=addUserAgent,proto3" json:"add_user_agent,omitempty"` - // Presence of the object defines whether the connection manager - // emits :ref:`tracing ` data to the :ref:`configured tracing provider - // `. - Tracing *HttpConnectionManager_Tracing `protobuf:"bytes,7,opt,name=tracing,proto3" json:"tracing,omitempty"` - // Additional HTTP/1 settings that are passed to the HTTP/1 codec. - HttpProtocolOptions *core.Http1ProtocolOptions `protobuf:"bytes,8,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` - // Additional HTTP/2 settings that are passed directly to the HTTP/2 codec. - Http2ProtocolOptions *core.Http2ProtocolOptions `protobuf:"bytes,9,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` - // An optional override that the connection manager will write to the server - // header in responses. If not set, the default is *envoy*. - ServerName string `protobuf:"bytes,10,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"` - // The maximum request headers size for incoming connections. - // If unconfigured, the default max request headers allowed is 60 KiB. - // Requests that exceed this limit will receive a 431 response. - // The max configurable limit is 96 KiB, based on current implementation - // constraints. - MaxRequestHeadersKb *types.UInt32Value `protobuf:"bytes,29,opt,name=max_request_headers_kb,json=maxRequestHeadersKb,proto3" json:"max_request_headers_kb,omitempty"` - // The idle timeout for connections managed by the connection manager. The - // idle timeout is defined as the period in which there are no active - // requests. If not set, there is no idle timeout. When the idle timeout is - // reached the connection will be closed. If the connection is an HTTP/2 - // connection a drain sequence will occur prior to closing the connection. See - // :ref:`drain_timeout - // `. - IdleTimeout *time.Duration `protobuf:"bytes,11,opt,name=idle_timeout,json=idleTimeout,proto3,stdduration" json:"idle_timeout,omitempty"` - // The stream idle timeout for connections managed by the connection manager. - // If not specified, this defaults to 5 minutes. The default value was selected - // so as not to interfere with any smaller configured timeouts that may have - // existed in configurations prior to the introduction of this feature, while - // introducing robustness to TCP connections that terminate without a FIN. - // - // This idle timeout applies to new streams and is overridable by the - // :ref:`route-level idle_timeout - // `. Even on a stream in - // which the override applies, prior to receipt of the initial request - // headers, the :ref:`stream_idle_timeout - // ` - // applies. 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. - // - // Note that it is possible to idle timeout even if the wire traffic for a stream is non-idle, due - // to the granularity of events presented to the connection manager. For example, while receiving - // very large request headers, it may be the case that there is traffic regularly arriving on the - // wire while the connection manage is only able to observe the end-of-headers event, hence the - // stream may still idle timeout. - // - // A value of 0 will completely disable the connection manager stream idle - // timeout, although per-route idle timeout overrides will continue to apply. - StreamIdleTimeout *time.Duration `protobuf:"bytes,24,opt,name=stream_idle_timeout,json=streamIdleTimeout,proto3,stdduration" json:"stream_idle_timeout,omitempty"` - // A timeout for idle requests managed by the connection manager. - // The timer is activated when the request is initiated, and is disarmed when the last byte of the - // request is sent upstream (i.e. all decoding filters have processed the request), OR when the - // response is initiated. If not specified or set to 0, this timeout is disabled. - RequestTimeout *time.Duration `protobuf:"bytes,28,opt,name=request_timeout,json=requestTimeout,proto3,stdduration" json:"request_timeout,omitempty"` - // The time that Envoy will wait between sending an HTTP/2 “shutdown - // notification” (GOAWAY frame with max stream ID) and a final GOAWAY frame. - // This is used so that Envoy provides a grace period for new streams that - // race with the final GOAWAY frame. During this grace period, Envoy will - // continue to accept new streams. After the grace period, a final GOAWAY - // frame is sent and Envoy will start refusing new streams. Draining occurs - // both when a connection hits the idle timeout or during general server - // draining. The default grace period is 5000 milliseconds (5 seconds) if this - // option is not specified. - DrainTimeout *time.Duration `protobuf:"bytes,12,opt,name=drain_timeout,json=drainTimeout,proto3,stdduration" json:"drain_timeout,omitempty"` - // The delayed close timeout is for downstream connections managed by the HTTP connection manager. - // It is defined as a grace period after connection close processing has been locally initiated - // during which Envoy will wait for the peer to close (i.e., a TCP FIN/RST is received by Envoy - // from the downstream connection) prior to Envoy closing the socket associated with that - // connection. - // NOTE: This timeout is enforced even when the socket associated with the downstream connection - // is pending a flush of the write buffer. However, any progress made writing data to the socket - // will restart the timer associated with this timeout. This means that the total grace period for - // a socket in this state will be - // +. - // - // Delaying Envoy's connection close and giving the peer the opportunity to initiate the close - // sequence mitigates a race condition that exists when downstream clients do not drain/process - // data in a connection's receive buffer after a remote close has been detected via a socket - // write(). This race leads to such clients failing to process the response code sent by Envoy, - // which could result in erroneous downstream processing. - // - // If the timeout triggers, Envoy will close the connection's socket. - // - // The default timeout is 1000 ms if this option is not specified. - // - // .. NOTE:: - // To be useful in avoiding the race condition described above, this timeout must be set - // to *at least* +<100ms to account for - // a reasonsable "worst" case processing time for a full iteration of Envoy's event loop>. - // - // .. WARNING:: - // A value of 0 will completely disable delayed close processing. When disabled, the downstream - // connection's socket will be closed immediately after the write flush is completed or will - // never close if the write flush does not complete. - DelayedCloseTimeout *time.Duration `protobuf:"bytes,26,opt,name=delayed_close_timeout,json=delayedCloseTimeout,proto3,stdduration" json:"delayed_close_timeout,omitempty"` - // Configuration for :ref:`HTTP access logs ` - // emitted by the connection manager. - AccessLog []*v21.AccessLog `protobuf:"bytes,13,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` - // If set to true, the connection manager will use the real remote address - // of the client connection when determining internal versus external origin and manipulating - // various headers. If set to false or absent, the connection manager will use the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for`, - // :ref:`config_http_conn_man_headers_x-envoy-internal`, and - // :ref:`config_http_conn_man_headers_x-envoy-external-address` for more information. - UseRemoteAddress *types.BoolValue `protobuf:"bytes,14,opt,name=use_remote_address,json=useRemoteAddress,proto3" json:"use_remote_address,omitempty"` - // The number of additional ingress proxy hops from the right side of the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when - // determining the origin client's IP address. The default is zero if this option - // is not specified. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. - XffNumTrustedHops uint32 `protobuf:"varint,19,opt,name=xff_num_trusted_hops,json=xffNumTrustedHops,proto3" json:"xff_num_trusted_hops,omitempty"` - // Configures what network addresses are considered internal for stats and header sanitation - // purposes. If unspecified, only RFC1918 IP addresses will be considered internal. - // See the documentation for :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information about internal/external addresses. - InternalAddressConfig *HttpConnectionManager_InternalAddressConfig `protobuf:"bytes,25,opt,name=internal_address_config,json=internalAddressConfig,proto3" json:"internal_address_config,omitempty"` - // If set, Envoy will not append the remote address to the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. This may be used in - // conjunction with HTTP filters that explicitly manipulate XFF after the HTTP connection manager - // has mutated the request headers. While :ref:`use_remote_address - // ` - // will also suppress XFF addition, it has consequences for logging and other - // Envoy uses of the remote address, so *skip_xff_append* should be used - // when only an elision of XFF addition is intended. - SkipXffAppend bool `protobuf:"varint,21,opt,name=skip_xff_append,json=skipXffAppend,proto3" json:"skip_xff_append,omitempty"` - // Via header value to append to request and response headers. If this is - // empty, no via header will be appended. - Via string `protobuf:"bytes,22,opt,name=via,proto3" json:"via,omitempty"` - // Whether the connection manager will generate the :ref:`x-request-id - // ` header if it does not exist. This defaults to - // true. Generating a random UUID4 is expensive so in high throughput scenarios where this feature - // is not desired it can be disabled. - GenerateRequestId *types.BoolValue `protobuf:"bytes,15,opt,name=generate_request_id,json=generateRequestId,proto3" json:"generate_request_id,omitempty"` - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - ForwardClientCertDetails HttpConnectionManager_ForwardClientCertDetails `protobuf:"varint,16,opt,name=forward_client_cert_details,json=forwardClientCertDetails,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_ForwardClientCertDetails" json:"forward_client_cert_details,omitempty"` - // This field is valid only when :ref:`forward_client_cert_details - // ` - // is APPEND_FORWARD or SANITIZE_SET and the client connection is mTLS. It specifies the fields in - // the client certificate to be forwarded. Note that in the - // :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, *Hash* is always set, and - // *By* is always set when the client certificate presents the URI type Subject Alternative Name - // value. - SetCurrentClientCertDetails *HttpConnectionManager_SetCurrentClientCertDetails `protobuf:"bytes,17,opt,name=set_current_client_cert_details,json=setCurrentClientCertDetails,proto3" json:"set_current_client_cert_details,omitempty"` - // If proxy_100_continue is true, Envoy will proxy incoming "Expect: - // 100-continue" headers upstream, and forward "100 Continue" responses - // downstream. If this is false or not set, Envoy will instead strip the - // "Expect: 100-continue" header, and send a "100 Continue" response itself. - Proxy_100Continue bool `protobuf:"varint,18,opt,name=proxy_100_continue,json=proxy100Continue,proto3" json:"proxy_100_continue,omitempty"` - // If - // :ref:`use_remote_address - // ` - // is true and represent_ipv4_remote_address_as_ipv4_mapped_ipv6 is true and the remote address is - // an IPv4 address, the address will be mapped to IPv6 before it is appended to *x-forwarded-for*. - // This is useful for testing compatibility of upstream services that parse the header value. For - // example, 50.0.0.1 is represented as ::FFFF:50.0.0.1. See `IPv4-Mapped IPv6 Addresses - // `_ for details. This will also affect the - // :ref:`config_http_conn_man_headers_x-envoy-external-address` header. See - // :ref:`http_connection_manager.represent_ipv4_remote_address_as_ipv4_mapped_ipv6 - // ` for runtime - // control. - // [#not-implemented-hide:] - RepresentIpv4RemoteAddressAsIpv4MappedIpv6 bool `protobuf:"varint,20,opt,name=represent_ipv4_remote_address_as_ipv4_mapped_ipv6,json=representIpv4RemoteAddressAsIpv4MappedIpv6,proto3" json:"represent_ipv4_remote_address_as_ipv4_mapped_ipv6,omitempty"` - UpgradeConfigs []*HttpConnectionManager_UpgradeConfig `protobuf:"bytes,23,rep,name=upgrade_configs,json=upgradeConfigs,proto3" json:"upgrade_configs,omitempty"` - // Should paths be normalized according to RFC 3986 before any processing of - // requests by HTTP filters or routing? This affects the upstream *:path* header - // as well. For paths that fail this check, Envoy will respond with 400 to - // paths that are malformed. This defaults to false currently but will default - // true in the future. When not specified, this value may be overridden by the - // runtime variable - // :ref:`http_connection_manager.normalize_path`. - // See `Normalization and Comparison ` - // for details of normalization. - // Note that Envoy does not perform - // `case normalization ` - NormalizePath *types.BoolValue `protobuf:"bytes,30,opt,name=normalize_path,json=normalizePath,proto3" json:"normalize_path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // *HttpConnectionManager_ScopedRoutes + RouteSpecifier isHttpConnectionManager_RouteSpecifier `protobuf_oneof:"route_specifier"` + HttpFilters []*HttpFilter `protobuf:"bytes,5,rep,name=http_filters,json=httpFilters,proto3" json:"http_filters,omitempty"` + AddUserAgent *wrappers.BoolValue `protobuf:"bytes,6,opt,name=add_user_agent,json=addUserAgent,proto3" json:"add_user_agent,omitempty"` + Tracing *HttpConnectionManager_Tracing `protobuf:"bytes,7,opt,name=tracing,proto3" json:"tracing,omitempty"` + CommonHttpProtocolOptions *core.HttpProtocolOptions `protobuf:"bytes,35,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions,proto3" json:"common_http_protocol_options,omitempty"` + HttpProtocolOptions *core.Http1ProtocolOptions `protobuf:"bytes,8,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` + Http2ProtocolOptions *core.Http2ProtocolOptions `protobuf:"bytes,9,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` + ServerName string `protobuf:"bytes,10,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"` + ServerHeaderTransformation HttpConnectionManager_ServerHeaderTransformation `protobuf:"varint,34,opt,name=server_header_transformation,json=serverHeaderTransformation,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_ServerHeaderTransformation" json:"server_header_transformation,omitempty"` + MaxRequestHeadersKb *wrappers.UInt32Value `protobuf:"bytes,29,opt,name=max_request_headers_kb,json=maxRequestHeadersKb,proto3" json:"max_request_headers_kb,omitempty"` + IdleTimeout *duration.Duration `protobuf:"bytes,11,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // Deprecated: Do not use. + StreamIdleTimeout *duration.Duration `protobuf:"bytes,24,opt,name=stream_idle_timeout,json=streamIdleTimeout,proto3" json:"stream_idle_timeout,omitempty"` + RequestTimeout *duration.Duration `protobuf:"bytes,28,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` + DrainTimeout *duration.Duration `protobuf:"bytes,12,opt,name=drain_timeout,json=drainTimeout,proto3" json:"drain_timeout,omitempty"` + DelayedCloseTimeout *duration.Duration `protobuf:"bytes,26,opt,name=delayed_close_timeout,json=delayedCloseTimeout,proto3" json:"delayed_close_timeout,omitempty"` + AccessLog []*v21.AccessLog `protobuf:"bytes,13,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` + UseRemoteAddress *wrappers.BoolValue `protobuf:"bytes,14,opt,name=use_remote_address,json=useRemoteAddress,proto3" json:"use_remote_address,omitempty"` + XffNumTrustedHops uint32 `protobuf:"varint,19,opt,name=xff_num_trusted_hops,json=xffNumTrustedHops,proto3" json:"xff_num_trusted_hops,omitempty"` + InternalAddressConfig *HttpConnectionManager_InternalAddressConfig `protobuf:"bytes,25,opt,name=internal_address_config,json=internalAddressConfig,proto3" json:"internal_address_config,omitempty"` + SkipXffAppend bool `protobuf:"varint,21,opt,name=skip_xff_append,json=skipXffAppend,proto3" json:"skip_xff_append,omitempty"` + Via string `protobuf:"bytes,22,opt,name=via,proto3" json:"via,omitempty"` + GenerateRequestId *wrappers.BoolValue `protobuf:"bytes,15,opt,name=generate_request_id,json=generateRequestId,proto3" json:"generate_request_id,omitempty"` + PreserveExternalRequestId bool `protobuf:"varint,32,opt,name=preserve_external_request_id,json=preserveExternalRequestId,proto3" json:"preserve_external_request_id,omitempty"` + ForwardClientCertDetails HttpConnectionManager_ForwardClientCertDetails `protobuf:"varint,16,opt,name=forward_client_cert_details,json=forwardClientCertDetails,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_ForwardClientCertDetails" json:"forward_client_cert_details,omitempty"` + SetCurrentClientCertDetails *HttpConnectionManager_SetCurrentClientCertDetails `protobuf:"bytes,17,opt,name=set_current_client_cert_details,json=setCurrentClientCertDetails,proto3" json:"set_current_client_cert_details,omitempty"` + Proxy_100Continue bool `protobuf:"varint,18,opt,name=proxy_100_continue,json=proxy100Continue,proto3" json:"proxy_100_continue,omitempty"` + RepresentIpv4RemoteAddressAsIpv4MappedIpv6 bool `protobuf:"varint,20,opt,name=represent_ipv4_remote_address_as_ipv4_mapped_ipv6,json=representIpv4RemoteAddressAsIpv4MappedIpv6,proto3" json:"represent_ipv4_remote_address_as_ipv4_mapped_ipv6,omitempty"` + UpgradeConfigs []*HttpConnectionManager_UpgradeConfig `protobuf:"bytes,23,rep,name=upgrade_configs,json=upgradeConfigs,proto3" json:"upgrade_configs,omitempty"` + NormalizePath *wrappers.BoolValue `protobuf:"bytes,30,opt,name=normalize_path,json=normalizePath,proto3" json:"normalize_path,omitempty"` + MergeSlashes bool `protobuf:"varint,33,opt,name=merge_slashes,json=mergeSlashes,proto3" json:"merge_slashes,omitempty"` + RequestIdExtension *RequestIDExtension `protobuf:"bytes,36,opt,name=request_id_extension,json=requestIdExtension,proto3" json:"request_id_extension,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HttpConnectionManager) Reset() { *m = HttpConnectionManager{} } @@ -352,26 +200,18 @@ func (*HttpConnectionManager) ProtoMessage() {} func (*HttpConnectionManager) Descriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{0} } + func (m *HttpConnectionManager) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpConnectionManager.Unmarshal(m, b) } func (m *HttpConnectionManager) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpConnectionManager.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpConnectionManager.Marshal(b, m, deterministic) } func (m *HttpConnectionManager) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpConnectionManager.Merge(m, src) } func (m *HttpConnectionManager) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpConnectionManager.Size(m) } func (m *HttpConnectionManager) XXX_DiscardUnknown() { xxx_messageInfo_HttpConnectionManager.DiscardUnknown(m) @@ -379,34 +219,11 @@ func (m *HttpConnectionManager) XXX_DiscardUnknown() { var xxx_messageInfo_HttpConnectionManager proto.InternalMessageInfo -type isHttpConnectionManager_RouteSpecifier interface { - isHttpConnectionManager_RouteSpecifier() - MarshalTo([]byte) (int, error) - Size() int -} - -type HttpConnectionManager_Rds struct { - Rds *Rds `protobuf:"bytes,3,opt,name=rds,proto3,oneof"` -} -type HttpConnectionManager_RouteConfig struct { - RouteConfig *v2.RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` -} - -func (*HttpConnectionManager_Rds) isHttpConnectionManager_RouteSpecifier() {} -func (*HttpConnectionManager_RouteConfig) isHttpConnectionManager_RouteSpecifier() {} - -func (m *HttpConnectionManager) GetRouteSpecifier() isHttpConnectionManager_RouteSpecifier { - if m != nil { - return m.RouteSpecifier - } - return nil -} - func (m *HttpConnectionManager) GetCodecType() HttpConnectionManager_CodecType { if m != nil { return m.CodecType } - return AUTO + return HttpConnectionManager_AUTO } func (m *HttpConnectionManager) GetStatPrefix() string { @@ -416,6 +233,35 @@ func (m *HttpConnectionManager) GetStatPrefix() string { return "" } +type isHttpConnectionManager_RouteSpecifier interface { + isHttpConnectionManager_RouteSpecifier() +} + +type HttpConnectionManager_Rds struct { + Rds *Rds `protobuf:"bytes,3,opt,name=rds,proto3,oneof"` +} + +type HttpConnectionManager_RouteConfig struct { + RouteConfig *v2.RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` +} + +type HttpConnectionManager_ScopedRoutes struct { + ScopedRoutes *ScopedRoutes `protobuf:"bytes,31,opt,name=scoped_routes,json=scopedRoutes,proto3,oneof"` +} + +func (*HttpConnectionManager_Rds) isHttpConnectionManager_RouteSpecifier() {} + +func (*HttpConnectionManager_RouteConfig) isHttpConnectionManager_RouteSpecifier() {} + +func (*HttpConnectionManager_ScopedRoutes) isHttpConnectionManager_RouteSpecifier() {} + +func (m *HttpConnectionManager) GetRouteSpecifier() isHttpConnectionManager_RouteSpecifier { + if m != nil { + return m.RouteSpecifier + } + return nil +} + func (m *HttpConnectionManager) GetRds() *Rds { if x, ok := m.GetRouteSpecifier().(*HttpConnectionManager_Rds); ok { return x.Rds @@ -430,6 +276,13 @@ func (m *HttpConnectionManager) GetRouteConfig() *v2.RouteConfiguration { return nil } +func (m *HttpConnectionManager) GetScopedRoutes() *ScopedRoutes { + if x, ok := m.GetRouteSpecifier().(*HttpConnectionManager_ScopedRoutes); ok { + return x.ScopedRoutes + } + return nil +} + func (m *HttpConnectionManager) GetHttpFilters() []*HttpFilter { if m != nil { return m.HttpFilters @@ -437,7 +290,7 @@ func (m *HttpConnectionManager) GetHttpFilters() []*HttpFilter { return nil } -func (m *HttpConnectionManager) GetAddUserAgent() *types.BoolValue { +func (m *HttpConnectionManager) GetAddUserAgent() *wrappers.BoolValue { if m != nil { return m.AddUserAgent } @@ -451,6 +304,13 @@ func (m *HttpConnectionManager) GetTracing() *HttpConnectionManager_Tracing { return nil } +func (m *HttpConnectionManager) GetCommonHttpProtocolOptions() *core.HttpProtocolOptions { + if m != nil { + return m.CommonHttpProtocolOptions + } + return nil +} + func (m *HttpConnectionManager) GetHttpProtocolOptions() *core.Http1ProtocolOptions { if m != nil { return m.HttpProtocolOptions @@ -472,42 +332,50 @@ func (m *HttpConnectionManager) GetServerName() string { return "" } -func (m *HttpConnectionManager) GetMaxRequestHeadersKb() *types.UInt32Value { +func (m *HttpConnectionManager) GetServerHeaderTransformation() HttpConnectionManager_ServerHeaderTransformation { + if m != nil { + return m.ServerHeaderTransformation + } + return HttpConnectionManager_OVERWRITE +} + +func (m *HttpConnectionManager) GetMaxRequestHeadersKb() *wrappers.UInt32Value { if m != nil { return m.MaxRequestHeadersKb } return nil } -func (m *HttpConnectionManager) GetIdleTimeout() *time.Duration { +// Deprecated: Do not use. +func (m *HttpConnectionManager) GetIdleTimeout() *duration.Duration { if m != nil { return m.IdleTimeout } return nil } -func (m *HttpConnectionManager) GetStreamIdleTimeout() *time.Duration { +func (m *HttpConnectionManager) GetStreamIdleTimeout() *duration.Duration { if m != nil { return m.StreamIdleTimeout } return nil } -func (m *HttpConnectionManager) GetRequestTimeout() *time.Duration { +func (m *HttpConnectionManager) GetRequestTimeout() *duration.Duration { if m != nil { return m.RequestTimeout } return nil } -func (m *HttpConnectionManager) GetDrainTimeout() *time.Duration { +func (m *HttpConnectionManager) GetDrainTimeout() *duration.Duration { if m != nil { return m.DrainTimeout } return nil } -func (m *HttpConnectionManager) GetDelayedCloseTimeout() *time.Duration { +func (m *HttpConnectionManager) GetDelayedCloseTimeout() *duration.Duration { if m != nil { return m.DelayedCloseTimeout } @@ -521,7 +389,7 @@ func (m *HttpConnectionManager) GetAccessLog() []*v21.AccessLog { return nil } -func (m *HttpConnectionManager) GetUseRemoteAddress() *types.BoolValue { +func (m *HttpConnectionManager) GetUseRemoteAddress() *wrappers.BoolValue { if m != nil { return m.UseRemoteAddress } @@ -556,18 +424,25 @@ func (m *HttpConnectionManager) GetVia() string { return "" } -func (m *HttpConnectionManager) GetGenerateRequestId() *types.BoolValue { +func (m *HttpConnectionManager) GetGenerateRequestId() *wrappers.BoolValue { if m != nil { return m.GenerateRequestId } return nil } +func (m *HttpConnectionManager) GetPreserveExternalRequestId() bool { + if m != nil { + return m.PreserveExternalRequestId + } + return false +} + func (m *HttpConnectionManager) GetForwardClientCertDetails() HttpConnectionManager_ForwardClientCertDetails { if m != nil { return m.ForwardClientCertDetails } - return SANITIZE + return HttpConnectionManager_SANITIZE } func (m *HttpConnectionManager) GetSetCurrentClientCertDetails() *HttpConnectionManager_SetCurrentClientCertDetails { @@ -598,122 +473,49 @@ func (m *HttpConnectionManager) GetUpgradeConfigs() []*HttpConnectionManager_Upg return nil } -func (m *HttpConnectionManager) GetNormalizePath() *types.BoolValue { +func (m *HttpConnectionManager) GetNormalizePath() *wrappers.BoolValue { if m != nil { return m.NormalizePath } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HttpConnectionManager) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HttpConnectionManager_OneofMarshaler, _HttpConnectionManager_OneofUnmarshaler, _HttpConnectionManager_OneofSizer, []interface{}{ - (*HttpConnectionManager_Rds)(nil), - (*HttpConnectionManager_RouteConfig)(nil), +func (m *HttpConnectionManager) GetMergeSlashes() bool { + if m != nil { + return m.MergeSlashes } + return false } -func _HttpConnectionManager_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HttpConnectionManager) - // route_specifier - switch x := m.RouteSpecifier.(type) { - case *HttpConnectionManager_Rds: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Rds); err != nil { - return err - } - case *HttpConnectionManager_RouteConfig: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.RouteConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("HttpConnectionManager.RouteSpecifier has unexpected type %T", x) +func (m *HttpConnectionManager) GetRequestIdExtension() *RequestIDExtension { + if m != nil { + return m.RequestIdExtension } return nil } -func _HttpConnectionManager_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HttpConnectionManager) - switch tag { - case 3: // route_specifier.rds - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Rds) - err := b.DecodeMessage(msg) - m.RouteSpecifier = &HttpConnectionManager_Rds{msg} - return true, err - case 4: // route_specifier.route_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(v2.RouteConfiguration) - err := b.DecodeMessage(msg) - m.RouteSpecifier = &HttpConnectionManager_RouteConfig{msg} - return true, err - default: - return false, nil +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HttpConnectionManager) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HttpConnectionManager_Rds)(nil), + (*HttpConnectionManager_RouteConfig)(nil), + (*HttpConnectionManager_ScopedRoutes)(nil), } } -func _HttpConnectionManager_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HttpConnectionManager) - // route_specifier - switch x := m.RouteSpecifier.(type) { - case *HttpConnectionManager_Rds: - s := proto.Size(x.Rds) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HttpConnectionManager_RouteConfig: - s := proto.Size(x.RouteConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type HttpConnectionManager_Tracing struct { - // The span name will be derived from this field. - OperationName HttpConnectionManager_Tracing_OperationName `protobuf:"varint,1,opt,name=operation_name,json=operationName,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_Tracing_OperationName" json:"operation_name,omitempty"` - // A list of header names used to create tags for the active span. The header name is used to - // populate the tag name, and the header value is used to populate the tag value. The tag is - // created if the specified header name is present in the request's headers. - RequestHeadersForTags []string `protobuf:"bytes,2,rep,name=request_headers_for_tags,json=requestHeadersForTags,proto3" json:"request_headers_for_tags,omitempty"` - // 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_sampling' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - ClientSampling *_type.Percent `protobuf:"bytes,3,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 *_type.Percent `protobuf:"bytes,4,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 *_type.Percent `protobuf:"bytes,5,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` - // Whether to annotate spans with additional data. If true, spans will include logs for stream - // events. - Verbose bool `protobuf:"varint,6,opt,name=verbose,proto3" json:"verbose,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + OperationName HttpConnectionManager_Tracing_OperationName `protobuf:"varint,1,opt,name=operation_name,json=operationName,proto3,enum=envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_Tracing_OperationName" json:"operation_name,omitempty"` // Deprecated: Do not use. + RequestHeadersForTags []string `protobuf:"bytes,2,rep,name=request_headers_for_tags,json=requestHeadersForTags,proto3" json:"request_headers_for_tags,omitempty"` // Deprecated: Do not use. + ClientSampling *_type.Percent `protobuf:"bytes,3,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` + RandomSampling *_type.Percent `protobuf:"bytes,4,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` + OverallSampling *_type.Percent `protobuf:"bytes,5,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` + Verbose bool `protobuf:"varint,6,opt,name=verbose,proto3" json:"verbose,omitempty"` + MaxPathTagLength *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_path_tag_length,json=maxPathTagLength,proto3" json:"max_path_tag_length,omitempty"` + CustomTags []*v22.CustomTag `protobuf:"bytes,8,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` + Provider *v23.Tracing_Http `protobuf:"bytes,9,opt,name=provider,proto3" json:"provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HttpConnectionManager_Tracing) Reset() { *m = HttpConnectionManager_Tracing{} } @@ -722,26 +524,18 @@ func (*HttpConnectionManager_Tracing) ProtoMessage() {} func (*HttpConnectionManager_Tracing) Descriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{0, 0} } + func (m *HttpConnectionManager_Tracing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpConnectionManager_Tracing.Unmarshal(m, b) } func (m *HttpConnectionManager_Tracing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpConnectionManager_Tracing.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpConnectionManager_Tracing.Marshal(b, m, deterministic) } func (m *HttpConnectionManager_Tracing) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpConnectionManager_Tracing.Merge(m, src) } func (m *HttpConnectionManager_Tracing) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpConnectionManager_Tracing.Size(m) } func (m *HttpConnectionManager_Tracing) XXX_DiscardUnknown() { xxx_messageInfo_HttpConnectionManager_Tracing.DiscardUnknown(m) @@ -749,13 +543,15 @@ func (m *HttpConnectionManager_Tracing) XXX_DiscardUnknown() { var xxx_messageInfo_HttpConnectionManager_Tracing proto.InternalMessageInfo +// Deprecated: Do not use. func (m *HttpConnectionManager_Tracing) GetOperationName() HttpConnectionManager_Tracing_OperationName { if m != nil { return m.OperationName } - return INGRESS + return HttpConnectionManager_Tracing_INGRESS } +// Deprecated: Do not use. func (m *HttpConnectionManager_Tracing) GetRequestHeadersForTags() []string { if m != nil { return m.RequestHeadersForTags @@ -791,8 +587,28 @@ func (m *HttpConnectionManager_Tracing) GetVerbose() bool { return false } +func (m *HttpConnectionManager_Tracing) GetMaxPathTagLength() *wrappers.UInt32Value { + if m != nil { + return m.MaxPathTagLength + } + return nil +} + +func (m *HttpConnectionManager_Tracing) GetCustomTags() []*v22.CustomTag { + if m != nil { + return m.CustomTags + } + return nil +} + +func (m *HttpConnectionManager_Tracing) GetProvider() *v23.Tracing_Http { + if m != nil { + return m.Provider + } + return nil +} + type HttpConnectionManager_InternalAddressConfig struct { - // Whether unix socket addresses should be considered internal. UnixSockets bool `protobuf:"varint,1,opt,name=unix_sockets,json=unixSockets,proto3" json:"unix_sockets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -809,26 +625,18 @@ func (*HttpConnectionManager_InternalAddressConfig) ProtoMessage() {} func (*HttpConnectionManager_InternalAddressConfig) Descriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{0, 1} } + func (m *HttpConnectionManager_InternalAddressConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpConnectionManager_InternalAddressConfig.Unmarshal(m, b) } func (m *HttpConnectionManager_InternalAddressConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpConnectionManager_InternalAddressConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpConnectionManager_InternalAddressConfig.Marshal(b, m, deterministic) } func (m *HttpConnectionManager_InternalAddressConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpConnectionManager_InternalAddressConfig.Merge(m, src) } func (m *HttpConnectionManager_InternalAddressConfig) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpConnectionManager_InternalAddressConfig.Size(m) } func (m *HttpConnectionManager_InternalAddressConfig) XXX_DiscardUnknown() { xxx_messageInfo_HttpConnectionManager_InternalAddressConfig.DiscardUnknown(m) @@ -844,21 +652,14 @@ func (m *HttpConnectionManager_InternalAddressConfig) GetUnixSockets() bool { } type HttpConnectionManager_SetCurrentClientCertDetails struct { - // Whether to forward the subject of the client cert. Defaults to false. - Subject *types.BoolValue `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - // Whether to forward the entire client cert in URL encoded PEM format. This will appear in the - // XFCC header comma separated from other values with the value Cert="PEM". - // Defaults to false. - Cert bool `protobuf:"varint,3,opt,name=cert,proto3" json:"cert,omitempty"` - // Whether to forward the DNS type Subject Alternative Names of the client cert. - // Defaults to false. - Dns bool `protobuf:"varint,4,opt,name=dns,proto3" json:"dns,omitempty"` - // Whether to forward the URI type Subject Alternative Name of the client cert. Defaults to - // false. - Uri bool `protobuf:"varint,5,opt,name=uri,proto3" json:"uri,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Subject *wrappers.BoolValue `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + Cert bool `protobuf:"varint,3,opt,name=cert,proto3" json:"cert,omitempty"` + Chain bool `protobuf:"varint,6,opt,name=chain,proto3" json:"chain,omitempty"` + Dns bool `protobuf:"varint,4,opt,name=dns,proto3" json:"dns,omitempty"` + Uri bool `protobuf:"varint,5,opt,name=uri,proto3" json:"uri,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HttpConnectionManager_SetCurrentClientCertDetails) Reset() { @@ -871,26 +672,18 @@ func (*HttpConnectionManager_SetCurrentClientCertDetails) ProtoMessage() {} func (*HttpConnectionManager_SetCurrentClientCertDetails) Descriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{0, 2} } + func (m *HttpConnectionManager_SetCurrentClientCertDetails) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails.Unmarshal(m, b) } func (m *HttpConnectionManager_SetCurrentClientCertDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails.Marshal(b, m, deterministic) } func (m *HttpConnectionManager_SetCurrentClientCertDetails) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails.Merge(m, src) } func (m *HttpConnectionManager_SetCurrentClientCertDetails) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails.Size(m) } func (m *HttpConnectionManager_SetCurrentClientCertDetails) XXX_DiscardUnknown() { xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails.DiscardUnknown(m) @@ -898,7 +691,7 @@ func (m *HttpConnectionManager_SetCurrentClientCertDetails) XXX_DiscardUnknown() var xxx_messageInfo_HttpConnectionManager_SetCurrentClientCertDetails proto.InternalMessageInfo -func (m *HttpConnectionManager_SetCurrentClientCertDetails) GetSubject() *types.BoolValue { +func (m *HttpConnectionManager_SetCurrentClientCertDetails) GetSubject() *wrappers.BoolValue { if m != nil { return m.Subject } @@ -912,6 +705,13 @@ func (m *HttpConnectionManager_SetCurrentClientCertDetails) GetCert() bool { return false } +func (m *HttpConnectionManager_SetCurrentClientCertDetails) GetChain() bool { + if m != nil { + return m.Chain + } + return false +} + func (m *HttpConnectionManager_SetCurrentClientCertDetails) GetDns() bool { if m != nil { return m.Dns @@ -926,36 +726,13 @@ func (m *HttpConnectionManager_SetCurrentClientCertDetails) GetUri() bool { return false } -// The configuration for HTTP upgrades. -// For each upgrade type desired, an UpgradeConfig must be added. -// -// .. warning:: -// -// The current implementation of upgrade headers does not handle -// multi-valued upgrade headers. Support for multi-valued headers may be -// added in the future if needed. -// -// .. warning:: -// The current implementation of upgrade headers does not work with HTTP/2 -// upstreams. type HttpConnectionManager_UpgradeConfig struct { - // 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"` - // If present, this represents the filter chain which will be created for - // this type of upgrade. If no filters are present, the filter chain for - // HTTP connections will be used for this upgrade type. - Filters []*HttpFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` - // Determines if upgrades are enabled or disabled by default. Defaults to true. - // This can be overridden on a per-route basis with :ref:`cluster - // ` as documented in the - // :ref:`upgrade documentation `. - Enabled *types.BoolValue `protobuf:"bytes,3,opt,name=enabled,proto3" json:"enabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UpgradeType string `protobuf:"bytes,1,opt,name=upgrade_type,json=upgradeType,proto3" json:"upgrade_type,omitempty"` + Filters []*HttpFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + Enabled *wrappers.BoolValue `protobuf:"bytes,3,opt,name=enabled,proto3" json:"enabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HttpConnectionManager_UpgradeConfig) Reset() { *m = HttpConnectionManager_UpgradeConfig{} } @@ -964,26 +741,18 @@ func (*HttpConnectionManager_UpgradeConfig) ProtoMessage() {} func (*HttpConnectionManager_UpgradeConfig) Descriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{0, 3} } + func (m *HttpConnectionManager_UpgradeConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpConnectionManager_UpgradeConfig.Unmarshal(m, b) } func (m *HttpConnectionManager_UpgradeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpConnectionManager_UpgradeConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpConnectionManager_UpgradeConfig.Marshal(b, m, deterministic) } func (m *HttpConnectionManager_UpgradeConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpConnectionManager_UpgradeConfig.Merge(m, src) } func (m *HttpConnectionManager_UpgradeConfig) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpConnectionManager_UpgradeConfig.Size(m) } func (m *HttpConnectionManager_UpgradeConfig) XXX_DiscardUnknown() { xxx_messageInfo_HttpConnectionManager_UpgradeConfig.DiscardUnknown(m) @@ -1005,7 +774,7 @@ func (m *HttpConnectionManager_UpgradeConfig) GetFilters() []*HttpFilter { return nil } -func (m *HttpConnectionManager_UpgradeConfig) GetEnabled() *types.BoolValue { +func (m *HttpConnectionManager_UpgradeConfig) GetEnabled() *wrappers.BoolValue { if m != nil { return m.Enabled } @@ -1013,16 +782,11 @@ func (m *HttpConnectionManager_UpgradeConfig) GetEnabled() *types.BoolValue { } type Rds struct { - // Configuration source specifier for RDS. - ConfigSource core.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source"` - // The name of the route configuration. This name will be passed to the RDS - // API. This allows an Envoy configuration with multiple HTTP listeners (and - // associated HTTP connection manager filters) to use different route - // configurations. - RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ConfigSource *core.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Rds) Reset() { *m = Rds{} } @@ -1031,26 +795,18 @@ func (*Rds) ProtoMessage() {} func (*Rds) Descriptor() ([]byte, []int) { return fileDescriptor_8fe65268985a88f7, []int{1} } + func (m *Rds) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Rds.Unmarshal(m, b) } func (m *Rds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Rds.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Rds.Marshal(b, m, deterministic) } func (m *Rds) XXX_Merge(src proto.Message) { xxx_messageInfo_Rds.Merge(m, src) } func (m *Rds) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Rds.Size(m) } func (m *Rds) XXX_DiscardUnknown() { xxx_messageInfo_Rds.DiscardUnknown(m) @@ -1058,11 +814,11 @@ func (m *Rds) XXX_DiscardUnknown() { var xxx_messageInfo_Rds proto.InternalMessageInfo -func (m *Rds) GetConfigSource() core.ConfigSource { +func (m *Rds) GetConfigSource() *core.ConfigSource { if m != nil { return m.ConfigSource } - return core.ConfigSource{} + return nil } func (m *Rds) GetRouteConfigName() string { @@ -1072,37 +828,452 @@ func (m *Rds) GetRouteConfigName() string { return "" } +type ScopedRouteConfigurationsList struct { + ScopedRouteConfigurations []*v2.ScopedRouteConfiguration `protobuf:"bytes,1,rep,name=scoped_route_configurations,json=scopedRouteConfigurations,proto3" json:"scoped_route_configurations,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRouteConfigurationsList) Reset() { *m = ScopedRouteConfigurationsList{} } +func (m *ScopedRouteConfigurationsList) String() string { return proto.CompactTextString(m) } +func (*ScopedRouteConfigurationsList) ProtoMessage() {} +func (*ScopedRouteConfigurationsList) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{2} +} + +func (m *ScopedRouteConfigurationsList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRouteConfigurationsList.Unmarshal(m, b) +} +func (m *ScopedRouteConfigurationsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRouteConfigurationsList.Marshal(b, m, deterministic) +} +func (m *ScopedRouteConfigurationsList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRouteConfigurationsList.Merge(m, src) +} +func (m *ScopedRouteConfigurationsList) XXX_Size() int { + return xxx_messageInfo_ScopedRouteConfigurationsList.Size(m) +} +func (m *ScopedRouteConfigurationsList) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRouteConfigurationsList.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRouteConfigurationsList proto.InternalMessageInfo + +func (m *ScopedRouteConfigurationsList) GetScopedRouteConfigurations() []*v2.ScopedRouteConfiguration { + if m != nil { + return m.ScopedRouteConfigurations + } + return nil +} + +type ScopedRoutes struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ScopeKeyBuilder *ScopedRoutes_ScopeKeyBuilder `protobuf:"bytes,2,opt,name=scope_key_builder,json=scopeKeyBuilder,proto3" json:"scope_key_builder,omitempty"` + RdsConfigSource *core.ConfigSource `protobuf:"bytes,3,opt,name=rds_config_source,json=rdsConfigSource,proto3" json:"rds_config_source,omitempty"` + // Types that are valid to be assigned to ConfigSpecifier: + // *ScopedRoutes_ScopedRouteConfigurationsList + // *ScopedRoutes_ScopedRds + ConfigSpecifier isScopedRoutes_ConfigSpecifier `protobuf_oneof:"config_specifier"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRoutes) Reset() { *m = ScopedRoutes{} } +func (m *ScopedRoutes) String() string { return proto.CompactTextString(m) } +func (*ScopedRoutes) ProtoMessage() {} +func (*ScopedRoutes) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{3} +} + +func (m *ScopedRoutes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRoutes.Unmarshal(m, b) +} +func (m *ScopedRoutes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRoutes.Marshal(b, m, deterministic) +} +func (m *ScopedRoutes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRoutes.Merge(m, src) +} +func (m *ScopedRoutes) XXX_Size() int { + return xxx_messageInfo_ScopedRoutes.Size(m) +} +func (m *ScopedRoutes) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRoutes.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRoutes proto.InternalMessageInfo + +func (m *ScopedRoutes) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ScopedRoutes) GetScopeKeyBuilder() *ScopedRoutes_ScopeKeyBuilder { + if m != nil { + return m.ScopeKeyBuilder + } + return nil +} + +func (m *ScopedRoutes) GetRdsConfigSource() *core.ConfigSource { + if m != nil { + return m.RdsConfigSource + } + return nil +} + +type isScopedRoutes_ConfigSpecifier interface { + isScopedRoutes_ConfigSpecifier() +} + +type ScopedRoutes_ScopedRouteConfigurationsList struct { + ScopedRouteConfigurationsList *ScopedRouteConfigurationsList `protobuf:"bytes,4,opt,name=scoped_route_configurations_list,json=scopedRouteConfigurationsList,proto3,oneof"` +} + +type ScopedRoutes_ScopedRds struct { + ScopedRds *ScopedRds `protobuf:"bytes,5,opt,name=scoped_rds,json=scopedRds,proto3,oneof"` +} + +func (*ScopedRoutes_ScopedRouteConfigurationsList) isScopedRoutes_ConfigSpecifier() {} + +func (*ScopedRoutes_ScopedRds) isScopedRoutes_ConfigSpecifier() {} + +func (m *ScopedRoutes) GetConfigSpecifier() isScopedRoutes_ConfigSpecifier { + if m != nil { + return m.ConfigSpecifier + } + return nil +} + +func (m *ScopedRoutes) GetScopedRouteConfigurationsList() *ScopedRouteConfigurationsList { + if x, ok := m.GetConfigSpecifier().(*ScopedRoutes_ScopedRouteConfigurationsList); ok { + return x.ScopedRouteConfigurationsList + } + return nil +} + +func (m *ScopedRoutes) GetScopedRds() *ScopedRds { + if x, ok := m.GetConfigSpecifier().(*ScopedRoutes_ScopedRds); ok { + return x.ScopedRds + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ScopedRoutes) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ScopedRoutes_ScopedRouteConfigurationsList)(nil), + (*ScopedRoutes_ScopedRds)(nil), + } +} + +type ScopedRoutes_ScopeKeyBuilder struct { + Fragments []*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRoutes_ScopeKeyBuilder) Reset() { *m = ScopedRoutes_ScopeKeyBuilder{} } +func (m *ScopedRoutes_ScopeKeyBuilder) String() string { return proto.CompactTextString(m) } +func (*ScopedRoutes_ScopeKeyBuilder) ProtoMessage() {} +func (*ScopedRoutes_ScopeKeyBuilder) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{3, 0} +} + +func (m *ScopedRoutes_ScopeKeyBuilder) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder.Unmarshal(m, b) +} +func (m *ScopedRoutes_ScopeKeyBuilder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder.Marshal(b, m, deterministic) +} +func (m *ScopedRoutes_ScopeKeyBuilder) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder.Merge(m, src) +} +func (m *ScopedRoutes_ScopeKeyBuilder) XXX_Size() int { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder.Size(m) +} +func (m *ScopedRoutes_ScopeKeyBuilder) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder proto.InternalMessageInfo + +func (m *ScopedRoutes_ScopeKeyBuilder) GetFragments() []*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder { + if m != nil { + return m.Fragments + } + return nil +} + +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder struct { + // Types that are valid to be assigned to Type: + // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ + Type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type `protobuf_oneof:"type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Reset() { + *m = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{} +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) String() string { + return proto.CompactTextString(m) +} +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ProtoMessage() {} +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{3, 0, 0} +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Unmarshal(m, b) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Marshal(b, m, deterministic) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Merge(m, src) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) XXX_Size() int { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Size(m) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder proto.InternalMessageInfo + +type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type interface { + isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type() +} + +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ struct { + HeaderValueExtractor *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor `protobuf:"bytes,1,opt,name=header_value_extractor,json=headerValueExtractor,proto3,oneof"` +} + +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type() { +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) GetType() isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type { + if m != nil { + return m.Type + } + return nil +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) GetHeaderValueExtractor() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor { + if x, ok := m.GetType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_); ok { + return x.HeaderValueExtractor + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_)(nil), + } +} + +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ElementSeparator string `protobuf:"bytes,2,opt,name=element_separator,json=elementSeparator,proto3" json:"element_separator,omitempty"` + // Types that are valid to be assigned to ExtractType: + // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index + // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element + ExtractType isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType `protobuf_oneof:"extract_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Reset() { + *m = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor{} +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) String() string { + return proto.CompactTextString(m) +} +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoMessage() {} +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{3, 0, 0, 0} +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Unmarshal(m, b) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Marshal(b, m, deterministic) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Merge(m, src) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) XXX_Size() int { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Size(m) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor proto.InternalMessageInfo + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetElementSeparator() string { + if m != nil { + return m.ElementSeparator + } + return "" +} + +type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType interface { + isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() +} + +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index struct { + Index uint32 `protobuf:"varint,3,opt,name=index,proto3,oneof"` +} + +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element struct { + Element *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement `protobuf:"bytes,4,opt,name=element,proto3,oneof"` +} + +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() { +} + +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() { +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetExtractType() isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType { + if m != nil { + return m.ExtractType + } + return nil +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetIndex() uint32 { + if x, ok := m.GetExtractType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index); ok { + return x.Index + } + return 0 +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetElement() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement { + if x, ok := m.GetExtractType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element); ok { + return x.Element + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index)(nil), + (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element)(nil), + } +} + +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement struct { + Separator string `protobuf:"bytes,1,opt,name=separator,proto3" json:"separator,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Reset() { + *m = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement{} +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) String() string { + return proto.CompactTextString(m) +} +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoMessage() {} +func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{3, 0, 0, 0, 0} +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Unmarshal(m, b) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Marshal(b, m, deterministic) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Merge(m, src) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) XXX_Size() int { + return xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Size(m) +} +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement proto.InternalMessageInfo + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) GetSeparator() string { + if m != nil { + return m.Separator + } + return "" +} + +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +type ScopedRds struct { + ScopedRdsConfigSource *core.ConfigSource `protobuf:"bytes,1,opt,name=scoped_rds_config_source,json=scopedRdsConfigSource,proto3" json:"scoped_rds_config_source,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ScopedRds) Reset() { *m = ScopedRds{} } +func (m *ScopedRds) String() string { return proto.CompactTextString(m) } +func (*ScopedRds) ProtoMessage() {} +func (*ScopedRds) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{4} +} + +func (m *ScopedRds) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ScopedRds.Unmarshal(m, b) +} +func (m *ScopedRds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ScopedRds.Marshal(b, m, deterministic) +} +func (m *ScopedRds) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopedRds.Merge(m, src) +} +func (m *ScopedRds) XXX_Size() int { + return xxx_messageInfo_ScopedRds.Size(m) +} +func (m *ScopedRds) XXX_DiscardUnknown() { + xxx_messageInfo_ScopedRds.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopedRds proto.InternalMessageInfo + +func (m *ScopedRds) GetScopedRdsConfigSource() *core.ConfigSource { + if m != nil { + return m.ScopedRdsConfigSource + } + return nil +} + type HttpFilter struct { - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(mattklein123): Auto generate the following list] - // * :ref:`envoy.buffer ` - // * :ref:`envoy.cors ` - // * :ref:`envoy.ext_authz ` - // * :ref:`envoy.fault ` - // * :ref:`envoy.filters.http.csrf ` - // * :ref:`envoy.filters.http.header_to_metadata ` - // * :ref:`envoy.filters.http.grpc_http1_reverse_bridge \ - // ` - // * :ref:`envoy.filters.http.jwt_authn ` - // * :ref:`envoy.filters.http.rbac ` - // * :ref:`envoy.filters.http.tap ` - // * :ref:`envoy.gzip ` - // * :ref:`envoy.http_dynamo_filter ` - // * :ref:`envoy.grpc_http1_bridge ` - // * :ref:`envoy.grpc_json_transcoder ` - // * :ref:`envoy.grpc_web ` - // * :ref:`envoy.health_check ` - // * :ref:`envoy.ip_tagging ` - // * :ref:`envoy.lua ` - // * :ref:`envoy.rate_limit ` - // * :ref:`envoy.router ` - // * :ref:`envoy.squash ` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - // // Types that are valid to be assigned to ConfigType: // *HttpFilter_Config // *HttpFilter_TypedConfig @@ -1116,28 +1287,20 @@ func (m *HttpFilter) Reset() { *m = HttpFilter{} } func (m *HttpFilter) String() string { return proto.CompactTextString(m) } func (*HttpFilter) ProtoMessage() {} func (*HttpFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_8fe65268985a88f7, []int{2} + return fileDescriptor_8fe65268985a88f7, []int{5} } + func (m *HttpFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpFilter.Unmarshal(m, b) } func (m *HttpFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpFilter.Marshal(b, m, deterministic) } func (m *HttpFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpFilter.Merge(m, src) } func (m *HttpFilter) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpFilter.Size(m) } func (m *HttpFilter) XXX_DiscardUnknown() { xxx_messageInfo_HttpFilter.DiscardUnknown(m) @@ -1145,20 +1308,27 @@ func (m *HttpFilter) XXX_DiscardUnknown() { var xxx_messageInfo_HttpFilter proto.InternalMessageInfo +func (m *HttpFilter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + type isHttpFilter_ConfigType interface { isHttpFilter_ConfigType() - MarshalTo([]byte) (int, error) - Size() int } type HttpFilter_Config struct { - Config *types.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} -type HttpFilter_TypedConfig struct { - TypedConfig *types.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` } -func (*HttpFilter_Config) isHttpFilter_ConfigType() {} +type HttpFilter_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*HttpFilter_Config) isHttpFilter_ConfigType() {} + func (*HttpFilter_TypedConfig) isHttpFilter_ConfigType() {} func (m *HttpFilter) GetConfigType() isHttpFilter_ConfigType { @@ -1168,103 +1338,71 @@ func (m *HttpFilter) GetConfigType() isHttpFilter_ConfigType { return nil } -func (m *HttpFilter) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *HttpFilter) GetConfig() *types.Struct { +// Deprecated: Do not use. +func (m *HttpFilter) GetConfig() *_struct.Struct { if x, ok := m.GetConfigType().(*HttpFilter_Config); ok { return x.Config } return nil } -func (m *HttpFilter) GetTypedConfig() *types.Any { +func (m *HttpFilter) GetTypedConfig() *any.Any { if x, ok := m.GetConfigType().(*HttpFilter_TypedConfig); ok { return x.TypedConfig } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HttpFilter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HttpFilter_OneofMarshaler, _HttpFilter_OneofUnmarshaler, _HttpFilter_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HttpFilter) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*HttpFilter_Config)(nil), (*HttpFilter_TypedConfig)(nil), } } -func _HttpFilter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HttpFilter) - // config_type - switch x := m.ConfigType.(type) { - case *HttpFilter_Config: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Config); err != nil { - return err - } - case *HttpFilter_TypedConfig: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TypedConfig); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("HttpFilter.ConfigType has unexpected type %T", x) +type RequestIDExtension struct { + TypedConfig *any.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestIDExtension) Reset() { *m = RequestIDExtension{} } +func (m *RequestIDExtension) String() string { return proto.CompactTextString(m) } +func (*RequestIDExtension) ProtoMessage() {} +func (*RequestIDExtension) Descriptor() ([]byte, []int) { + return fileDescriptor_8fe65268985a88f7, []int{6} +} + +func (m *RequestIDExtension) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestIDExtension.Unmarshal(m, b) +} +func (m *RequestIDExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestIDExtension.Marshal(b, m, deterministic) +} +func (m *RequestIDExtension) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestIDExtension.Merge(m, src) +} +func (m *RequestIDExtension) XXX_Size() int { + return xxx_messageInfo_RequestIDExtension.Size(m) +} +func (m *RequestIDExtension) XXX_DiscardUnknown() { + xxx_messageInfo_RequestIDExtension.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestIDExtension proto.InternalMessageInfo + +func (m *RequestIDExtension) GetTypedConfig() *any.Any { + if m != nil { + return m.TypedConfig } return nil } -func _HttpFilter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HttpFilter) - switch tag { - case 2: // config_type.config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Struct) - err := b.DecodeMessage(msg) - m.ConfigType = &HttpFilter_Config{msg} - return true, err - case 4: // config_type.typed_config - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(types.Any) - err := b.DecodeMessage(msg) - m.ConfigType = &HttpFilter_TypedConfig{msg} - return true, err - default: - return false, nil - } -} - -func _HttpFilter_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HttpFilter) - // config_type - switch x := m.ConfigType.(type) { - case *HttpFilter_Config: - s := proto.Size(x.Config) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HttpFilter_TypedConfig: - s := proto.Size(x.TypedConfig) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { proto.RegisterEnum("envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_CodecType", HttpConnectionManager_CodecType_name, HttpConnectionManager_CodecType_value) + proto.RegisterEnum("envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_ServerHeaderTransformation", HttpConnectionManager_ServerHeaderTransformation_name, HttpConnectionManager_ServerHeaderTransformation_value) proto.RegisterEnum("envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_ForwardClientCertDetails", HttpConnectionManager_ForwardClientCertDetails_name, HttpConnectionManager_ForwardClientCertDetails_value) proto.RegisterEnum("envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager_Tracing_OperationName", HttpConnectionManager_Tracing_OperationName_name, HttpConnectionManager_Tracing_OperationName_value) proto.RegisterType((*HttpConnectionManager)(nil), "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager") @@ -1273,7 +1411,15 @@ func init() { proto.RegisterType((*HttpConnectionManager_SetCurrentClientCertDetails)(nil), "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails") proto.RegisterType((*HttpConnectionManager_UpgradeConfig)(nil), "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig") proto.RegisterType((*Rds)(nil), "envoy.config.filter.network.http_connection_manager.v2.Rds") + proto.RegisterType((*ScopedRouteConfigurationsList)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList") + proto.RegisterType((*ScopedRoutes)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes") + proto.RegisterType((*ScopedRoutes_ScopeKeyBuilder)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder") + proto.RegisterType((*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder") + proto.RegisterType((*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor") + proto.RegisterType((*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement") + proto.RegisterType((*ScopedRds)(nil), "envoy.config.filter.network.http_connection_manager.v2.ScopedRds") proto.RegisterType((*HttpFilter)(nil), "envoy.config.filter.network.http_connection_manager.v2.HttpFilter") + proto.RegisterType((*RequestIDExtension)(nil), "envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension") } func init() { @@ -1281,3078 +1427,164 @@ func init() { } var fileDescriptor_8fe65268985a88f7 = []byte{ - // 1758 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x4f, 0xdb, 0xce, 0xc4, 0x79, 0xfe, 0x88, 0x53, 0x49, 0x26, 0x3d, 0x9e, 0x6c, 0x62, 0x22, - 0x01, 0xd1, 0x80, 0xec, 0xc4, 0x3b, 0x0c, 0xe2, 0x43, 0x08, 0x3b, 0xc9, 0x90, 0x84, 0xd9, 0x24, - 0x6a, 0x3b, 0x0c, 0xbb, 0x0b, 0x6a, 0x2a, 0xdd, 0x65, 0xa7, 0x99, 0x76, 0x57, 0x53, 0x55, 0xed, - 0x49, 0xb8, 0x20, 0xad, 0x38, 0x20, 0x6e, 0x70, 0x40, 0x48, 0x1c, 0xb9, 0x83, 0xb8, 0x01, 0xa7, - 0x3d, 0xa1, 0x3d, 0xf2, 0x17, 0xf0, 0x31, 0xb7, 0xf9, 0x2f, 0x50, 0x7d, 0xb4, 0x13, 0xe7, 0x6b, - 0x46, 0x43, 0xf6, 0x56, 0xf5, 0xde, 0xfb, 0xfd, 0xde, 0xab, 0x57, 0xef, 0xd5, 0x07, 0x74, 0x49, - 0x34, 0xa4, 0x67, 0x0d, 0x8f, 0x46, 0xbd, 0xa0, 0xdf, 0xe8, 0x05, 0xa1, 0x20, 0xac, 0x11, 0x11, - 0xf1, 0x92, 0xb2, 0x17, 0x8d, 0x13, 0x21, 0x62, 0xd7, 0xa3, 0x51, 0x44, 0x3c, 0x11, 0xd0, 0xc8, - 0x1d, 0xe0, 0x08, 0xf7, 0x09, 0x6b, 0x0c, 0x9b, 0x37, 0xa9, 0xea, 0x31, 0xa3, 0x82, 0xa2, 0x27, - 0x8a, 0xb5, 0xae, 0x59, 0xeb, 0x9a, 0xb5, 0x6e, 0x58, 0xeb, 0x37, 0x41, 0x87, 0xcd, 0xea, 0x17, - 0x75, 0x34, 0x38, 0x0e, 0xa4, 0x0f, 0x8f, 0x32, 0x62, 0x22, 0x73, 0x39, 0x4d, 0x98, 0x47, 0x34, - 0x7d, 0xb5, 0x76, 0xd5, 0x4c, 0x29, 0x3c, 0x1a, 0x1a, 0x8b, 0xfb, 0x63, 0x16, 0xcc, 0xe7, 0x46, - 0xbe, 0x7e, 0xdd, 0x72, 0xb1, 0xe7, 0x11, 0xce, 0x43, 0xda, 0x97, 0xb6, 0xa3, 0x89, 0x41, 0xd8, - 0x1a, 0x21, 0xce, 0x62, 0xd2, 0x88, 0x09, 0xf3, 0x48, 0x24, 0x8c, 0xe6, 0x41, 0x9f, 0xd2, 0x7e, - 0x68, 0x5c, 0x1f, 0x27, 0xbd, 0x06, 0x8e, 0xce, 0x8c, 0x6a, 0xf9, 0xb2, 0xca, 0x4f, 0x18, 0x96, - 0x8b, 0x35, 0xfa, 0xa5, 0xcb, 0x7a, 0x2e, 0x58, 0xe2, 0x89, 0x9b, 0xd0, 0x2f, 0x19, 0x8e, 0x63, - 0xc2, 0xd2, 0x45, 0x2c, 0x0e, 0x71, 0x18, 0xf8, 0x58, 0x90, 0x46, 0x3a, 0x30, 0x8a, 0xf9, 0x3e, - 0xed, 0x53, 0x35, 0x6c, 0xc8, 0x91, 0x96, 0xae, 0xfe, 0x6d, 0x09, 0x16, 0x76, 0x84, 0x88, 0x37, - 0x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, 0x00, + // 2531 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x4f, 0xdb, 0xce, 0xc4, 0x7e, 0xb6, 0x93, 0x4e, 0x25, 0x99, 0xe9, 0x78, 0x32, 0x3b, 0xde, + 0x0c, 0xbb, 0x44, 0xbb, 0xc8, 0x99, 0xc9, 0x2c, 0x83, 0x60, 0x61, 0x17, 0x3b, 0x1f, 0xeb, 0xcc, + 0x47, 0x12, 0xb5, 0x9d, 0x1d, 0x96, 0x5d, 0xd4, 0x54, 0xba, 0xcb, 0x76, 0x13, 0xbb, 0xbb, 0xa9, + 0xea, 0xf6, 0xc6, 0x88, 0xc3, 0x0a, 0x38, 0xad, 0x90, 0x10, 0x9c, 0x90, 0xe0, 0xc0, 0x01, 0x89, + 0xe3, 0x82, 0x84, 0x10, 0xe2, 0x8c, 0x10, 0x37, 0x04, 0x7f, 0x08, 0x87, 0x3d, 0xa1, 0x39, 0x20, + 0x54, 0x1f, 0xed, 0xaf, 0xd8, 0x89, 0x98, 0xc9, 0xc2, 0xc9, 0xd5, 0xef, 0xe3, 0xf7, 0x5e, 0x55, + 0xbd, 0xf7, 0xea, 0x55, 0x19, 0xea, 0xc4, 0xeb, 0xfa, 0xbd, 0x4d, 0xdb, 0xf7, 0x1a, 0x6e, 0x73, + 0xb3, 0xe1, 0xb6, 0x43, 0x42, 0x37, 0x3d, 0x12, 0x7e, 0xe8, 0xd3, 0xd3, 0xcd, 0x56, 0x18, 0x06, + 0x96, 0xed, 0x7b, 0x1e, 0xb1, 0x43, 0xd7, 0xf7, 0xac, 0x0e, 0xf6, 0x70, 0x93, 0xd0, 0xcd, 0xee, + 0xd6, 0x34, 0x56, 0x29, 0xa0, 0x7e, 0xe8, 0xa3, 0x07, 0x02, 0xb5, 0x24, 0x51, 0x4b, 0x12, 0xb5, + 0xa4, 0x50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0x74, 0x71, 0xdb, 0x75, 0x70, 0x48, 0x36, + 0xe3, 0x81, 0x64, 0xac, 0xff, 0xf9, 0x0e, 0xac, 0x54, 0xc3, 0x30, 0xd8, 0xee, 0x87, 0xcb, 0x13, + 0x19, 0x2d, 0xe8, 0x23, 0x0d, 0xc0, 0xf6, 0x1d, 0x62, 0x5b, 0x7c, 0xe9, 0x0c, 0xad, 0xa8, 0x6d, + 0xcc, 0x6f, 0x3d, 0x2d, 0x3d, 0x5f, 0xe0, 0x95, 0x26, 0xda, 0x28, 0x6d, 0x73, 0xfc, 0x7a, 0x2f, + 0x20, 0x95, 0xf4, 0xb3, 0xca, 0xec, 0x0f, 0xb4, 0x84, 0xae, 0x99, 0x19, 0x3b, 0x26, 0xa2, 0x0d, + 0xc8, 0xf2, 0x59, 0x58, 0x01, 0x25, 0x0d, 0xf7, 0xcc, 0x48, 0x14, 0xb5, 0x8d, 0x4c, 0x65, 0xee, + 0x59, 0x25, 0x45, 0x13, 0x45, 0xcd, 0x04, 0xce, 0x3b, 0x12, 0x2c, 0x74, 0x08, 0x49, 0xea, 0x30, + 0x23, 0x59, 0xd4, 0x36, 0xb2, 0x5b, 0x6f, 0x3e, 0xaf, 0x93, 0xa6, 0xc3, 0xaa, 0x33, 0x26, 0x47, + 0x42, 0xbb, 0x90, 0x13, 0x31, 0x6b, 0x49, 0x10, 0x23, 0x25, 0x90, 0x8b, 0x0a, 0x19, 0x07, 0xae, + 0x90, 0xe7, 0x12, 0xdb, 0x42, 0x40, 0x05, 0x44, 0x75, 0xc6, 0xcc, 0xd2, 0x01, 0x15, 0x9d, 0x42, + 0x7e, 0x38, 0x03, 0x98, 0x71, 0x5b, 0xe0, 0xec, 0x3c, 0xaf, 0x87, 0x35, 0x01, 0x26, 0xec, 0x72, + 0x57, 0x73, 0x6c, 0xe8, 0x1b, 0x11, 0xc8, 0x09, 0x55, 0x09, 0xc7, 0x8c, 0xd9, 0x62, 0x72, 0x23, + 0xbb, 0x55, 0x79, 0x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4, + 0x9f, 0xf5, 0x82, 0xe7, 0xca, 0x4a, 0x3f, 0xe5, 0x86, 0x05, 0xd6, 0x7f, 0xab, 0x01, 0x0c, 0x9a, + 0x85, 0x8b, 0x23, 0xe1, 0x8b, 0x70, 0x4d, 0xbd, 0x95, 0xc8, 0x4a, 0x7c, 0xe3, 0x5c, 0xff, 0x50, + 0x13, 0xff, 0xbb, 0xf0, 0x76, 0xbe, 0x3a, 0x63, 0x2a, 0x61, 0xf4, 0x65, 0xc8, 0xf1, 0x99, 0x3b, + 0xa3, 0x4f, 0xf9, 0xcb, 0xe7, 0x94, 0xcb, 0x5e, 0xaf, 0x3a, 0x63, 0x66, 0x85, 0xac, 0xf4, 0xb1, + 0x92, 0x87, 0xac, 0x9a, 0x36, 0xa7, 0x3e, 0x4c, 0xa5, 0x93, 0x7a, 0x6a, 0xfd, 0x09, 0xa0, 0xf3, + 0x77, 0x24, 0xf4, 0xa5, 0x31, 0x2b, 0xda, 0x74, 0x2b, 0xa3, 0x36, 0x3e, 0xd1, 0x3e, 0xfd, 0xf9, + 0xbf, 0x7f, 0x32, 0xfb, 0x35, 0xf4, 0xa6, 0x5c, 0xcb, 0xfe, 0x45, 0x8e, 0xa9, 0x98, 0x64, 0x97, + 0x07, 0xe5, 0xfd, 0x3f, 0x7d, 0xf4, 0xd7, 0xbf, 0x5f, 0x4b, 0xe8, 0x1a, 0xec, 0xb8, 0xbe, 0xdc, + 0x13, 0x71, 0x09, 0x7f, 0xce, 0x10, 0xaf, 0x14, 0x26, 0xde, 0xbf, 0xc4, 0x83, 0xf1, 0x91, 0x76, + 0x72, 0x4d, 0x4c, 0xe6, 0xfe, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xed, 0x6d, 0x7a, 0x83, 0xdb, + 0x1c, 0x00, 0x00, } - -func (m *HttpConnectionManager) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpConnectionManager) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.CodecType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.CodecType)) - } - if len(m.StatPrefix) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(len(m.StatPrefix))) - i += copy(dAtA[i:], m.StatPrefix) - } - if m.RouteSpecifier != nil { - nn1, err := m.RouteSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if len(m.HttpFilters) > 0 { - for _, msg := range m.HttpFilters { - dAtA[i] = 0x2a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.AddUserAgent != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.AddUserAgent.Size())) - n2, err := m.AddUserAgent.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Tracing != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.Tracing.Size())) - n3, err := m.Tracing.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.HttpProtocolOptions != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.HttpProtocolOptions.Size())) - n4, err := m.HttpProtocolOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.Http2ProtocolOptions != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.Http2ProtocolOptions.Size())) - n5, err := m.Http2ProtocolOptions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.ServerName) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(len(m.ServerName))) - i += copy(dAtA[i:], m.ServerName) - } - if m.IdleTimeout != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout))) - n6, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.IdleTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.DrainTimeout != nil { - dAtA[i] = 0x62 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.DrainTimeout))) - n7, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.DrainTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if len(m.AccessLog) > 0 { - for _, msg := range m.AccessLog { - dAtA[i] = 0x6a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.UseRemoteAddress != nil { - dAtA[i] = 0x72 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.UseRemoteAddress.Size())) - n8, err := m.UseRemoteAddress.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.GenerateRequestId != nil { - dAtA[i] = 0x7a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.GenerateRequestId.Size())) - n9, err := m.GenerateRequestId.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.ForwardClientCertDetails != 0 { - dAtA[i] = 0x80 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.ForwardClientCertDetails)) - } - if m.SetCurrentClientCertDetails != nil { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.SetCurrentClientCertDetails.Size())) - n10, err := m.SetCurrentClientCertDetails.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.Proxy_100Continue { - dAtA[i] = 0x90 - i++ - dAtA[i] = 0x1 - i++ - if m.Proxy_100Continue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XffNumTrustedHops != 0 { - dAtA[i] = 0x98 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.XffNumTrustedHops)) - } - if m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 { - dAtA[i] = 0xa0 - i++ - dAtA[i] = 0x1 - i++ - if m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.SkipXffAppend { - dAtA[i] = 0xa8 - i++ - dAtA[i] = 0x1 - i++ - if m.SkipXffAppend { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.Via) > 0 { - dAtA[i] = 0xb2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(len(m.Via))) - i += copy(dAtA[i:], m.Via) - } - if len(m.UpgradeConfigs) > 0 { - for _, msg := range m.UpgradeConfigs { - dAtA[i] = 0xba - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.StreamIdleTimeout != nil { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.StreamIdleTimeout))) - n11, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.StreamIdleTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.InternalAddressConfig != nil { - dAtA[i] = 0xca - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.InternalAddressConfig.Size())) - n12, err := m.InternalAddressConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if m.DelayedCloseTimeout != nil { - dAtA[i] = 0xd2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.DelayedCloseTimeout))) - n13, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.DelayedCloseTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - if m.RequestTimeout != nil { - dAtA[i] = 0xe2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.RequestTimeout))) - n14, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.RequestTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - if m.MaxRequestHeadersKb != nil { - dAtA[i] = 0xea - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.MaxRequestHeadersKb.Size())) - n15, err := m.MaxRequestHeadersKb.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - if m.NormalizePath != nil { - dAtA[i] = 0xf2 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.NormalizePath.Size())) - n16, err := m.NormalizePath.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpConnectionManager_Rds) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Rds != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.Rds.Size())) - n17, err := m.Rds.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - return i, nil -} -func (m *HttpConnectionManager_RouteConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.RouteConfig != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.RouteConfig.Size())) - n18, err := m.RouteConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - return i, nil -} -func (m *HttpConnectionManager_Tracing) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpConnectionManager_Tracing) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.OperationName != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.OperationName)) - } - if len(m.RequestHeadersForTags) > 0 { - for _, s := range m.RequestHeadersForTags { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.ClientSampling != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.ClientSampling.Size())) - n19, err := m.ClientSampling.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.RandomSampling != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.RandomSampling.Size())) - n20, err := m.RandomSampling.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if m.OverallSampling != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.OverallSampling.Size())) - n21, err := m.OverallSampling.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - if m.Verbose { - dAtA[i] = 0x30 - i++ - if m.Verbose { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpConnectionManager_InternalAddressConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpConnectionManager_InternalAddressConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.UnixSockets { - dAtA[i] = 0x8 - i++ - if m.UnixSockets { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpConnectionManager_SetCurrentClientCertDetails) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpConnectionManager_SetCurrentClientCertDetails) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Subject != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.Subject.Size())) - n22, err := m.Subject.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - if m.Cert { - dAtA[i] = 0x18 - i++ - if m.Cert { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Dns { - dAtA[i] = 0x20 - i++ - if m.Dns { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Uri { - dAtA[i] = 0x28 - i++ - if m.Uri { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpConnectionManager_UpgradeConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpConnectionManager_UpgradeConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.UpgradeType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(len(m.UpgradeType))) - i += copy(dAtA[i:], m.UpgradeType) - } - if len(m.Filters) > 0 { - for _, msg := range m.Filters { - dAtA[i] = 0x12 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Enabled != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.Enabled.Size())) - n23, err := m.Enabled.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Rds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Rds) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.ConfigSource.Size())) - n24, err := m.ConfigSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - if len(m.RouteConfigName) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(len(m.RouteConfigName))) - i += copy(dAtA[i:], m.RouteConfigName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.ConfigType != nil { - nn25, err := m.ConfigType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn25 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpFilter_Config) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Config != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.Config.Size())) - n26, err := m.Config.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } - return i, nil -} -func (m *HttpFilter_TypedConfig) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TypedConfig != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintHttpConnectionManager(dAtA, i, uint64(m.TypedConfig.Size())) - n27, err := m.TypedConfig.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - return i, nil -} -func encodeVarintHttpConnectionManager(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *HttpConnectionManager) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CodecType != 0 { - n += 1 + sovHttpConnectionManager(uint64(m.CodecType)) - } - l = len(m.StatPrefix) - if l > 0 { - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.RouteSpecifier != nil { - n += m.RouteSpecifier.Size() - } - if len(m.HttpFilters) > 0 { - for _, e := range m.HttpFilters { - l = e.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - } - if m.AddUserAgent != nil { - l = m.AddUserAgent.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.Tracing != nil { - l = m.Tracing.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.HttpProtocolOptions != nil { - l = m.HttpProtocolOptions.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.Http2ProtocolOptions != nil { - l = m.Http2ProtocolOptions.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - l = len(m.ServerName) - if l > 0 { - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.IdleTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout) - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.DrainTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.DrainTimeout) - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if len(m.AccessLog) > 0 { - for _, e := range m.AccessLog { - l = e.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - } - if m.UseRemoteAddress != nil { - l = m.UseRemoteAddress.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.GenerateRequestId != nil { - l = m.GenerateRequestId.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.ForwardClientCertDetails != 0 { - n += 2 + sovHttpConnectionManager(uint64(m.ForwardClientCertDetails)) - } - if m.SetCurrentClientCertDetails != nil { - l = m.SetCurrentClientCertDetails.Size() - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.Proxy_100Continue { - n += 3 - } - if m.XffNumTrustedHops != 0 { - n += 2 + sovHttpConnectionManager(uint64(m.XffNumTrustedHops)) - } - if m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 { - n += 3 - } - if m.SkipXffAppend { - n += 3 - } - l = len(m.Via) - if l > 0 { - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if len(m.UpgradeConfigs) > 0 { - for _, e := range m.UpgradeConfigs { - l = e.Size() - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - } - if m.StreamIdleTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.StreamIdleTimeout) - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.InternalAddressConfig != nil { - l = m.InternalAddressConfig.Size() - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.DelayedCloseTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.DelayedCloseTimeout) - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.RequestTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.RequestTimeout) - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.MaxRequestHeadersKb != nil { - l = m.MaxRequestHeadersKb.Size() - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.NormalizePath != nil { - l = m.NormalizePath.Size() - n += 2 + l + sovHttpConnectionManager(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpConnectionManager_Rds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Rds != nil { - l = m.Rds.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - return n -} -func (m *HttpConnectionManager_RouteConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RouteConfig != nil { - l = m.RouteConfig.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - return n -} -func (m *HttpConnectionManager_Tracing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OperationName != 0 { - n += 1 + sovHttpConnectionManager(uint64(m.OperationName)) - } - if len(m.RequestHeadersForTags) > 0 { - for _, s := range m.RequestHeadersForTags { - l = len(s) - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - } - if m.ClientSampling != nil { - l = m.ClientSampling.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.RandomSampling != nil { - l = m.RandomSampling.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.OverallSampling != nil { - l = m.OverallSampling.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.Verbose { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpConnectionManager_InternalAddressConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UnixSockets { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpConnectionManager_SetCurrentClientCertDetails) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Subject != nil { - l = m.Subject.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.Cert { - n += 2 - } - if m.Dns { - n += 2 - } - if m.Uri { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpConnectionManager_UpgradeConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UpgradeType) - if l > 0 { - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if len(m.Filters) > 0 { - for _, e := range m.Filters { - l = e.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - } - if m.Enabled != nil { - l = m.Enabled.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Rds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConfigSource.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - l = len(m.RouteConfigName) - if l > 0 { - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - if m.ConfigType != nil { - n += m.ConfigType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpFilter_Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - return n -} -func (m *HttpFilter_TypedConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedConfig != nil { - l = m.TypedConfig.Size() - n += 1 + l + sovHttpConnectionManager(uint64(l)) - } - return n -} - -func sovHttpConnectionManager(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozHttpConnectionManager(x uint64) (n int) { - return sovHttpConnectionManager(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *HttpConnectionManager) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpConnectionManager: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpConnectionManager: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CodecType", wireType) - } - m.CodecType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CodecType |= HttpConnectionManager_CodecType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Rds{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RouteSpecifier = &HttpConnectionManager_Rds{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RouteConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v2.RouteConfiguration{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RouteSpecifier = &HttpConnectionManager_RouteConfig{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpFilters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HttpFilters = append(m.HttpFilters, &HttpFilter{}) - if err := m.HttpFilters[len(m.HttpFilters)-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 AddUserAgent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddUserAgent == nil { - m.AddUserAgent = &types.BoolValue{} - } - if err := m.AddUserAgent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tracing", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tracing == nil { - m.Tracing = &HttpConnectionManager_Tracing{} - } - if err := m.Tracing.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HttpProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HttpProtocolOptions == nil { - m.HttpProtocolOptions = &core.Http1ProtocolOptions{} - } - if err := m.HttpProtocolOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http2ProtocolOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Http2ProtocolOptions == nil { - m.Http2ProtocolOptions = &core.Http2ProtocolOptions{} - } - if err := m.Http2ProtocolOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServerName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdleTimeout == nil { - m.IdleTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.IdleTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DrainTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DrainTimeout == nil { - m.DrainTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.DrainTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessLog", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessLog = append(m.AccessLog, &v21.AccessLog{}) - if err := m.AccessLog[len(m.AccessLog)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UseRemoteAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UseRemoteAddress == nil { - m.UseRemoteAddress = &types.BoolValue{} - } - if err := m.UseRemoteAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenerateRequestId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GenerateRequestId == nil { - m.GenerateRequestId = &types.BoolValue{} - } - if err := m.GenerateRequestId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ForwardClientCertDetails", wireType) - } - m.ForwardClientCertDetails = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ForwardClientCertDetails |= HttpConnectionManager_ForwardClientCertDetails(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SetCurrentClientCertDetails", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SetCurrentClientCertDetails == nil { - m.SetCurrentClientCertDetails = &HttpConnectionManager_SetCurrentClientCertDetails{} - } - if err := m.SetCurrentClientCertDetails.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proxy_100Continue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Proxy_100Continue = bool(v != 0) - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XffNumTrustedHops", wireType) - } - m.XffNumTrustedHops = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.XffNumTrustedHops |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RepresentIpv4RemoteAddressAsIpv4MappedIpv6", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 = bool(v != 0) - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SkipXffAppend", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SkipXffAppend = bool(v != 0) - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Via", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Via = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradeConfigs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UpgradeConfigs = append(m.UpgradeConfigs, &HttpConnectionManager_UpgradeConfig{}) - if err := m.UpgradeConfigs[len(m.UpgradeConfigs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StreamIdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StreamIdleTimeout == nil { - m.StreamIdleTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.StreamIdleTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InternalAddressConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InternalAddressConfig == nil { - m.InternalAddressConfig = &HttpConnectionManager_InternalAddressConfig{} - } - if err := m.InternalAddressConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelayedCloseTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DelayedCloseTimeout == nil { - m.DelayedCloseTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.DelayedCloseTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestTimeout == nil { - m.RequestTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.RequestTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestHeadersKb", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxRequestHeadersKb == nil { - m.MaxRequestHeadersKb = &types.UInt32Value{} - } - if err := m.MaxRequestHeadersKb.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NormalizePath", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NormalizePath == nil { - m.NormalizePath = &types.BoolValue{} - } - if err := m.NormalizePath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 *HttpConnectionManager_Tracing) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tracing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tracing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationName", wireType) - } - m.OperationName = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OperationName |= HttpConnectionManager_Tracing_OperationName(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeadersForTags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeadersForTags = append(m.RequestHeadersForTags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientSampling", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientSampling == nil { - m.ClientSampling = &_type.Percent{} - } - if err := m.ClientSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RandomSampling", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RandomSampling == nil { - m.RandomSampling = &_type.Percent{} - } - if err := m.RandomSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OverallSampling", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OverallSampling == nil { - m.OverallSampling = &_type.Percent{} - } - if err := m.OverallSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Verbose", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Verbose = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 *HttpConnectionManager_InternalAddressConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InternalAddressConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InternalAddressConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnixSockets", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UnixSockets = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 *HttpConnectionManager_SetCurrentClientCertDetails) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SetCurrentClientCertDetails: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SetCurrentClientCertDetails: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subject == nil { - m.Subject = &types.BoolValue{} - } - if err := m.Subject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Cert = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Dns", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Dns = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Uri = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 *HttpConnectionManager_UpgradeConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpgradeConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpgradeConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradeType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UpgradeType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, &HttpFilter{}) - if err := m.Filters[len(m.Filters)-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 Enabled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Enabled == nil { - m.Enabled = &types.BoolValue{} - } - if err := m.Enabled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 *Rds) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Rds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Rds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigSource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConfigSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RouteConfigName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RouteConfigName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 *HttpFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpFilter: 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 ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &HttpFilter_Config{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttpConnectionManager - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.Any{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ConfigType = &HttpFilter_TypedConfig{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttpConnectionManager(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpConnectionManager - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpConnectionManager - } - 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 skipHttpConnectionManager(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpConnectionManager - } - 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, ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpConnectionManager - } - 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, ErrInvalidLengthHttpConnectionManager - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpConnectionManager - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpConnectionManager - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHttpConnectionManager(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpConnectionManager - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHttpConnectionManager = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttpConnectionManager = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go index 1eac5307d1..ed6567056d 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto -package v2 +package envoy_config_filter_network_http_connection_manager_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _http_connection_manager_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on HttpConnectionManager with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -58,167 +61,134 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetHttpFilters() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: fmt.Sprintf("HttpFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: fmt.Sprintf("HttpFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetAddUserAgent() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "AddUserAgent", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetAddUserAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "AddUserAgent", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetTracing() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "Tracing", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetHttpProtocolOptions() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "HttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "CommonHttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetHttp2ProtocolOptions() + if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "HttpProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "Http2ProtocolOptions", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for ServerName + if _, ok := HttpConnectionManager_ServerHeaderTransformation_name[int32(m.GetServerHeaderTransformation())]; !ok { + return HttpConnectionManagerValidationError{ + field: "ServerHeaderTransformation", + reason: "value must be one of the defined enum values", + } + } + if wrapper := m.GetMaxRequestHeadersKb(); wrapper != nil { - if wrapper.GetValue() > 96 { + if val := wrapper.GetValue(); val <= 0 || val > 96 { return HttpConnectionManagerValidationError{ field: "MaxRequestHeadersKb", - reason: "value must be less than or equal to 96", + reason: "value must be inside range (0, 96]", } } } - { - tmp := m.GetIdleTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetStreamIdleTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "StreamIdleTimeout", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetStreamIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "StreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetRequestTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "RequestTimeout", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "RequestTimeout", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetDrainTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "DrainTimeout", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDrainTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "DrainTimeout", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetDelayedCloseTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "DelayedCloseTimeout", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDelayedCloseTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "DelayedCloseTimeout", + reason: "embedded message failed validation", + cause: err, } } } @@ -226,51 +196,36 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: fmt.Sprintf("AccessLog[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetUseRemoteAddress() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "UseRemoteAddress", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetUseRemoteAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "UseRemoteAddress", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for XffNumTrustedHops - { - tmp := m.GetInternalAddressConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "InternalAddressConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetInternalAddressConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "InternalAddressConfig", + reason: "embedded message failed validation", + cause: err, } } } @@ -279,21 +234,18 @@ func (m *HttpConnectionManager) Validate() error { // no validation rules for Via - { - tmp := m.GetGenerateRequestId() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "GenerateRequestId", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetGenerateRequestId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "GenerateRequestId", + reason: "embedded message failed validation", + cause: err, } } } + // no validation rules for PreserveExternalRequestId + if _, ok := HttpConnectionManager_ForwardClientCertDetails_name[int32(m.GetForwardClientCertDetails())]; !ok { return HttpConnectionManagerValidationError{ field: "ForwardClientCertDetails", @@ -301,17 +253,12 @@ func (m *HttpConnectionManager) Validate() error { } } - { - tmp := m.GetSetCurrentClientCertDetails() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "SetCurrentClientCertDetails", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSetCurrentClientCertDetails()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "SetCurrentClientCertDetails", + reason: "embedded message failed validation", + cause: err, } } } @@ -323,34 +270,36 @@ func (m *HttpConnectionManager) Validate() error { for idx, item := range m.GetUpgradeConfigs() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: fmt.Sprintf("UpgradeConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetNormalizePath() + if v, ok := interface{}(m.GetNormalizePath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "NormalizePath", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + // no validation rules for MergeSlashes - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "NormalizePath", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRequestIdExtension()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "RequestIdExtension", + reason: "embedded message failed validation", + cause: err, } } } @@ -359,34 +308,36 @@ func (m *HttpConnectionManager) Validate() error { case *HttpConnectionManager_Rds: - { - tmp := m.GetRds() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "Rds", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, } } } case *HttpConnectionManager_RouteConfig: - { - tmp := m.GetRouteConfig() + if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { + case *HttpConnectionManager_ScopedRoutes: - if err := v.Validate(); err != nil { - return HttpConnectionManagerValidationError{ - field: "RouteConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetScopedRoutes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManagerValidationError{ + field: "ScopedRoutes", + reason: "embedded message failed validation", + cause: err, } } } @@ -465,17 +416,19 @@ func (m *Rds) Validate() error { return nil } - { - tmp := m.GetConfigSource() + if m.GetConfigSource() == nil { + return RdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + } - if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return RdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, } } } @@ -544,6 +497,317 @@ var _ interface { ErrorName() string } = RdsValidationError{} +// Validate checks the field values on ScopedRouteConfigurationsList with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ScopedRouteConfigurationsList) Validate() error { + if m == nil { + return nil + } + + if len(m.GetScopedRouteConfigurations()) < 1 { + return ScopedRouteConfigurationsListValidationError{ + field: "ScopedRouteConfigurations", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetScopedRouteConfigurations() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRouteConfigurationsListValidationError{ + field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ScopedRouteConfigurationsListValidationError is the validation error +// returned by ScopedRouteConfigurationsList.Validate if the designated +// constraints aren't met. +type ScopedRouteConfigurationsListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRouteConfigurationsListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopedRouteConfigurationsListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopedRouteConfigurationsListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRouteConfigurationsListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRouteConfigurationsListValidationError) ErrorName() string { + return "ScopedRouteConfigurationsListValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRouteConfigurationsListValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRouteConfigurationsList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRouteConfigurationsListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRouteConfigurationsListValidationError{} + +// Validate checks the field values on ScopedRoutes with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ScopedRoutes) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return ScopedRoutesValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if m.GetScopeKeyBuilder() == nil { + return ScopedRoutesValidationError{ + field: "ScopeKeyBuilder", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetScopeKeyBuilder()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesValidationError{ + field: "ScopeKeyBuilder", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetRdsConfigSource() == nil { + return ScopedRoutesValidationError{ + field: "RdsConfigSource", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetRdsConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesValidationError{ + field: "RdsConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.ConfigSpecifier.(type) { + + case *ScopedRoutes_ScopedRouteConfigurationsList: + + if v, ok := interface{}(m.GetScopedRouteConfigurationsList()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesValidationError{ + field: "ScopedRouteConfigurationsList", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ScopedRoutes_ScopedRds: + + if v, ok := interface{}(m.GetScopedRds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesValidationError{ + field: "ScopedRds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return ScopedRoutesValidationError{ + field: "ConfigSpecifier", + reason: "value is required", + } + + } + + return nil +} + +// ScopedRoutesValidationError is the validation error returned by +// ScopedRoutes.Validate if the designated constraints aren't met. +type ScopedRoutesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopedRoutesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopedRoutesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRoutesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRoutesValidationError) ErrorName() string { return "ScopedRoutesValidationError" } + +// Error satisfies the builtin error interface +func (e ScopedRoutesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRoutes.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutesValidationError{} + +// Validate checks the field values on ScopedRds with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *ScopedRds) Validate() error { + if m == nil { + return nil + } + + if m.GetScopedRdsConfigSource() == nil { + return ScopedRdsValidationError{ + field: "ScopedRdsConfigSource", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetScopedRdsConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRdsValidationError{ + field: "ScopedRdsConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ScopedRdsValidationError is the validation error returned by +// ScopedRds.Validate if the designated constraints aren't met. +type ScopedRdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopedRdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopedRdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRdsValidationError) ErrorName() string { return "ScopedRdsValidationError" } + +// Error satisfies the builtin error interface +func (e ScopedRdsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRdsValidationError{} + // Validate checks the field values on HttpFilter with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *HttpFilter) Validate() error { @@ -562,34 +826,24 @@ func (m *HttpFilter) Validate() error { case *HttpFilter_Config: - { - tmp := m.GetConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, } } } case *HttpFilter_TypedConfig: - { - tmp := m.GetTypedConfig() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, } } } @@ -653,6 +907,83 @@ var _ interface { ErrorName() string } = HttpFilterValidationError{} +// Validate checks the field values on RequestIDExtension with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RequestIDExtension) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RequestIDExtensionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// RequestIDExtensionValidationError is the validation error returned by +// RequestIDExtension.Validate if the designated constraints aren't met. +type RequestIDExtensionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RequestIDExtensionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RequestIDExtensionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RequestIDExtensionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RequestIDExtensionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RequestIDExtensionValidationError) ErrorName() string { + return "RequestIDExtensionValidationError" +} + +// Error satisfies the builtin error interface +func (e RequestIDExtensionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRequestIDExtension.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RequestIDExtensionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RequestIDExtensionValidationError{} + // Validate checks the field values on HttpConnectionManager_Tracing with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -668,53 +999,73 @@ func (m *HttpConnectionManager_Tracing) Validate() error { } } - { - tmp := m.GetClientSampling() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManager_TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "ClientSampling", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetRandomSampling() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManager_TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "RandomSampling", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetOverallSampling() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManager_TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "OverallSampling", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for Verbose + if v, ok := interface{}(m.GetMaxPathTagLength()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "MaxPathTagLength", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetCustomTags() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetProvider()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_TracingValidationError{ + field: "Provider", + reason: "embedded message failed validation", + cause: err, + } + } + } + return nil } @@ -854,23 +1205,20 @@ func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error { return nil } - { - tmp := m.GetSubject() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_SetCurrentClientCertDetailsValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for Cert + // no validation rules for Chain + // no validation rules for Dns // no validation rules for Uri @@ -955,34 +1303,24 @@ func (m *HttpConnectionManager_UpgradeConfig) Validate() error { for idx, item := range m.GetFilters() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManager_UpgradeConfigValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_UpgradeConfigValidationError{ + field: fmt.Sprintf("Filters[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetEnabled() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HttpConnectionManager_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpConnectionManager_UpgradeConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, } } } @@ -1046,3 +1384,382 @@ var _ interface { Cause() error ErrorName() string } = HttpConnectionManager_UpgradeConfigValidationError{} + +// Validate checks the field values on ScopedRoutes_ScopeKeyBuilder with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ScopedRoutes_ScopeKeyBuilder) Validate() error { + if m == nil { + return nil + } + + if len(m.GetFragments()) < 1 { + return ScopedRoutes_ScopeKeyBuilderValidationError{ + field: "Fragments", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetFragments() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutes_ScopeKeyBuilderValidationError{ + field: fmt.Sprintf("Fragments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ScopedRoutes_ScopeKeyBuilderValidationError is the validation error returned +// by ScopedRoutes_ScopeKeyBuilder.Validate if the designated constraints +// aren't met. +type ScopedRoutes_ScopeKeyBuilderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutes_ScopeKeyBuilderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopedRoutes_ScopeKeyBuilderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopedRoutes_ScopeKeyBuilderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRoutes_ScopeKeyBuilderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRoutes_ScopeKeyBuilderValidationError) ErrorName() string { + return "ScopedRoutes_ScopeKeyBuilderValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutes_ScopeKeyBuilderValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRoutes_ScopeKeyBuilder.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutes_ScopeKeyBuilderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutes_ScopeKeyBuilderValidationError{} + +// Validate checks the field values on +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Validate() error { + if m == nil { + return nil + } + + switch m.Type.(type) { + + case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_: + + if v, ok := interface{}(m.GetHeaderValueExtractor()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + field: "HeaderValueExtractor", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{ + field: "Type", + reason: "value is required", + } + + } + + return nil +} + +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError is the +// validation error returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Validate if the designated +// constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) ErrorName() string { + return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{} + +// Validate checks the field values on +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for ElementSeparator + + switch m.ExtractType.(type) { + + case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index: + // no validation rules for Index + + case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element: + + if v, ok := interface{}(m.GetElement()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{ + field: "Element", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError +// is the validation error returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Validate +// if the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) ErrorName() string { + return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{} + +// Validate checks the field values on +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement +// with the rules defined in the proto definition for this message. If any +// rules are violated, an error is returned. +func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Validate() error { + if m == nil { + return nil + } + + if len(m.GetSeparator()) < 1 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ + field: "Separator", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetKey()) < 1 { + return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{ + field: "Key", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError +// is the validation error returned by +// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Validate +// if the designated constraints aren't met. +type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) ErrorName() string { + return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go index 56868ee918..1078f730b9 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.go @@ -1,111 +1,50 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto -package v2 +package envoy_config_filter_network_tcp_proxy_v2 import ( fmt "fmt" - io "io" - math "math" - time "time" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type TcpProxy struct { - // The prefix to use when emitting :ref:`statistics - // `. StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // Types that are valid to be assigned to ClusterSpecifier: // *TcpProxy_Cluster // *TcpProxy_WeightedClusters - ClusterSpecifier isTcpProxy_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` - // Optional endpoint metadata match criteria. Only endpoints in the upstream - // cluster with metadata matching that set in metadata_match will be - // considered. The filter name should be specified as *envoy.lb*. - MetadataMatch *core.Metadata `protobuf:"bytes,9,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // The idle timeout for connections managed by the TCP proxy filter. The idle timeout - // is defined as the period in which there are no bytes sent or received on either - // the upstream or downstream connection. If not set, connections will never be closed - // by the TCP proxy due to being idle. - IdleTimeout *time.Duration `protobuf:"bytes,8,opt,name=idle_timeout,json=idleTimeout,proto3,stdduration" json:"idle_timeout,omitempty"` - // [#not-implemented-hide:] The idle timeout for connections managed by the TCP proxy - // filter. The idle timeout is defined as the period in which there is no - // active traffic. If not set, there is no idle timeout. When the idle timeout - // is reached the connection will be closed. The distinction between - // downstream_idle_timeout/upstream_idle_timeout provides a means to set - // timeout based on the last byte sent on the downstream/upstream connection. - DownstreamIdleTimeout *types.Duration `protobuf:"bytes,3,opt,name=downstream_idle_timeout,json=downstreamIdleTimeout,proto3" json:"downstream_idle_timeout,omitempty"` - // [#not-implemented-hide:] - UpstreamIdleTimeout *types.Duration `protobuf:"bytes,4,opt,name=upstream_idle_timeout,json=upstreamIdleTimeout,proto3" json:"upstream_idle_timeout,omitempty"` - // Configuration for :ref:`access logs ` - // emitted by the this tcp_proxy. - AccessLog []*v2.AccessLog `protobuf:"bytes,5,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` - // TCP Proxy filter configuration using deprecated V1 format. This is required for complex - // routing until filter chain matching in the listener is implemented. - // - // Example: - // - // .. code-block:: yaml - // - // - name: "envoy.tcp_proxy" - // config: - // deprecated_v1: true - // value: - // stat_prefix: "prefix" - // access_log: - // - ... - // route_config: - // routes: - // - cluster: "cluster" - // destination_ip_list: - // - "10.1.0.0/8" - // destination_ports: "8080" - // source_ip_list: - // - "10.1.0.0/16" - // - "2001:db8::/32" - // source_ports: "8000,9000-9999" - // - // .. attention:: - // - // Using the deprecated V1 configuration excludes the use of any V2 configuration options. Only - // the V1 configuration is used. All available fields are shown in the example, although the - // access log configuration is omitted for simplicity. The access log configuration uses the - // :repo:`deprecated V1 access log configuration`. - // - // .. attention:: - // - // In the deprecated V1 configuration, source and destination CIDR ranges are specified as a - // list of strings with each string in CIDR notation. Source and destination ports are - // specified as single strings containing a comma-separated list of ports and/or port ranges. - // - // Deprecation pending https://github.com/envoyproxy/envoy/issues/4457 - DeprecatedV1 *TcpProxy_DeprecatedV1 `protobuf:"bytes,6,opt,name=deprecated_v1,json=deprecatedV1,proto3" json:"deprecated_v1,omitempty"` - // The maximum number of unsuccessful connection attempts that will be made before - // giving up. If the parameter is not specified, 1 connection attempt will be made. - MaxConnectAttempts *types.UInt32Value `protobuf:"bytes,7,opt,name=max_connect_attempts,json=maxConnectAttempts,proto3" json:"max_connect_attempts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ClusterSpecifier isTcpProxy_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` + MetadataMatch *core.Metadata `protobuf:"bytes,9,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + IdleTimeout *duration.Duration `protobuf:"bytes,8,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` + DownstreamIdleTimeout *duration.Duration `protobuf:"bytes,3,opt,name=downstream_idle_timeout,json=downstreamIdleTimeout,proto3" json:"downstream_idle_timeout,omitempty"` + UpstreamIdleTimeout *duration.Duration `protobuf:"bytes,4,opt,name=upstream_idle_timeout,json=upstreamIdleTimeout,proto3" json:"upstream_idle_timeout,omitempty"` + AccessLog []*v2.AccessLog `protobuf:"bytes,5,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` + DeprecatedV1 *TcpProxy_DeprecatedV1 `protobuf:"bytes,6,opt,name=deprecated_v1,json=deprecatedV1,proto3" json:"deprecated_v1,omitempty"` // Deprecated: Do not use. + MaxConnectAttempts *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_connect_attempts,json=maxConnectAttempts,proto3" json:"max_connect_attempts,omitempty"` + HashPolicy []*_type.HashPolicy `protobuf:"bytes,11,rep,name=hash_policy,json=hashPolicy,proto3" json:"hash_policy,omitempty"` + TunnelingConfig *TcpProxy_TunnelingConfig `protobuf:"bytes,12,opt,name=tunneling_config,json=tunnelingConfig,proto3" json:"tunneling_config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TcpProxy) Reset() { *m = TcpProxy{} } @@ -114,26 +53,18 @@ func (*TcpProxy) ProtoMessage() {} func (*TcpProxy) Descriptor() ([]byte, []int) { return fileDescriptor_1f6b35dbcbad27ba, []int{0} } + func (m *TcpProxy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpProxy.Unmarshal(m, b) } func (m *TcpProxy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpProxy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpProxy.Marshal(b, m, deterministic) } func (m *TcpProxy) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpProxy.Merge(m, src) } func (m *TcpProxy) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpProxy.Size(m) } func (m *TcpProxy) XXX_DiscardUnknown() { xxx_messageInfo_TcpProxy.DiscardUnknown(m) @@ -141,20 +72,27 @@ func (m *TcpProxy) XXX_DiscardUnknown() { var xxx_messageInfo_TcpProxy proto.InternalMessageInfo +func (m *TcpProxy) GetStatPrefix() string { + if m != nil { + return m.StatPrefix + } + return "" +} + type isTcpProxy_ClusterSpecifier interface { isTcpProxy_ClusterSpecifier() - MarshalTo([]byte) (int, error) - Size() int } type TcpProxy_Cluster struct { Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3,oneof"` } + type TcpProxy_WeightedClusters struct { WeightedClusters *TcpProxy_WeightedCluster `protobuf:"bytes,10,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` } -func (*TcpProxy_Cluster) isTcpProxy_ClusterSpecifier() {} +func (*TcpProxy_Cluster) isTcpProxy_ClusterSpecifier() {} + func (*TcpProxy_WeightedClusters) isTcpProxy_ClusterSpecifier() {} func (m *TcpProxy) GetClusterSpecifier() isTcpProxy_ClusterSpecifier { @@ -164,13 +102,6 @@ func (m *TcpProxy) GetClusterSpecifier() isTcpProxy_ClusterSpecifier { return nil } -func (m *TcpProxy) GetStatPrefix() string { - if m != nil { - return m.StatPrefix - } - return "" -} - func (m *TcpProxy) GetCluster() string { if x, ok := m.GetClusterSpecifier().(*TcpProxy_Cluster); ok { return x.Cluster @@ -192,21 +123,21 @@ func (m *TcpProxy) GetMetadataMatch() *core.Metadata { return nil } -func (m *TcpProxy) GetIdleTimeout() *time.Duration { +func (m *TcpProxy) GetIdleTimeout() *duration.Duration { if m != nil { return m.IdleTimeout } return nil } -func (m *TcpProxy) GetDownstreamIdleTimeout() *types.Duration { +func (m *TcpProxy) GetDownstreamIdleTimeout() *duration.Duration { if m != nil { return m.DownstreamIdleTimeout } return nil } -func (m *TcpProxy) GetUpstreamIdleTimeout() *types.Duration { +func (m *TcpProxy) GetUpstreamIdleTimeout() *duration.Duration { if m != nil { return m.UpstreamIdleTimeout } @@ -220,6 +151,7 @@ func (m *TcpProxy) GetAccessLog() []*v2.AccessLog { return nil } +// Deprecated: Do not use. func (m *TcpProxy) GetDeprecatedV1() *TcpProxy_DeprecatedV1 { if m != nil { return m.DeprecatedV1 @@ -227,89 +159,37 @@ func (m *TcpProxy) GetDeprecatedV1() *TcpProxy_DeprecatedV1 { return nil } -func (m *TcpProxy) GetMaxConnectAttempts() *types.UInt32Value { +func (m *TcpProxy) GetMaxConnectAttempts() *wrappers.UInt32Value { if m != nil { return m.MaxConnectAttempts } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TcpProxy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _TcpProxy_OneofMarshaler, _TcpProxy_OneofUnmarshaler, _TcpProxy_OneofSizer, []interface{}{ +func (m *TcpProxy) GetHashPolicy() []*_type.HashPolicy { + if m != nil { + return m.HashPolicy + } + return nil +} + +func (m *TcpProxy) GetTunnelingConfig() *TcpProxy_TunnelingConfig { + if m != nil { + return m.TunnelingConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TcpProxy) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*TcpProxy_Cluster)(nil), (*TcpProxy_WeightedClusters)(nil), } } -func _TcpProxy_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TcpProxy) - // cluster_specifier - switch x := m.ClusterSpecifier.(type) { - case *TcpProxy_Cluster: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Cluster) - case *TcpProxy_WeightedClusters: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.WeightedClusters); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TcpProxy.ClusterSpecifier has unexpected type %T", x) - } - return nil -} - -func _TcpProxy_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TcpProxy) - switch tag { - case 2: // cluster_specifier.cluster - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.ClusterSpecifier = &TcpProxy_Cluster{x} - return true, err - case 10: // cluster_specifier.weighted_clusters - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TcpProxy_WeightedCluster) - err := b.DecodeMessage(msg) - m.ClusterSpecifier = &TcpProxy_WeightedClusters{msg} - return true, err - default: - return false, nil - } -} - -func _TcpProxy_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TcpProxy) - // cluster_specifier - switch x := m.ClusterSpecifier.(type) { - case *TcpProxy_Cluster: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Cluster))) - n += len(x.Cluster) - case *TcpProxy_WeightedClusters: - s := proto.Size(x.WeightedClusters) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// TCP Proxy filter configuration using V1 format, until Envoy gets the -// ability to match source/destination at the listener level (called -// :ref:`filter chain match `). +// Deprecated: Do not use. type TcpProxy_DeprecatedV1 struct { - // The route table for the filter. All filter instances must have a route - // table, even if it is empty. Routes []*TcpProxy_DeprecatedV1_TCPRoute `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -322,26 +202,18 @@ func (*TcpProxy_DeprecatedV1) ProtoMessage() {} func (*TcpProxy_DeprecatedV1) Descriptor() ([]byte, []int) { return fileDescriptor_1f6b35dbcbad27ba, []int{0, 0} } + func (m *TcpProxy_DeprecatedV1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpProxy_DeprecatedV1.Unmarshal(m, b) } func (m *TcpProxy_DeprecatedV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpProxy_DeprecatedV1.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpProxy_DeprecatedV1.Marshal(b, m, deterministic) } func (m *TcpProxy_DeprecatedV1) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpProxy_DeprecatedV1.Merge(m, src) } func (m *TcpProxy_DeprecatedV1) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpProxy_DeprecatedV1.Size(m) } func (m *TcpProxy_DeprecatedV1) XXX_DiscardUnknown() { xxx_messageInfo_TcpProxy_DeprecatedV1.DiscardUnknown(m) @@ -356,49 +228,15 @@ func (m *TcpProxy_DeprecatedV1) GetRoutes() []*TcpProxy_DeprecatedV1_TCPRoute { return nil } -// A TCP proxy route consists of a set of optional L4 criteria and the -// name of a cluster. If a downstream connection matches all the -// specified criteria, the cluster in the route is used for the -// corresponding upstream connection. Routes are tried in the order -// specified until a match is found. If no match is found, the connection -// is closed. A route with no criteria is valid and always produces a -// match. type TcpProxy_DeprecatedV1_TCPRoute struct { - // The cluster to connect to when a the downstream network connection - // matches the specified criteria. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // An optional list of IP address subnets in the form - // “ip_address/xx”. The criteria is satisfied if the destination IP - // address of the downstream connection is contained in at least one of - // the specified subnets. If the parameter is not specified or the list - // is empty, the destination IP address is ignored. The destination IP - // address of the downstream connection might be different from the - // addresses on which the proxy is listening if the connection has been - // redirected. - DestinationIpList []*core.CidrRange `protobuf:"bytes,2,rep,name=destination_ip_list,json=destinationIpList,proto3" json:"destination_ip_list,omitempty"` - // An optional string containing a comma-separated list of port numbers - // or ranges. The criteria is satisfied if the destination port of the - // downstream connection is contained in at least one of the specified - // ranges. If the parameter is not specified, the destination port is - // ignored. The destination port address of the downstream connection - // might be different from the port on which the proxy is listening if - // the connection has been redirected. - DestinationPorts string `protobuf:"bytes,3,opt,name=destination_ports,json=destinationPorts,proto3" json:"destination_ports,omitempty"` - // An optional list of IP address subnets in the form - // “ip_address/xx”. The criteria is satisfied if the source IP address - // of the downstream connection is contained in at least one of the - // specified subnets. If the parameter is not specified or the list is - // empty, the source IP address is ignored. - SourceIpList []*core.CidrRange `protobuf:"bytes,4,rep,name=source_ip_list,json=sourceIpList,proto3" json:"source_ip_list,omitempty"` - // An optional string containing a comma-separated list of port numbers - // or ranges. The criteria is satisfied if the source port of the - // downstream connection is contained in at least one of the specified - // ranges. If the parameter is not specified, the source port is - // ignored. - SourcePorts string `protobuf:"bytes,5,opt,name=source_ports,json=sourcePorts,proto3" json:"source_ports,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` + DestinationIpList []*core.CidrRange `protobuf:"bytes,2,rep,name=destination_ip_list,json=destinationIpList,proto3" json:"destination_ip_list,omitempty"` + DestinationPorts string `protobuf:"bytes,3,opt,name=destination_ports,json=destinationPorts,proto3" json:"destination_ports,omitempty"` + SourceIpList []*core.CidrRange `protobuf:"bytes,4,rep,name=source_ip_list,json=sourceIpList,proto3" json:"source_ip_list,omitempty"` + SourcePorts string `protobuf:"bytes,5,opt,name=source_ports,json=sourcePorts,proto3" json:"source_ports,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TcpProxy_DeprecatedV1_TCPRoute) Reset() { *m = TcpProxy_DeprecatedV1_TCPRoute{} } @@ -407,26 +245,18 @@ func (*TcpProxy_DeprecatedV1_TCPRoute) ProtoMessage() {} func (*TcpProxy_DeprecatedV1_TCPRoute) Descriptor() ([]byte, []int) { return fileDescriptor_1f6b35dbcbad27ba, []int{0, 0, 0} } + func (m *TcpProxy_DeprecatedV1_TCPRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpProxy_DeprecatedV1_TCPRoute.Unmarshal(m, b) } func (m *TcpProxy_DeprecatedV1_TCPRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpProxy_DeprecatedV1_TCPRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpProxy_DeprecatedV1_TCPRoute.Marshal(b, m, deterministic) } func (m *TcpProxy_DeprecatedV1_TCPRoute) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpProxy_DeprecatedV1_TCPRoute.Merge(m, src) } func (m *TcpProxy_DeprecatedV1_TCPRoute) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpProxy_DeprecatedV1_TCPRoute.Size(m) } func (m *TcpProxy_DeprecatedV1_TCPRoute) XXX_DiscardUnknown() { xxx_messageInfo_TcpProxy_DeprecatedV1_TCPRoute.DiscardUnknown(m) @@ -469,11 +299,7 @@ func (m *TcpProxy_DeprecatedV1_TCPRoute) GetSourcePorts() string { return "" } -// 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 these weights. type TcpProxy_WeightedCluster struct { - // Specifies one or more upstream clusters associated with the route. Clusters []*TcpProxy_WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -486,26 +312,18 @@ func (*TcpProxy_WeightedCluster) ProtoMessage() {} func (*TcpProxy_WeightedCluster) Descriptor() ([]byte, []int) { return fileDescriptor_1f6b35dbcbad27ba, []int{0, 1} } + func (m *TcpProxy_WeightedCluster) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpProxy_WeightedCluster.Unmarshal(m, b) } func (m *TcpProxy_WeightedCluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpProxy_WeightedCluster.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpProxy_WeightedCluster.Marshal(b, m, deterministic) } func (m *TcpProxy_WeightedCluster) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpProxy_WeightedCluster.Merge(m, src) } func (m *TcpProxy_WeightedCluster) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpProxy_WeightedCluster.Size(m) } func (m *TcpProxy_WeightedCluster) XXX_DiscardUnknown() { xxx_messageInfo_TcpProxy_WeightedCluster.DiscardUnknown(m) @@ -521,15 +339,12 @@ func (m *TcpProxy_WeightedCluster) GetClusters() []*TcpProxy_WeightedCluster_Clu } type TcpProxy_WeightedCluster_ClusterWeight struct { - // Name of the upstream cluster. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // 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 determines the total weight. - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` + MetadataMatch *core.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TcpProxy_WeightedCluster_ClusterWeight) Reset() { @@ -540,26 +355,18 @@ func (*TcpProxy_WeightedCluster_ClusterWeight) ProtoMessage() {} func (*TcpProxy_WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { return fileDescriptor_1f6b35dbcbad27ba, []int{0, 1, 0} } + func (m *TcpProxy_WeightedCluster_ClusterWeight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TcpProxy_WeightedCluster_ClusterWeight.Unmarshal(m, b) } func (m *TcpProxy_WeightedCluster_ClusterWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TcpProxy_WeightedCluster_ClusterWeight.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TcpProxy_WeightedCluster_ClusterWeight.Marshal(b, m, deterministic) } func (m *TcpProxy_WeightedCluster_ClusterWeight) XXX_Merge(src proto.Message) { xxx_messageInfo_TcpProxy_WeightedCluster_ClusterWeight.Merge(m, src) } func (m *TcpProxy_WeightedCluster_ClusterWeight) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TcpProxy_WeightedCluster_ClusterWeight.Size(m) } func (m *TcpProxy_WeightedCluster_ClusterWeight) XXX_DiscardUnknown() { xxx_messageInfo_TcpProxy_WeightedCluster_ClusterWeight.DiscardUnknown(m) @@ -581,12 +388,59 @@ func (m *TcpProxy_WeightedCluster_ClusterWeight) GetWeight() uint32 { return 0 } +func (m *TcpProxy_WeightedCluster_ClusterWeight) GetMetadataMatch() *core.Metadata { + if m != nil { + return m.MetadataMatch + } + return nil +} + +type TcpProxy_TunnelingConfig struct { + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TcpProxy_TunnelingConfig) Reset() { *m = TcpProxy_TunnelingConfig{} } +func (m *TcpProxy_TunnelingConfig) String() string { return proto.CompactTextString(m) } +func (*TcpProxy_TunnelingConfig) ProtoMessage() {} +func (*TcpProxy_TunnelingConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_1f6b35dbcbad27ba, []int{0, 2} +} + +func (m *TcpProxy_TunnelingConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TcpProxy_TunnelingConfig.Unmarshal(m, b) +} +func (m *TcpProxy_TunnelingConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TcpProxy_TunnelingConfig.Marshal(b, m, deterministic) +} +func (m *TcpProxy_TunnelingConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TcpProxy_TunnelingConfig.Merge(m, src) +} +func (m *TcpProxy_TunnelingConfig) XXX_Size() int { + return xxx_messageInfo_TcpProxy_TunnelingConfig.Size(m) +} +func (m *TcpProxy_TunnelingConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TcpProxy_TunnelingConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TcpProxy_TunnelingConfig proto.InternalMessageInfo + +func (m *TcpProxy_TunnelingConfig) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + func init() { proto.RegisterType((*TcpProxy)(nil), "envoy.config.filter.network.tcp_proxy.v2.TcpProxy") proto.RegisterType((*TcpProxy_DeprecatedV1)(nil), "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.DeprecatedV1") proto.RegisterType((*TcpProxy_DeprecatedV1_TCPRoute)(nil), "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.DeprecatedV1.TCPRoute") proto.RegisterType((*TcpProxy_WeightedCluster)(nil), "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster") proto.RegisterType((*TcpProxy_WeightedCluster_ClusterWeight)(nil), "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight") + proto.RegisterType((*TcpProxy_TunnelingConfig)(nil), "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.TunnelingConfig") } func init() { @@ -594,1542 +448,64 @@ func init() { } var fileDescriptor_1f6b35dbcbad27ba = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcf, 0x6e, 0xdc, 0x44, - 0x18, 0xcf, 0xec, 0x26, 0xe9, 0xee, 0x6c, 0xb6, 0x34, 0xd3, 0x56, 0x35, 0x26, 0xa4, 0x29, 0x5c, - 0x56, 0xa9, 0x64, 0xd3, 0xad, 0x84, 0xb8, 0xa1, 0x3a, 0x3d, 0x24, 0x28, 0x91, 0xb6, 0x56, 0x28, - 0x2a, 0x17, 0x6b, 0x62, 0xcf, 0xba, 0x23, 0x6c, 0xcf, 0x30, 0x33, 0xde, 0xdd, 0xbe, 0x05, 0x70, - 0x40, 0x3c, 0x03, 0x4f, 0x80, 0x38, 0xf5, 0xc8, 0x91, 0x27, 0x00, 0x94, 0x5b, 0xdf, 0x02, 0xcd, - 0x1f, 0xef, 0x3a, 0x24, 0xa8, 0x51, 0x7b, 0xf2, 0xcc, 0xf7, 0x7d, 0xbf, 0xdf, 0xcf, 0xdf, 0xbf, - 0x81, 0x5f, 0x90, 0x6a, 0xc6, 0x5e, 0x85, 0x29, 0xab, 0xa6, 0x34, 0x0f, 0xa7, 0xb4, 0x50, 0x44, - 0x84, 0x15, 0x51, 0x73, 0x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 0x59, 0xaa, 0xae, 0x5f, 0x43, 0x75, 0xcb, 0x62, 0x9c, 0xe0, - 0x03, 0xe8, 0xee, 0x4e, 0x6b, 0xc3, 0x68, 0x0d, 0xac, 0xcd, 0xc8, 0xf8, 0x7f, 0x01, 0xf8, 0xc1, - 0x7f, 0x76, 0x1f, 0x2d, 0x60, 0x6f, 0xf9, 0xa2, 0xd8, 0xbe, 0x4c, 0xde, 0xff, 0x45, 0x09, 0xdc, - 0xd7, 0x9a, 0x2f, 0xf4, 0x67, 0xa9, 0xe6, 0x3f, 0x83, 0xc3, 0x0b, 0x61, 0xe8, 0x63, 0xb8, 0x5e, - 0xe1, 0x92, 0x5c, 0x6e, 0x91, 0x31, 0xa3, 0x07, 0x70, 0xd3, 0xbe, 0x52, 0xe6, 0x7d, 0x1c, 0xb6, - 0xe7, 0xcf, 0x39, 0x22, 0x1f, 0x6e, 0x3b, 0xfa, 0x44, 0x72, 0x92, 0xd2, 0x29, 0x25, 0x02, 0x6d, - 0xfc, 0xf6, 0xe6, 0x75, 0x17, 0x44, 0x2f, 0xfe, 0x38, 0xdf, 0x05, 0x7f, 0x9e, 0xef, 0x82, 0x7f, - 0xce, 0x77, 0x01, 0xfc, 0x9c, 0x32, 0x9b, 0xa6, 0xcd, 0xe5, 0xba, 0x19, 0x47, 0xc3, 0x26, 0xe5, - 0x89, 0x5e, 0x89, 0x09, 0xf8, 0xb6, 0x33, 0x1b, 0x9f, 0x6d, 0x9a, 0xfd, 0x78, 0xfc, 0x6f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x23, 0xf6, 0x27, 0x40, 0x07, 0x00, 0x00, + // 929 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0xae, 0x94, 0xc4, 0x71, 0xd6, 0x36, 0x71, 0xb6, 0x94, 0x0a, 0x37, 0xb4, 0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 0x45, 0x31, 0xf6, 0xe2, 0x82, 0x23, 0x49, 0x68, 0xfe, 0x7f, 0xfe, 0x19, + 0x47, 0x8c, 0x61, 0x5e, 0x55, 0x7b, 0xbf, 0x88, 0x19, 0xf2, 0x50, 0x9e, 0x53, 0xa9, 0x60, 0xc2, + 0xcb, 0x48, 0xc2, 0x91, 0xac, 0xea, 0xfd, 0xe0, 0x9a, 0x5f, 0x48, 0x24, 0x8b, 0x0a, 0x7e, 0x77, + 0x8a, 0x52, 0x12, 0x23, 0x89, 0xbd, 0xea, 0x43, 0x3b, 0x3e, 0xfc, 0xbd, 0x03, 0x9a, 0xe7, 0x11, + 0x1b, 0x95, 0x6d, 0x83, 0x7d, 0xd0, 0x2a, 0x51, 0x21, 0xe3, 0x78, 0x4c, 0xe6, 0x8e, 0x75, 0x60, + 0xf5, 0x77, 0xfc, 0xed, 0x97, 0xfe, 0x26, 0xb7, 0x0f, 0xac, 0x00, 0x94, 0xbe, 0x91, 0x72, 0xc1, + 0x1e, 0xd8, 0x8e, 0xd2, 0x42, 0x48, 0xcc, 0x1d, 0xbb, 0x8c, 0x3a, 0xbe, 0x15, 0x54, 0x06, 0xf8, + 0x3d, 0xd8, 0x9b, 0x61, 0x92, 0x4c, 0x24, 0x8e, 0x43, 0x63, 0x13, 0x0e, 0x38, 0xb0, 0xfa, 0xad, + 0x81, 0xef, 0xde, 0x54, 0x3f, 0xb7, 0x2a, 0xca, 0x7d, 0x6e, 0xb8, 0x86, 0x9a, 0xea, 0xf8, 0x56, + 0xd0, 0x9d, 0xad, 0x9a, 0x04, 0xf4, 0xc1, 0x3b, 0x19, 0x96, 0x28, 0x46, 0x12, 0x85, 0x19, 0x92, + 0xd1, 0xc4, 0xd9, 0x51, 0xf9, 0xee, 0x99, 0x7c, 0x88, 0x91, 0x92, 0xb3, 0x14, 0xd9, 0x3d, 0x33, + 0x81, 0x41, 0xa7, 0x82, 0x9c, 0x95, 0x08, 0xf8, 0x05, 0x68, 0x93, 0x38, 0x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, 0xac, 0xde, 0x6f, 0x36, 0xd8, 0xbd, + 0xb2, 0x9f, 0xe0, 0x14, 0x34, 0x17, 0x5b, 0x4f, 0xeb, 0x32, 0x7a, 0xfb, 0xad, 0xe7, 0x9a, 0x5f, + 0x6d, 0xae, 0xe9, 0xb3, 0xc8, 0xd5, 0xfb, 0xd9, 0x02, 0x9d, 0x95, 0x28, 0x78, 0x0f, 0x6c, 0xe6, + 0x28, 0xc3, 0x57, 0x35, 0x52, 0x46, 0xf8, 0x00, 0x34, 0xf4, 0x1a, 0x55, 0x0b, 0xbc, 0xb3, 0x1c, + 0x16, 0x63, 0x5e, 0xb3, 0x53, 0x37, 0x5e, 0x77, 0xa7, 0xf6, 0x9e, 0x80, 0xdd, 0x2b, 0xcf, 0x1a, + 0x7e, 0x04, 0x9a, 0x13, 0x2a, 0xe4, 0xba, 0xc2, 0x16, 0x0e, 0xdf, 0x01, 0x7b, 0xe6, 0x5e, 0xa1, + 0x60, 0x38, 0x22, 0x63, 0x82, 0x39, 0xdc, 0xf8, 0xc7, 0xb7, 0xfc, 0x1f, 0xad, 0xbf, 0x7f, 0xfd, + 0xf7, 0xc5, 0x96, 0x07, 0x3f, 0xd1, 0x55, 0xe0, 0xb9, 0xc4, 0xb9, 0x28, 0xff, 0xf0, 0x4c, 0x5f, + 0xc5, 0xba, 0xc6, 0x1e, 0xfe, 0xf1, 0xc3, 0x9f, 0x7f, 0x35, 0xec, 0xae, 0x05, 0x9e, 0x10, 0xaa, + 0xeb, 0xd7, 0x9e, 0x9b, 0x0a, 0xe3, 0x77, 0x2a, 0x65, 0x46, 0xe5, 0xa6, 0x19, 0x59, 0x17, 0x0d, + 0xb5, 0x72, 0x0e, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x09, 0x51, 0xfd, 0xc8, 0xcc, 0x08, 0x00, + 0x00, } - -func (m *TcpProxy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpProxy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StatPrefix) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(len(m.StatPrefix))) - i += copy(dAtA[i:], m.StatPrefix) - } - if m.ClusterSpecifier != nil { - nn1, err := m.ClusterSpecifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if m.DownstreamIdleTimeout != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.DownstreamIdleTimeout.Size())) - n2, err := m.DownstreamIdleTimeout.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.UpstreamIdleTimeout != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.UpstreamIdleTimeout.Size())) - n3, err := m.UpstreamIdleTimeout.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.AccessLog) > 0 { - for _, msg := range m.AccessLog { - dAtA[i] = 0x2a - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.DeprecatedV1 != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.DeprecatedV1.Size())) - n4, err := m.DeprecatedV1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.MaxConnectAttempts != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.MaxConnectAttempts.Size())) - n5, err := m.MaxConnectAttempts.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.IdleTimeout != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout))) - n6, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.IdleTimeout, dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.MetadataMatch != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.MetadataMatch.Size())) - n7, err := m.MetadataMatch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TcpProxy_Cluster) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x12 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(len(m.Cluster))) - i += copy(dAtA[i:], m.Cluster) - return i, nil -} -func (m *TcpProxy_WeightedClusters) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.WeightedClusters != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.WeightedClusters.Size())) - n8, err := m.WeightedClusters.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} -func (m *TcpProxy_DeprecatedV1) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpProxy_DeprecatedV1) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Routes) > 0 { - for _, msg := range m.Routes { - dAtA[i] = 0xa - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TcpProxy_DeprecatedV1_TCPRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpProxy_DeprecatedV1_TCPRoute) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Cluster) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(len(m.Cluster))) - i += copy(dAtA[i:], m.Cluster) - } - if len(m.DestinationIpList) > 0 { - for _, msg := range m.DestinationIpList { - dAtA[i] = 0x12 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.DestinationPorts) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(len(m.DestinationPorts))) - i += copy(dAtA[i:], m.DestinationPorts) - } - if len(m.SourceIpList) > 0 { - for _, msg := range m.SourceIpList { - dAtA[i] = 0x22 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.SourcePorts) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(len(m.SourcePorts))) - i += copy(dAtA[i:], m.SourcePorts) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TcpProxy_WeightedCluster) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpProxy_WeightedCluster) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Clusters) > 0 { - for _, msg := range m.Clusters { - dAtA[i] = 0xa - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *TcpProxy_WeightedCluster_ClusterWeight) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TcpProxy_WeightedCluster_ClusterWeight) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Weight != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTcpProxy(dAtA, i, uint64(m.Weight)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintTcpProxy(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *TcpProxy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StatPrefix) - if l > 0 { - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.ClusterSpecifier != nil { - n += m.ClusterSpecifier.Size() - } - if m.DownstreamIdleTimeout != nil { - l = m.DownstreamIdleTimeout.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.UpstreamIdleTimeout != nil { - l = m.UpstreamIdleTimeout.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - if len(m.AccessLog) > 0 { - for _, e := range m.AccessLog { - l = e.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - } - if m.DeprecatedV1 != nil { - l = m.DeprecatedV1.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.MaxConnectAttempts != nil { - l = m.MaxConnectAttempts.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.IdleTimeout != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.IdleTimeout) - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.MetadataMatch != nil { - l = m.MetadataMatch.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TcpProxy_Cluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cluster) - n += 1 + l + sovTcpProxy(uint64(l)) - return n -} -func (m *TcpProxy_WeightedClusters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.WeightedClusters != nil { - l = m.WeightedClusters.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - return n -} -func (m *TcpProxy_DeprecatedV1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Routes) > 0 { - for _, e := range m.Routes { - l = e.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TcpProxy_DeprecatedV1_TCPRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Cluster) - if l > 0 { - n += 1 + l + sovTcpProxy(uint64(l)) - } - if len(m.DestinationIpList) > 0 { - for _, e := range m.DestinationIpList { - l = e.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - } - l = len(m.DestinationPorts) - if l > 0 { - n += 1 + l + sovTcpProxy(uint64(l)) - } - if len(m.SourceIpList) > 0 { - for _, e := range m.SourceIpList { - l = e.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - } - l = len(m.SourcePorts) - if l > 0 { - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TcpProxy_WeightedCluster) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Clusters) > 0 { - for _, e := range m.Clusters { - l = e.Size() - n += 1 + l + sovTcpProxy(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TcpProxy_WeightedCluster_ClusterWeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTcpProxy(uint64(l)) - } - if m.Weight != 0 { - n += 1 + sovTcpProxy(uint64(m.Weight)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTcpProxy(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTcpProxy(x uint64) (n int) { - return sovTcpProxy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TcpProxy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TcpProxy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TcpProxy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterSpecifier = &TcpProxy_Cluster{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DownstreamIdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DownstreamIdleTimeout == nil { - m.DownstreamIdleTimeout = &types.Duration{} - } - if err := m.DownstreamIdleTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpstreamIdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpstreamIdleTimeout == nil { - m.UpstreamIdleTimeout = &types.Duration{} - } - if err := m.UpstreamIdleTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessLog", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessLog = append(m.AccessLog, &v2.AccessLog{}) - if err := m.AccessLog[len(m.AccessLog)-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 DeprecatedV1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DeprecatedV1 == nil { - m.DeprecatedV1 = &TcpProxy_DeprecatedV1{} - } - if err := m.DeprecatedV1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxConnectAttempts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxConnectAttempts == nil { - m.MaxConnectAttempts = &types.UInt32Value{} - } - if err := m.MaxConnectAttempts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdleTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdleTimeout == nil { - m.IdleTimeout = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.IdleTimeout, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetadataMatch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetadataMatch == nil { - m.MetadataMatch = &core.Metadata{} - } - if err := m.MetadataMatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WeightedClusters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TcpProxy_WeightedCluster{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ClusterSpecifier = &TcpProxy_WeightedClusters{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTcpProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTcpProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTcpProxy - } - 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 *TcpProxy_DeprecatedV1) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeprecatedV1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeprecatedV1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Routes = append(m.Routes, &TcpProxy_DeprecatedV1_TCPRoute{}) - if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTcpProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTcpProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTcpProxy - } - 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 *TcpProxy_DeprecatedV1_TCPRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TCPRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TCPRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cluster = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationIpList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationIpList = append(m.DestinationIpList, &core.CidrRange{}) - if err := m.DestinationIpList[len(m.DestinationIpList)-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 DestinationPorts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationPorts = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceIpList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourceIpList = append(m.SourceIpList, &core.CidrRange{}) - if err := m.SourceIpList[len(m.SourceIpList)-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 SourcePorts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourcePorts = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTcpProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTcpProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTcpProxy - } - 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 *TcpProxy_WeightedCluster) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WeightedCluster: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WeightedCluster: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Clusters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Clusters = append(m.Clusters, &TcpProxy_WeightedCluster_ClusterWeight{}) - if err := m.Clusters[len(m.Clusters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTcpProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTcpProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTcpProxy - } - 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 *TcpProxy_WeightedCluster_ClusterWeight) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterWeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterWeight: 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 ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTcpProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTcpProxy - } - 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 Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTcpProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTcpProxy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTcpProxy - } - 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 skipTcpProxy(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTcpProxy - } - 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, ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTcpProxy - } - 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, ErrInvalidLengthTcpProxy - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthTcpProxy - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTcpProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTcpProxy(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthTcpProxy - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthTcpProxy = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTcpProxy = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go index aed775ffb0..4238c83b56 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto -package v2 +package envoy_config_filter_network_tcp_proxy_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _tcp_proxy_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on TcpProxy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *TcpProxy) Validate() error { @@ -47,61 +50,42 @@ func (m *TcpProxy) Validate() error { } } - { - tmp := m.GetMetadataMatch() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, } } } - if d := m.GetIdleTimeout(); d != nil { - dur := *d - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { + if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { return TcpProxyValidationError{ field: "IdleTimeout", - reason: "value must be greater than 0s", - } - } - - } - - { - tmp := m.GetDownstreamIdleTimeout() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "DownstreamIdleTimeout", - reason: "embedded message failed validation", - cause: err, - } + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetUpstreamIdleTimeout() + if v, ok := interface{}(m.GetDownstreamIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "DownstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "UpstreamIdleTimeout", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetUpstreamIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "UpstreamIdleTimeout", + reason: "embedded message failed validation", + cause: err, } } } @@ -109,34 +93,24 @@ func (m *TcpProxy) Validate() error { for idx, item := range m.GetAccessLog() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: fmt.Sprintf("AccessLog[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetDeprecatedV1() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "DeprecatedV1", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "DeprecatedV1", + reason: "embedded message failed validation", + cause: err, } } } @@ -152,6 +126,38 @@ func (m *TcpProxy) Validate() error { } + if len(m.GetHashPolicy()) > 1 { + return TcpProxyValidationError{ + field: "HashPolicy", + reason: "value must contain no more than 1 item(s)", + } + } + + for idx, item := range m.GetHashPolicy() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: fmt.Sprintf("HashPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetTunnelingConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "TunnelingConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + switch m.ClusterSpecifier.(type) { case *TcpProxy_Cluster: @@ -159,17 +165,12 @@ func (m *TcpProxy) Validate() error { case *TcpProxy_WeightedClusters: - { - tmp := m.GetWeightedClusters() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxyValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxyValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, } } } @@ -257,17 +258,12 @@ func (m *TcpProxy_DeprecatedV1) Validate() error { for idx, item := range m.GetRoutes() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxy_DeprecatedV1ValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_DeprecatedV1ValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -351,17 +347,12 @@ func (m *TcpProxy_WeightedCluster) Validate() error { for idx, item := range m.GetClusters() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxy_WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -427,6 +418,80 @@ var _ interface { ErrorName() string } = TcpProxy_WeightedClusterValidationError{} +// Validate checks the field values on TcpProxy_TunnelingConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *TcpProxy_TunnelingConfig) Validate() error { + if m == nil { + return nil + } + + if len(m.GetHostname()) < 1 { + return TcpProxy_TunnelingConfigValidationError{ + field: "Hostname", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// TcpProxy_TunnelingConfigValidationError is the validation error returned by +// TcpProxy_TunnelingConfig.Validate if the designated constraints aren't met. +type TcpProxy_TunnelingConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TcpProxy_TunnelingConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TcpProxy_TunnelingConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TcpProxy_TunnelingConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TcpProxy_TunnelingConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TcpProxy_TunnelingConfigValidationError) ErrorName() string { + return "TcpProxy_TunnelingConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e TcpProxy_TunnelingConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTcpProxy_TunnelingConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TcpProxy_TunnelingConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TcpProxy_TunnelingConfigValidationError{} + // Validate checks the field values on TcpProxy_DeprecatedV1_TCPRoute with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -445,17 +510,12 @@ func (m *TcpProxy_DeprecatedV1_TCPRoute) Validate() error { for idx, item := range m.GetDestinationIpList() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxy_DeprecatedV1_TCPRouteValidationError{ - field: fmt.Sprintf("DestinationIpList[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_DeprecatedV1_TCPRouteValidationError{ + field: fmt.Sprintf("DestinationIpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -467,17 +527,12 @@ func (m *TcpProxy_DeprecatedV1_TCPRoute) Validate() error { for idx, item := range m.GetSourceIpList() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return TcpProxy_DeprecatedV1_TCPRouteValidationError{ - field: fmt.Sprintf("SourceIpList[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_DeprecatedV1_TCPRouteValidationError{ + field: fmt.Sprintf("SourceIpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -568,6 +623,16 @@ func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { } } + if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpProxy_WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + return nil } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go new file mode 100644 index 0000000000..8c7303a698 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go @@ -0,0 +1,88 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/config/listener/v2/api_listener.proto + +package envoy_config_listener_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type ApiListener struct { + ApiListener *any.Any `protobuf:"bytes,1,opt,name=api_listener,json=apiListener,proto3" json:"api_listener,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ApiListener) Reset() { *m = ApiListener{} } +func (m *ApiListener) String() string { return proto.CompactTextString(m) } +func (*ApiListener) ProtoMessage() {} +func (*ApiListener) Descriptor() ([]byte, []int) { + return fileDescriptor_c474ffebb332e36e, []int{0} +} + +func (m *ApiListener) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ApiListener.Unmarshal(m, b) +} +func (m *ApiListener) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ApiListener.Marshal(b, m, deterministic) +} +func (m *ApiListener) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApiListener.Merge(m, src) +} +func (m *ApiListener) XXX_Size() int { + return xxx_messageInfo_ApiListener.Size(m) +} +func (m *ApiListener) XXX_DiscardUnknown() { + xxx_messageInfo_ApiListener.DiscardUnknown(m) +} + +var xxx_messageInfo_ApiListener proto.InternalMessageInfo + +func (m *ApiListener) GetApiListener() *any.Any { + if m != nil { + return m.ApiListener + } + return nil +} + +func init() { + proto.RegisterType((*ApiListener)(nil), "envoy.config.listener.v2.ApiListener") +} + +func init() { + proto.RegisterFile("envoy/config/listener/v2/api_listener.proto", fileDescriptor_c474ffebb332e36e) +} + +var fileDescriptor_c474ffebb332e36e = []byte{ + // 224 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4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 0x64, 0x6f, 0x00, 0x63, 0x12, 0x1b, 0xd8, + 0x01, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x64, 0x61, 0xf2, 0x79, 0x57, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go new file mode 100644 index 0000000000..566d950927 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go @@ -0,0 +1,112 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/listener/v2/api_listener.proto + +package envoy_config_listener_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _api_listener_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on ApiListener with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ApiListener) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ApiListenerValidationError{ + field: "ApiListener", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ApiListenerValidationError is the validation error returned by +// ApiListener.Validate if the designated constraints aren't met. +type ApiListenerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApiListenerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApiListenerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApiListenerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApiListenerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApiListenerValidationError) ErrorName() string { return "ApiListenerValidationError" } + +// Error satisfies the builtin error interface +func (e ApiListenerValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sApiListener.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApiListenerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApiListenerValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.go new file mode 100644 index 0000000000..ae282d9239 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.go @@ -0,0 +1,741 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/config/trace/v2/trace.proto + +package envoy_config_trace_v2 + +import ( + fmt "fmt" + v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + _struct "github.com/golang/protobuf/ptypes/struct" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type LightstepConfig_PropagationMode int32 + +const ( + LightstepConfig_ENVOY LightstepConfig_PropagationMode = 0 + LightstepConfig_LIGHTSTEP LightstepConfig_PropagationMode = 1 + LightstepConfig_B3 LightstepConfig_PropagationMode = 2 + LightstepConfig_TRACE_CONTEXT LightstepConfig_PropagationMode = 3 +) + +var LightstepConfig_PropagationMode_name = map[int32]string{ + 0: "ENVOY", + 1: "LIGHTSTEP", + 2: "B3", + 3: "TRACE_CONTEXT", +} + +var LightstepConfig_PropagationMode_value = map[string]int32{ + "ENVOY": 0, + "LIGHTSTEP": 1, + "B3": 2, + "TRACE_CONTEXT": 3, +} + +func (x LightstepConfig_PropagationMode) String() string { + return proto.EnumName(LightstepConfig_PropagationMode_name, int32(x)) +} + +func (LightstepConfig_PropagationMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{1, 0} +} + +type ZipkinConfig_CollectorEndpointVersion int32 + +const ( + ZipkinConfig_HTTP_JSON_V1 ZipkinConfig_CollectorEndpointVersion = 0 // Deprecated: Do not use. + ZipkinConfig_HTTP_JSON ZipkinConfig_CollectorEndpointVersion = 1 + ZipkinConfig_HTTP_PROTO ZipkinConfig_CollectorEndpointVersion = 2 + ZipkinConfig_GRPC ZipkinConfig_CollectorEndpointVersion = 3 +) + +var ZipkinConfig_CollectorEndpointVersion_name = map[int32]string{ + 0: "HTTP_JSON_V1", + 1: "HTTP_JSON", + 2: "HTTP_PROTO", + 3: "GRPC", +} + +var ZipkinConfig_CollectorEndpointVersion_value = map[string]int32{ + "HTTP_JSON_V1": 0, + "HTTP_JSON": 1, + "HTTP_PROTO": 2, + "GRPC": 3, +} + +func (x ZipkinConfig_CollectorEndpointVersion) String() string { + return proto.EnumName(ZipkinConfig_CollectorEndpointVersion_name, int32(x)) +} + +func (ZipkinConfig_CollectorEndpointVersion) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{2, 0} +} + +type OpenCensusConfig_TraceContext int32 + +const ( + OpenCensusConfig_NONE OpenCensusConfig_TraceContext = 0 + OpenCensusConfig_TRACE_CONTEXT OpenCensusConfig_TraceContext = 1 + OpenCensusConfig_GRPC_TRACE_BIN OpenCensusConfig_TraceContext = 2 + OpenCensusConfig_CLOUD_TRACE_CONTEXT OpenCensusConfig_TraceContext = 3 + OpenCensusConfig_B3 OpenCensusConfig_TraceContext = 4 +) + +var OpenCensusConfig_TraceContext_name = map[int32]string{ + 0: "NONE", + 1: "TRACE_CONTEXT", + 2: "GRPC_TRACE_BIN", + 3: "CLOUD_TRACE_CONTEXT", + 4: "B3", +} + +var OpenCensusConfig_TraceContext_value = map[string]int32{ + "NONE": 0, + "TRACE_CONTEXT": 1, + "GRPC_TRACE_BIN": 2, + "CLOUD_TRACE_CONTEXT": 3, + "B3": 4, +} + +func (x OpenCensusConfig_TraceContext) String() string { + return proto.EnumName(OpenCensusConfig_TraceContext_name, int32(x)) +} + +func (OpenCensusConfig_TraceContext) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{5, 0} +} + +type Tracing struct { + Http *Tracing_Http `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tracing) Reset() { *m = Tracing{} } +func (m *Tracing) String() string { return proto.CompactTextString(m) } +func (*Tracing) ProtoMessage() {} +func (*Tracing) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{0} +} + +func (m *Tracing) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tracing.Unmarshal(m, b) +} +func (m *Tracing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tracing.Marshal(b, m, deterministic) +} +func (m *Tracing) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tracing.Merge(m, src) +} +func (m *Tracing) XXX_Size() int { + return xxx_messageInfo_Tracing.Size(m) +} +func (m *Tracing) XXX_DiscardUnknown() { + xxx_messageInfo_Tracing.DiscardUnknown(m) +} + +var xxx_messageInfo_Tracing proto.InternalMessageInfo + +func (m *Tracing) GetHttp() *Tracing_Http { + if m != nil { + return m.Http + } + return nil +} + +type Tracing_Http struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to ConfigType: + // *Tracing_Http_Config + // *Tracing_Http_TypedConfig + ConfigType isTracing_Http_ConfigType `protobuf_oneof:"config_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tracing_Http) Reset() { *m = Tracing_Http{} } +func (m *Tracing_Http) String() string { return proto.CompactTextString(m) } +func (*Tracing_Http) ProtoMessage() {} +func (*Tracing_Http) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{0, 0} +} + +func (m *Tracing_Http) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tracing_Http.Unmarshal(m, b) +} +func (m *Tracing_Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tracing_Http.Marshal(b, m, deterministic) +} +func (m *Tracing_Http) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tracing_Http.Merge(m, src) +} +func (m *Tracing_Http) XXX_Size() int { + return xxx_messageInfo_Tracing_Http.Size(m) +} +func (m *Tracing_Http) XXX_DiscardUnknown() { + xxx_messageInfo_Tracing_Http.DiscardUnknown(m) +} + +var xxx_messageInfo_Tracing_Http proto.InternalMessageInfo + +func (m *Tracing_Http) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type isTracing_Http_ConfigType interface { + isTracing_Http_ConfigType() +} + +type Tracing_Http_Config struct { + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +type Tracing_Http_TypedConfig struct { + TypedConfig *any.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*Tracing_Http_Config) isTracing_Http_ConfigType() {} + +func (*Tracing_Http_TypedConfig) isTracing_Http_ConfigType() {} + +func (m *Tracing_Http) GetConfigType() isTracing_Http_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +// Deprecated: Do not use. +func (m *Tracing_Http) GetConfig() *_struct.Struct { + if x, ok := m.GetConfigType().(*Tracing_Http_Config); ok { + return x.Config + } + return nil +} + +func (m *Tracing_Http) GetTypedConfig() *any.Any { + if x, ok := m.GetConfigType().(*Tracing_Http_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Tracing_Http) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Tracing_Http_Config)(nil), + (*Tracing_Http_TypedConfig)(nil), + } +} + +type LightstepConfig struct { + CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` + AccessTokenFile string `protobuf:"bytes,2,opt,name=access_token_file,json=accessTokenFile,proto3" json:"access_token_file,omitempty"` + PropagationModes []LightstepConfig_PropagationMode `protobuf:"varint,3,rep,packed,name=propagation_modes,json=propagationModes,proto3,enum=envoy.config.trace.v2.LightstepConfig_PropagationMode" json:"propagation_modes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LightstepConfig) Reset() { *m = LightstepConfig{} } +func (m *LightstepConfig) String() string { return proto.CompactTextString(m) } +func (*LightstepConfig) ProtoMessage() {} +func (*LightstepConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{1} +} + +func (m *LightstepConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LightstepConfig.Unmarshal(m, b) +} +func (m *LightstepConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LightstepConfig.Marshal(b, m, deterministic) +} +func (m *LightstepConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_LightstepConfig.Merge(m, src) +} +func (m *LightstepConfig) XXX_Size() int { + return xxx_messageInfo_LightstepConfig.Size(m) +} +func (m *LightstepConfig) XXX_DiscardUnknown() { + xxx_messageInfo_LightstepConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_LightstepConfig proto.InternalMessageInfo + +func (m *LightstepConfig) GetCollectorCluster() string { + if m != nil { + return m.CollectorCluster + } + return "" +} + +func (m *LightstepConfig) GetAccessTokenFile() string { + if m != nil { + return m.AccessTokenFile + } + return "" +} + +func (m *LightstepConfig) GetPropagationModes() []LightstepConfig_PropagationMode { + if m != nil { + return m.PropagationModes + } + return nil +} + +type ZipkinConfig struct { + CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` + CollectorEndpoint string `protobuf:"bytes,2,opt,name=collector_endpoint,json=collectorEndpoint,proto3" json:"collector_endpoint,omitempty"` + TraceId_128Bit bool `protobuf:"varint,3,opt,name=trace_id_128bit,json=traceId128bit,proto3" json:"trace_id_128bit,omitempty"` + SharedSpanContext *wrappers.BoolValue `protobuf:"bytes,4,opt,name=shared_span_context,json=sharedSpanContext,proto3" json:"shared_span_context,omitempty"` + CollectorEndpointVersion ZipkinConfig_CollectorEndpointVersion `protobuf:"varint,5,opt,name=collector_endpoint_version,json=collectorEndpointVersion,proto3,enum=envoy.config.trace.v2.ZipkinConfig_CollectorEndpointVersion" json:"collector_endpoint_version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ZipkinConfig) Reset() { *m = ZipkinConfig{} } +func (m *ZipkinConfig) String() string { return proto.CompactTextString(m) } +func (*ZipkinConfig) ProtoMessage() {} +func (*ZipkinConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{2} +} + +func (m *ZipkinConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ZipkinConfig.Unmarshal(m, b) +} +func (m *ZipkinConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ZipkinConfig.Marshal(b, m, deterministic) +} +func (m *ZipkinConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_ZipkinConfig.Merge(m, src) +} +func (m *ZipkinConfig) XXX_Size() int { + return xxx_messageInfo_ZipkinConfig.Size(m) +} +func (m *ZipkinConfig) XXX_DiscardUnknown() { + xxx_messageInfo_ZipkinConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_ZipkinConfig proto.InternalMessageInfo + +func (m *ZipkinConfig) GetCollectorCluster() string { + if m != nil { + return m.CollectorCluster + } + return "" +} + +func (m *ZipkinConfig) GetCollectorEndpoint() string { + if m != nil { + return m.CollectorEndpoint + } + return "" +} + +func (m *ZipkinConfig) GetTraceId_128Bit() bool { + if m != nil { + return m.TraceId_128Bit + } + return false +} + +func (m *ZipkinConfig) GetSharedSpanContext() *wrappers.BoolValue { + if m != nil { + return m.SharedSpanContext + } + return nil +} + +func (m *ZipkinConfig) GetCollectorEndpointVersion() ZipkinConfig_CollectorEndpointVersion { + if m != nil { + return m.CollectorEndpointVersion + } + return ZipkinConfig_HTTP_JSON_V1 +} + +type DynamicOtConfig struct { + Library string `protobuf:"bytes,1,opt,name=library,proto3" json:"library,omitempty"` + Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DynamicOtConfig) Reset() { *m = DynamicOtConfig{} } +func (m *DynamicOtConfig) String() string { return proto.CompactTextString(m) } +func (*DynamicOtConfig) ProtoMessage() {} +func (*DynamicOtConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{3} +} + +func (m *DynamicOtConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DynamicOtConfig.Unmarshal(m, b) +} +func (m *DynamicOtConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DynamicOtConfig.Marshal(b, m, deterministic) +} +func (m *DynamicOtConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_DynamicOtConfig.Merge(m, src) +} +func (m *DynamicOtConfig) XXX_Size() int { + return xxx_messageInfo_DynamicOtConfig.Size(m) +} +func (m *DynamicOtConfig) XXX_DiscardUnknown() { + xxx_messageInfo_DynamicOtConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_DynamicOtConfig proto.InternalMessageInfo + +func (m *DynamicOtConfig) GetLibrary() string { + if m != nil { + return m.Library + } + return "" +} + +func (m *DynamicOtConfig) GetConfig() *_struct.Struct { + if m != nil { + return m.Config + } + return nil +} + +type DatadogConfig struct { + CollectorCluster string `protobuf:"bytes,1,opt,name=collector_cluster,json=collectorCluster,proto3" json:"collector_cluster,omitempty"` + ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DatadogConfig) Reset() { *m = DatadogConfig{} } +func (m *DatadogConfig) String() string { return proto.CompactTextString(m) } +func (*DatadogConfig) ProtoMessage() {} +func (*DatadogConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{4} +} + +func (m *DatadogConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DatadogConfig.Unmarshal(m, b) +} +func (m *DatadogConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DatadogConfig.Marshal(b, m, deterministic) +} +func (m *DatadogConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatadogConfig.Merge(m, src) +} +func (m *DatadogConfig) XXX_Size() int { + return xxx_messageInfo_DatadogConfig.Size(m) +} +func (m *DatadogConfig) XXX_DiscardUnknown() { + xxx_messageInfo_DatadogConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_DatadogConfig proto.InternalMessageInfo + +func (m *DatadogConfig) GetCollectorCluster() string { + if m != nil { + return m.CollectorCluster + } + return "" +} + +func (m *DatadogConfig) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +type OpenCensusConfig struct { + TraceConfig *v1.TraceConfig `protobuf:"bytes,1,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + StdoutExporterEnabled bool `protobuf:"varint,2,opt,name=stdout_exporter_enabled,json=stdoutExporterEnabled,proto3" json:"stdout_exporter_enabled,omitempty"` + StackdriverExporterEnabled bool `protobuf:"varint,3,opt,name=stackdriver_exporter_enabled,json=stackdriverExporterEnabled,proto3" json:"stackdriver_exporter_enabled,omitempty"` + StackdriverProjectId string `protobuf:"bytes,4,opt,name=stackdriver_project_id,json=stackdriverProjectId,proto3" json:"stackdriver_project_id,omitempty"` + StackdriverAddress string `protobuf:"bytes,10,opt,name=stackdriver_address,json=stackdriverAddress,proto3" json:"stackdriver_address,omitempty"` + StackdriverGrpcService *core.GrpcService `protobuf:"bytes,13,opt,name=stackdriver_grpc_service,json=stackdriverGrpcService,proto3" json:"stackdriver_grpc_service,omitempty"` + ZipkinExporterEnabled bool `protobuf:"varint,5,opt,name=zipkin_exporter_enabled,json=zipkinExporterEnabled,proto3" json:"zipkin_exporter_enabled,omitempty"` + ZipkinUrl string `protobuf:"bytes,6,opt,name=zipkin_url,json=zipkinUrl,proto3" json:"zipkin_url,omitempty"` + OcagentExporterEnabled bool `protobuf:"varint,11,opt,name=ocagent_exporter_enabled,json=ocagentExporterEnabled,proto3" json:"ocagent_exporter_enabled,omitempty"` + OcagentAddress string `protobuf:"bytes,12,opt,name=ocagent_address,json=ocagentAddress,proto3" json:"ocagent_address,omitempty"` + OcagentGrpcService *core.GrpcService `protobuf:"bytes,14,opt,name=ocagent_grpc_service,json=ocagentGrpcService,proto3" json:"ocagent_grpc_service,omitempty"` + IncomingTraceContext []OpenCensusConfig_TraceContext `protobuf:"varint,8,rep,packed,name=incoming_trace_context,json=incomingTraceContext,proto3,enum=envoy.config.trace.v2.OpenCensusConfig_TraceContext" json:"incoming_trace_context,omitempty"` + OutgoingTraceContext []OpenCensusConfig_TraceContext `protobuf:"varint,9,rep,packed,name=outgoing_trace_context,json=outgoingTraceContext,proto3,enum=envoy.config.trace.v2.OpenCensusConfig_TraceContext" json:"outgoing_trace_context,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OpenCensusConfig) Reset() { *m = OpenCensusConfig{} } +func (m *OpenCensusConfig) String() string { return proto.CompactTextString(m) } +func (*OpenCensusConfig) ProtoMessage() {} +func (*OpenCensusConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{5} +} + +func (m *OpenCensusConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OpenCensusConfig.Unmarshal(m, b) +} +func (m *OpenCensusConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OpenCensusConfig.Marshal(b, m, deterministic) +} +func (m *OpenCensusConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpenCensusConfig.Merge(m, src) +} +func (m *OpenCensusConfig) XXX_Size() int { + return xxx_messageInfo_OpenCensusConfig.Size(m) +} +func (m *OpenCensusConfig) XXX_DiscardUnknown() { + xxx_messageInfo_OpenCensusConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_OpenCensusConfig proto.InternalMessageInfo + +func (m *OpenCensusConfig) GetTraceConfig() *v1.TraceConfig { + if m != nil { + return m.TraceConfig + } + return nil +} + +func (m *OpenCensusConfig) GetStdoutExporterEnabled() bool { + if m != nil { + return m.StdoutExporterEnabled + } + return false +} + +func (m *OpenCensusConfig) GetStackdriverExporterEnabled() bool { + if m != nil { + return m.StackdriverExporterEnabled + } + return false +} + +func (m *OpenCensusConfig) GetStackdriverProjectId() string { + if m != nil { + return m.StackdriverProjectId + } + return "" +} + +func (m *OpenCensusConfig) GetStackdriverAddress() string { + if m != nil { + return m.StackdriverAddress + } + return "" +} + +func (m *OpenCensusConfig) GetStackdriverGrpcService() *core.GrpcService { + if m != nil { + return m.StackdriverGrpcService + } + return nil +} + +func (m *OpenCensusConfig) GetZipkinExporterEnabled() bool { + if m != nil { + return m.ZipkinExporterEnabled + } + return false +} + +func (m *OpenCensusConfig) GetZipkinUrl() string { + if m != nil { + return m.ZipkinUrl + } + return "" +} + +func (m *OpenCensusConfig) GetOcagentExporterEnabled() bool { + if m != nil { + return m.OcagentExporterEnabled + } + return false +} + +func (m *OpenCensusConfig) GetOcagentAddress() string { + if m != nil { + return m.OcagentAddress + } + return "" +} + +func (m *OpenCensusConfig) GetOcagentGrpcService() *core.GrpcService { + if m != nil { + return m.OcagentGrpcService + } + return nil +} + +func (m *OpenCensusConfig) GetIncomingTraceContext() []OpenCensusConfig_TraceContext { + if m != nil { + return m.IncomingTraceContext + } + return nil +} + +func (m *OpenCensusConfig) GetOutgoingTraceContext() []OpenCensusConfig_TraceContext { + if m != nil { + return m.OutgoingTraceContext + } + return nil +} + +type TraceServiceConfig struct { + GrpcService *core.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TraceServiceConfig) Reset() { *m = TraceServiceConfig{} } +func (m *TraceServiceConfig) String() string { return proto.CompactTextString(m) } +func (*TraceServiceConfig) ProtoMessage() {} +func (*TraceServiceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_0785d24fc8ab55c7, []int{6} +} + +func (m *TraceServiceConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TraceServiceConfig.Unmarshal(m, b) +} +func (m *TraceServiceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TraceServiceConfig.Marshal(b, m, deterministic) +} +func (m *TraceServiceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceServiceConfig.Merge(m, src) +} +func (m *TraceServiceConfig) XXX_Size() int { + return xxx_messageInfo_TraceServiceConfig.Size(m) +} +func (m *TraceServiceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TraceServiceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceServiceConfig proto.InternalMessageInfo + +func (m *TraceServiceConfig) GetGrpcService() *core.GrpcService { + if m != nil { + return m.GrpcService + } + return nil +} + +func init() { + proto.RegisterEnum("envoy.config.trace.v2.LightstepConfig_PropagationMode", LightstepConfig_PropagationMode_name, LightstepConfig_PropagationMode_value) + proto.RegisterEnum("envoy.config.trace.v2.ZipkinConfig_CollectorEndpointVersion", ZipkinConfig_CollectorEndpointVersion_name, ZipkinConfig_CollectorEndpointVersion_value) + proto.RegisterEnum("envoy.config.trace.v2.OpenCensusConfig_TraceContext", OpenCensusConfig_TraceContext_name, OpenCensusConfig_TraceContext_value) + proto.RegisterType((*Tracing)(nil), "envoy.config.trace.v2.Tracing") + proto.RegisterType((*Tracing_Http)(nil), "envoy.config.trace.v2.Tracing.Http") + proto.RegisterType((*LightstepConfig)(nil), "envoy.config.trace.v2.LightstepConfig") + proto.RegisterType((*ZipkinConfig)(nil), "envoy.config.trace.v2.ZipkinConfig") + proto.RegisterType((*DynamicOtConfig)(nil), "envoy.config.trace.v2.DynamicOtConfig") + proto.RegisterType((*DatadogConfig)(nil), "envoy.config.trace.v2.DatadogConfig") + proto.RegisterType((*OpenCensusConfig)(nil), "envoy.config.trace.v2.OpenCensusConfig") + proto.RegisterType((*TraceServiceConfig)(nil), "envoy.config.trace.v2.TraceServiceConfig") +} + +func init() { proto.RegisterFile("envoy/config/trace/v2/trace.proto", fileDescriptor_0785d24fc8ab55c7) } + +var fileDescriptor_0785d24fc8ab55c7 = []byte{ + // 1178 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0x8e, 0x1c, 0x27, 0x71, 0x9e, 0xed, 0x44, 0xd9, 0xa6, 0x8d, 0x30, 0x6d, 0x27, 0x75, 0x99, + 0xd2, 0x61, 0x18, 0x79, 0xe2, 0x96, 0x52, 0x06, 0x0e, 0x54, 0xae, 0xdb, 0xa4, 0x14, 0xdb, 0xa3, + 0xb8, 0x99, 0xc2, 0x45, 0x6c, 0xa4, 0xad, 0xaa, 0x56, 0xd1, 0x2e, 0xab, 0xb5, 0xa9, 0x7b, 0x62, + 0x38, 0xc2, 0x8d, 0xdf, 0xc0, 0x81, 0x1f, 0xc0, 0x81, 0xe1, 0x17, 0x70, 0xe1, 0xc0, 0x7f, 0xe0, + 0xc2, 0x2f, 0x60, 0xa6, 0x27, 0x46, 0xbb, 0xab, 0x44, 0x91, 0x9b, 0x99, 0xce, 0xf4, 0x26, 0xbd, + 0xef, 0xfb, 0xde, 0xbe, 0xfd, 0xf6, 0xed, 0x5b, 0xb8, 0x42, 0x92, 0x29, 0x9d, 0x75, 0x7c, 0x9a, + 0x3c, 0x89, 0xc2, 0x8e, 0xe0, 0xd8, 0x27, 0x9d, 0x69, 0x57, 0x7d, 0xd8, 0x8c, 0x53, 0x41, 0xd1, + 0x79, 0x49, 0xb1, 0x15, 0xc5, 0x56, 0xc8, 0xb4, 0xdb, 0x7a, 0x4f, 0x29, 0x31, 0x8b, 0x32, 0x81, + 0x4f, 0x39, 0xe9, 0x84, 0x9c, 0xf9, 0x5e, 0x4a, 0xf8, 0x34, 0xca, 0xc5, 0xad, 0x77, 0x42, 0x4a, + 0xc3, 0x98, 0x74, 0xe4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0x81, 0x59, 0x41, 0x5b, 0x70, 0xae, 0xf7, 0x70, 0xf8, 0xe8, + 0xae, 0x57, 0x7a, 0x82, 0xf4, 0xeb, 0x54, 0x7d, 0x50, 0xad, 0xad, 0x98, 0xb5, 0x36, 0x06, 0x24, + 0xd7, 0xd1, 0x7e, 0xea, 0xcb, 0xf9, 0x05, 0x34, 0x4e, 0x9d, 0x8f, 0xf1, 0x26, 0xe7, 0xe3, 0xd4, + 0x5e, 0x39, 0x4b, 0x3f, 0xca, 0x07, 0xb4, 0x1e, 0x16, 0xc2, 0x9f, 0xfe, 0xf1, 0xfd, 0x9f, 0x7f, + 0x2f, 0x57, 0x4c, 0x03, 0xae, 0x46, 0x54, 0xa5, 0x60, 0x9c, 0xbe, 0x98, 0xbd, 0xde, 0x2d, 0x07, + 0x64, 0x3d, 0xa3, 0x6c, 0x8c, 0x8c, 0x8c, 0xc3, 0x65, 0x39, 0x4f, 0x6e, 0xfc, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0xa8, 0xc0, 0x9e, 0xf5, 0xa4, 0x0a, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.validate.go new file mode 100644 index 0000000000..acc260cc1a --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/trace/v2/trace.pb.validate.go @@ -0,0 +1,751 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/trace/v2/trace.proto + +package envoy_config_trace_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _trace_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on Tracing with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Tracing) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TracingValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// 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 LightstepConfig with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *LightstepConfig) Validate() error { + if m == nil { + return nil + } + + if len(m.GetCollectorCluster()) < 1 { + return LightstepConfigValidationError{ + field: "CollectorCluster", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetAccessTokenFile()) < 1 { + return LightstepConfigValidationError{ + field: "AccessTokenFile", + reason: "value length must be at least 1 bytes", + } + } + + for idx, item := range m.GetPropagationModes() { + _, _ = idx, item + + if _, ok := LightstepConfig_PropagationMode_name[int32(item)]; !ok { + return LightstepConfigValidationError{ + field: fmt.Sprintf("PropagationModes[%v]", idx), + reason: "value must be one of the defined enum values", + } + } + + } + + return nil +} + +// LightstepConfigValidationError is the validation error returned by +// LightstepConfig.Validate if the designated constraints aren't met. +type LightstepConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LightstepConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LightstepConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LightstepConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LightstepConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LightstepConfigValidationError) ErrorName() string { return "LightstepConfigValidationError" } + +// Error satisfies the builtin error interface +func (e LightstepConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sLightstepConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LightstepConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LightstepConfigValidationError{} + +// Validate checks the field values on ZipkinConfig with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ZipkinConfig) Validate() error { + if m == nil { + return nil + } + + if len(m.GetCollectorCluster()) < 1 { + return ZipkinConfigValidationError{ + field: "CollectorCluster", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetCollectorEndpoint()) < 1 { + return ZipkinConfigValidationError{ + field: "CollectorEndpoint", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for TraceId_128Bit + + if v, ok := interface{}(m.GetSharedSpanContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZipkinConfigValidationError{ + field: "SharedSpanContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for CollectorEndpointVersion + + return nil +} + +// ZipkinConfigValidationError is the validation error returned by +// ZipkinConfig.Validate if the designated constraints aren't met. +type ZipkinConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ZipkinConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ZipkinConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ZipkinConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ZipkinConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ZipkinConfigValidationError) ErrorName() string { return "ZipkinConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ZipkinConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sZipkinConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ZipkinConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ZipkinConfigValidationError{} + +// Validate checks the field values on DynamicOtConfig with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *DynamicOtConfig) Validate() error { + if m == nil { + return nil + } + + if len(m.GetLibrary()) < 1 { + return DynamicOtConfigValidationError{ + field: "Library", + reason: "value length must be at least 1 bytes", + } + } + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DynamicOtConfigValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DynamicOtConfigValidationError is the validation error returned by +// DynamicOtConfig.Validate if the designated constraints aren't met. +type DynamicOtConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DynamicOtConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DynamicOtConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DynamicOtConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DynamicOtConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DynamicOtConfigValidationError) ErrorName() string { return "DynamicOtConfigValidationError" } + +// Error satisfies the builtin error interface +func (e DynamicOtConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDynamicOtConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DynamicOtConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DynamicOtConfigValidationError{} + +// Validate checks the field values on DatadogConfig with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *DatadogConfig) Validate() error { + if m == nil { + return nil + } + + if len(m.GetCollectorCluster()) < 1 { + return DatadogConfigValidationError{ + field: "CollectorCluster", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetServiceName()) < 1 { + return DatadogConfigValidationError{ + field: "ServiceName", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// DatadogConfigValidationError is the validation error returned by +// DatadogConfig.Validate if the designated constraints aren't met. +type DatadogConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DatadogConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DatadogConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DatadogConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DatadogConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DatadogConfigValidationError) ErrorName() string { return "DatadogConfigValidationError" } + +// Error satisfies the builtin error interface +func (e DatadogConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDatadogConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DatadogConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DatadogConfigValidationError{} + +// Validate checks the field values on OpenCensusConfig with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *OpenCensusConfig) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetTraceConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OpenCensusConfigValidationError{ + field: "TraceConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for StdoutExporterEnabled + + // no validation rules for StackdriverExporterEnabled + + // no validation rules for StackdriverProjectId + + // no validation rules for StackdriverAddress + + if v, ok := interface{}(m.GetStackdriverGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OpenCensusConfigValidationError{ + field: "StackdriverGrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ZipkinExporterEnabled + + // no validation rules for ZipkinUrl + + // no validation rules for OcagentExporterEnabled + + // no validation rules for OcagentAddress + + if v, ok := interface{}(m.GetOcagentGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OpenCensusConfigValidationError{ + field: "OcagentGrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// OpenCensusConfigValidationError is the validation error returned by +// OpenCensusConfig.Validate if the designated constraints aren't met. +type OpenCensusConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OpenCensusConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OpenCensusConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OpenCensusConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OpenCensusConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OpenCensusConfigValidationError) ErrorName() string { return "OpenCensusConfigValidationError" } + +// Error satisfies the builtin error interface +func (e OpenCensusConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOpenCensusConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OpenCensusConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OpenCensusConfigValidationError{} + +// Validate checks the field values on TraceServiceConfig with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *TraceServiceConfig) Validate() error { + if m == nil { + return nil + } + + if m.GetGrpcService() == nil { + return TraceServiceConfigValidationError{ + field: "GrpcService", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TraceServiceConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// TraceServiceConfigValidationError is the validation error returned by +// TraceServiceConfig.Validate if the designated constraints aren't met. +type TraceServiceConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TraceServiceConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TraceServiceConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TraceServiceConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TraceServiceConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TraceServiceConfigValidationError) ErrorName() string { + return "TraceServiceConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e TraceServiceConfigValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTraceServiceConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TraceServiceConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TraceServiceConfigValidationError{} + +// Validate checks the field values on Tracing_Http with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *Tracing_Http) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return Tracing_HttpValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + switch m.ConfigType.(type) { + + case *Tracing_Http_Config: + + if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Tracing_HttpValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Tracing_Http_TypedConfig: + + if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Tracing_HttpValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// Tracing_HttpValidationError is the validation error returned by +// Tracing_Http.Validate if the designated constraints aren't met. +type Tracing_HttpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Tracing_HttpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Tracing_HttpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Tracing_HttpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Tracing_HttpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Tracing_HttpValidationError) ErrorName() string { return "Tracing_HttpValidationError" } + +// Error satisfies the builtin error interface +func (e Tracing_HttpValidationError) Error() string { + 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_Http.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Tracing_HttpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Tracing_HttpValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.go index 68ac683a58..338664f0b1 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.go @@ -1,19 +1,15 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/auth/v2/attribute_context.proto -package v2 +package envoy_service_auth_v2 import ( fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - types "github.com/gogo/protobuf/types" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,33 +21,17 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// An attribute is a piece of metadata that describes an activity on a network. -// For example, the size of an HTTP request, or the status code of an HTTP response. -// -// Each attribute has a type and a name, which is logically defined as a proto message field -// of the `AttributeContext`. The `AttributeContext` is a collection of individual attributes -// supported by Envoy authorization system. type AttributeContext struct { - // The source of a network activity, such as starting a TCP connection. - // In a multi hop network activity, the source represents the sender of the - // last hop. - Source *AttributeContext_Peer `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - // The destination of a network activity, such as accepting a TCP connection. - // In a multi hop network activity, the destination represents the receiver of - // the last hop. - Destination *AttributeContext_Peer `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - // Represents a network request, such as an HTTP request. - Request *AttributeContext_Request `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` - // This is analogous to http_request.headers, however these contents will not be sent to the - // upstream server. Context_extensions provide an extension mechanism for sending additional - // information to the auth server without modifying the proto definition. It maps to the - // internal opaque context in the filter chain. - ContextExtensions map[string]string `protobuf:"bytes,10,rep,name=context_extensions,json=contextExtensions,proto3" json:"context_extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Source *AttributeContext_Peer `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Destination *AttributeContext_Peer `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + Request *AttributeContext_Request `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` + ContextExtensions map[string]string `protobuf:"bytes,10,rep,name=context_extensions,json=contextExtensions,proto3" json:"context_extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MetadataContext *core.Metadata `protobuf:"bytes,11,opt,name=metadata_context,json=metadataContext,proto3" json:"metadata_context,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AttributeContext) Reset() { *m = AttributeContext{} } @@ -60,22 +40,18 @@ func (*AttributeContext) ProtoMessage() {} func (*AttributeContext) Descriptor() ([]byte, []int) { return fileDescriptor_a6030c9468e3591b, []int{0} } + func (m *AttributeContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AttributeContext.Unmarshal(m, b) } func (m *AttributeContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_AttributeContext.Marshal(b, m, deterministic) } func (m *AttributeContext) XXX_Merge(src proto.Message) { xxx_messageInfo_AttributeContext.Merge(m, src) } func (m *AttributeContext) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AttributeContext.Size(m) } func (m *AttributeContext) XXX_DiscardUnknown() { xxx_messageInfo_AttributeContext.DiscardUnknown(m) @@ -111,37 +87,22 @@ func (m *AttributeContext) GetContextExtensions() map[string]string { return nil } -// This message defines attributes for a node that handles a network request. -// The node can be either a service or an application that sends, forwards, -// or receives the request. Service peers should fill in the `service`, -// `principal`, and `labels` as appropriate. +func (m *AttributeContext) GetMetadataContext() *core.Metadata { + if m != nil { + return m.MetadataContext + } + return nil +} + type AttributeContext_Peer struct { - // The address of the peer, this is typically the IP address. - // It can also be UDS path, or others. - Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The canonical service name of the peer. - // It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster - // ` - // If a more trusted source of the service name is available through mTLS/secure naming, it - // should be used. - Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - // The labels associated with the peer. - // These could be pod labels for Kubernetes or tags for VMs. - // The source of the labels could be an X.509 certificate or other configuration. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The authenticated identity of this peer. - // For example, the identity associated with the workload such as a service account. - // If an X.509 certificate is used to assert the identity this field should be sourced from - // `Subject` or `Subject Alternative Names`. The primary identity should be the principal. - // The principal format is issuer specific. - // - // Example: - // * SPIFFE format is `spiffe://trust-domain/path` - // * Google account format is `https://accounts.google.com/{userid}` - Principal string `protobuf:"bytes,4,opt,name=principal,proto3" json:"principal,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Principal string `protobuf:"bytes,4,opt,name=principal,proto3" json:"principal,omitempty"` + Certificate string `protobuf:"bytes,5,opt,name=certificate,proto3" json:"certificate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AttributeContext_Peer) Reset() { *m = AttributeContext_Peer{} } @@ -150,22 +111,18 @@ func (*AttributeContext_Peer) ProtoMessage() {} func (*AttributeContext_Peer) Descriptor() ([]byte, []int) { return fileDescriptor_a6030c9468e3591b, []int{0, 0} } + func (m *AttributeContext_Peer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AttributeContext_Peer.Unmarshal(m, b) } func (m *AttributeContext_Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_AttributeContext_Peer.Marshal(b, m, deterministic) } func (m *AttributeContext_Peer) XXX_Merge(src proto.Message) { xxx_messageInfo_AttributeContext_Peer.Merge(m, src) } func (m *AttributeContext_Peer) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AttributeContext_Peer.Size(m) } func (m *AttributeContext_Peer) XXX_DiscardUnknown() { xxx_messageInfo_AttributeContext_Peer.DiscardUnknown(m) @@ -201,11 +158,15 @@ func (m *AttributeContext_Peer) GetPrincipal() string { return "" } -// Represents a network request, such as an HTTP request. +func (m *AttributeContext_Peer) GetCertificate() string { + if m != nil { + return m.Certificate + } + return "" +} + type AttributeContext_Request struct { - // The timestamp when the proxy receives the first byte of the request. - Time *types.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` - // Represents an HTTP request or an HTTP-like request. + Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` Http *AttributeContext_HttpRequest `protobuf:"bytes,2,opt,name=http,proto3" json:"http,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -218,22 +179,18 @@ func (*AttributeContext_Request) ProtoMessage() {} func (*AttributeContext_Request) Descriptor() ([]byte, []int) { return fileDescriptor_a6030c9468e3591b, []int{0, 1} } + func (m *AttributeContext_Request) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AttributeContext_Request.Unmarshal(m, b) } func (m *AttributeContext_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_AttributeContext_Request.Marshal(b, m, deterministic) } func (m *AttributeContext_Request) XXX_Merge(src proto.Message) { xxx_messageInfo_AttributeContext_Request.Merge(m, src) } func (m *AttributeContext_Request) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AttributeContext_Request.Size(m) } func (m *AttributeContext_Request) XXX_DiscardUnknown() { xxx_messageInfo_AttributeContext_Request.DiscardUnknown(m) @@ -241,7 +198,7 @@ func (m *AttributeContext_Request) XXX_DiscardUnknown() { var xxx_messageInfo_AttributeContext_Request proto.InternalMessageInfo -func (m *AttributeContext_Request) GetTime() *types.Timestamp { +func (m *AttributeContext_Request) GetTime() *timestamp.Timestamp { if m != nil { return m.Time } @@ -255,45 +212,21 @@ func (m *AttributeContext_Request) GetHttp() *AttributeContext_HttpRequest { return nil } -// This message defines attributes for an HTTP request. -// HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. type AttributeContext_HttpRequest struct { - // The unique ID for a request, which can be propagated to downstream - // systems. The ID should have low probability of collision - // within a single day for a specific service. - // For HTTP requests, it should be X-Request-ID or equivalent. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The HTTP request method, such as `GET`, `POST`. - Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` - // The HTTP request headers. If multiple headers share the same key, they - // must be merged according to the HTTP spec. All header keys must be - // lowercased, because HTTP header keys are case-insensitive. - Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The request target, as it appears in the first line of the HTTP request. This includes - // the URL path and query-string. No decoding is performed. - Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` - // The HTTP request `Host` or 'Authority` header value. - Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"` - // The HTTP URL scheme, such as `http` and `https`. - Scheme string `protobuf:"bytes,6,opt,name=scheme,proto3" json:"scheme,omitempty"` - // This field is always empty, and exists for compatibility reasons. The HTTP URL query is - // included in `path` field. - Query string `protobuf:"bytes,7,opt,name=query,proto3" json:"query,omitempty"` - // This field is always empty, and exists for compatibility reasons. The URL fragment is - // not submitted as part of HTTP requests; it is unknowable. - Fragment string `protobuf:"bytes,8,opt,name=fragment,proto3" json:"fragment,omitempty"` - // The HTTP request size in bytes. If unknown, it must be -1. - Size_ int64 `protobuf:"varint,9,opt,name=size,proto3" json:"size,omitempty"` - // The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2". - // - // See :repo:`headers.h:ProtocolStrings ` for a list of all - // possible values. - Protocol string `protobuf:"bytes,10,opt,name=protocol,proto3" json:"protocol,omitempty"` - // The HTTP request body. - Body string `protobuf:"bytes,11,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` + Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"` + Scheme string `protobuf:"bytes,6,opt,name=scheme,proto3" json:"scheme,omitempty"` + Query string `protobuf:"bytes,7,opt,name=query,proto3" json:"query,omitempty"` + Fragment string `protobuf:"bytes,8,opt,name=fragment,proto3" json:"fragment,omitempty"` + Size int64 `protobuf:"varint,9,opt,name=size,proto3" json:"size,omitempty"` + Protocol string `protobuf:"bytes,10,opt,name=protocol,proto3" json:"protocol,omitempty"` + Body string `protobuf:"bytes,11,opt,name=body,proto3" json:"body,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AttributeContext_HttpRequest) Reset() { *m = AttributeContext_HttpRequest{} } @@ -302,22 +235,18 @@ func (*AttributeContext_HttpRequest) ProtoMessage() {} func (*AttributeContext_HttpRequest) Descriptor() ([]byte, []int) { return fileDescriptor_a6030c9468e3591b, []int{0, 2} } + func (m *AttributeContext_HttpRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AttributeContext_HttpRequest.Unmarshal(m, b) } func (m *AttributeContext_HttpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return xxx_messageInfo_AttributeContext_HttpRequest.Marshal(b, m, deterministic) } func (m *AttributeContext_HttpRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AttributeContext_HttpRequest.Merge(m, src) } func (m *AttributeContext_HttpRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AttributeContext_HttpRequest.Size(m) } func (m *AttributeContext_HttpRequest) XXX_DiscardUnknown() { xxx_messageInfo_AttributeContext_HttpRequest.DiscardUnknown(m) @@ -381,9 +310,9 @@ func (m *AttributeContext_HttpRequest) GetFragment() string { return "" } -func (m *AttributeContext_HttpRequest) GetSize_() int64 { +func (m *AttributeContext_HttpRequest) GetSize() int64 { if m != nil { - return m.Size_ + return m.Size } return 0 } @@ -417,1786 +346,47 @@ func init() { } var fileDescriptor_a6030c9468e3591b = []byte{ - // 630 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0x95, 0x93, 0x34, 0x69, 0x26, 0x3f, 0xfd, 0x54, 0x56, 0x6d, 0x65, 0x59, 0x55, 0xa8, 0xe0, - 0xd2, 0x03, 0xac, 0xa5, 0x94, 0x43, 0xe9, 0x01, 0xd1, 0xd2, 0x8a, 0x22, 0xa1, 0x2a, 0xb2, 0x38, - 0x71, 0xa9, 0x36, 0xf6, 0x34, 0x5e, 0x91, 0x78, 0xdd, 0xdd, 0x75, 0xd4, 0x70, 0x03, 0x3e, 0x14, - 0x5f, 0x81, 0x23, 0x47, 0x8e, 0x28, 0x9f, 0x04, 0xed, 0x1f, 0x97, 0xa8, 0xf4, 0xd0, 0xf4, 0x94, - 0x99, 0xf1, 0x9b, 0xb7, 0x6f, 0xde, 0x4c, 0xe0, 0x39, 0x16, 0x33, 0x31, 0x8f, 0x15, 0xca, 0x19, - 0x4f, 0x31, 0x66, 0x95, 0xce, 0xe3, 0xd9, 0x20, 0x66, 0x5a, 0x4b, 0x3e, 0xaa, 0x34, 0x5e, 0xa4, - 0xa2, 0xd0, 0x78, 0xad, 0x69, 0x29, 0x85, 0x16, 0x64, 0xcb, 0xc2, 0xa9, 0x87, 0x53, 0x03, 0xa7, - 0xb3, 0x41, 0xb4, 0xe3, 0x58, 0x58, 0xc9, 0x4d, 0x73, 0x2a, 0x24, 0xc6, 0x23, 0xa6, 0xd0, 0x35,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e7, 0x61, 0xc7, 0x59, 0x6e, - 0x13, 0x12, 0xc1, 0xfa, 0xa5, 0x64, 0xe3, 0x29, 0x16, 0x3a, 0x5c, 0xb7, 0x1f, 0x6e, 0x72, 0xc3, - 0xae, 0xf8, 0x67, 0x0c, 0xbb, 0xbb, 0xc1, 0x5e, 0x33, 0xb1, 0xb1, 0xc1, 0x5b, 0xfb, 0x53, 0x31, - 0x09, 0xc1, 0xe1, 0xeb, 0xdc, 0xe0, 0x47, 0x22, 0x9b, 0x87, 0x3d, 0xa7, 0xc6, 0xc4, 0xd1, 0x21, - 0xfc, 0xb7, 0x3c, 0xce, 0x4a, 0xa7, 0x70, 0x02, 0xdb, 0x77, 0xff, 0x77, 0x56, 0x61, 0x39, 0x3e, - 0xff, 0xb1, 0xe8, 0x07, 0x3f, 0x17, 0xfd, 0xe0, 0xd7, 0xa2, 0x1f, 0xfc, 0x5e, 0xf4, 0x03, 0x78, - 0xca, 0x85, 0x5b, 0x4b, 0x29, 0xc5, 0xf5, 0xfc, 0xee, 0x0d, 0x1d, 0x6f, 0xdd, 0x5e, 0xd1, 0xd0, - 0x8c, 0x39, 0x0c, 0x46, 0x6d, 0x3b, 0xef, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x3a, - 0x48, 0x43, 0xce, 0x05, 0x00, 0x00, + // 668 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x56, 0x7e, 0x9a, 0x34, 0x13, 0x04, 0x61, 0x45, 0x2b, 0xcb, 0x14, 0x35, 0x82, 0x4b, 0x0f, + 0x60, 0x4b, 0x29, 0x87, 0xd2, 0x03, 0xa2, 0xa5, 0x2d, 0x45, 0x02, 0x14, 0x59, 0x9c, 0xb8, 0x54, + 0x1b, 0x7b, 0xda, 0xac, 0x48, 0xbc, 0xee, 0xee, 0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 0x62, 0xed, 0x70, 0x17, 0xee, 0x2c, + 0xb6, 0x73, 0xa3, 0x55, 0x38, 0x80, 0xf5, 0xe5, 0x57, 0x7a, 0x13, 0x96, 0xfd, 0xa3, 0x5f, 0x5f, + 0x7f, 0xff, 0x69, 0xd5, 0x7b, 0x35, 0x78, 0x22, 0xa4, 0x93, 0xa3, 0x50, 0xf2, 0x62, 0xbe, 0x5c, + 0x99, 0xfd, 0xb5, 0xab, 0xd2, 0x0c, 0x4d, 0x7b, 0xc3, 0xda, 0xa8, 0x65, 0xfb, 0xdc, 0xfe, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xd1, 0xda, 0x79, 0x9c, 0x39, 0x06, 0x00, 0x00, } - -func (m *AttributeContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Source != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Source.Size())) - n1, err := m.Source.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Destination != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Destination.Size())) - n2, err := m.Destination.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Request != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Request.Size())) - n3, err := m.Request.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if len(m.ContextExtensions) > 0 { - keysForContextExtensions := make([]string, 0, len(m.ContextExtensions)) - for k, _ := range m.ContextExtensions { - keysForContextExtensions = append(keysForContextExtensions, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForContextExtensions) - for _, k := range keysForContextExtensions { - dAtA[i] = 0x52 - i++ - v := m.ContextExtensions[string(k)] - mapSize := 1 + len(k) + sovAttributeContext(uint64(len(k))) + 1 + len(v) + sovAttributeContext(uint64(len(v))) - i = encodeVarintAttributeContext(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttributeContext_Peer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeContext_Peer) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Address != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Address.Size())) - n4, err := m.Address.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if len(m.Service) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Service))) - i += copy(dAtA[i:], m.Service) - } - if len(m.Labels) > 0 { - keysForLabels := make([]string, 0, len(m.Labels)) - for k, _ := range m.Labels { - keysForLabels = append(keysForLabels, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - for _, k := range keysForLabels { - dAtA[i] = 0x1a - i++ - v := m.Labels[string(k)] - mapSize := 1 + len(k) + sovAttributeContext(uint64(len(k))) + 1 + len(v) + sovAttributeContext(uint64(len(v))) - i = encodeVarintAttributeContext(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if len(m.Principal) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Principal))) - i += copy(dAtA[i:], m.Principal) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttributeContext_Request) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeContext_Request) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Time != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Time.Size())) - n5, err := m.Time.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.Http != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Http.Size())) - n6, err := m.Http.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AttributeContext_HttpRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeContext_HttpRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Method) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Method))) - i += copy(dAtA[i:], m.Method) - } - if len(m.Headers) > 0 { - keysForHeaders := make([]string, 0, len(m.Headers)) - for k, _ := range m.Headers { - keysForHeaders = append(keysForHeaders, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForHeaders) - for _, k := range keysForHeaders { - dAtA[i] = 0x1a - i++ - v := m.Headers[string(k)] - mapSize := 1 + len(k) + sovAttributeContext(uint64(len(k))) + 1 + len(v) + sovAttributeContext(uint64(len(v))) - i = encodeVarintAttributeContext(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if len(m.Path) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - } - if len(m.Host) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Host))) - i += copy(dAtA[i:], m.Host) - } - if len(m.Scheme) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Scheme))) - i += copy(dAtA[i:], m.Scheme) - } - if len(m.Query) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) - } - if len(m.Fragment) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Fragment))) - i += copy(dAtA[i:], m.Fragment) - } - if m.Size_ != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(m.Size_)) - } - if len(m.Protocol) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Protocol))) - i += copy(dAtA[i:], m.Protocol) - } - if len(m.Body) > 0 { - dAtA[i] = 0x5a - i++ - i = encodeVarintAttributeContext(dAtA, i, uint64(len(m.Body))) - i += copy(dAtA[i:], m.Body) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintAttributeContext(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *AttributeContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.Destination != nil { - l = m.Destination.Size() - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovAttributeContext(uint64(l)) - } - if len(m.ContextExtensions) > 0 { - for k, v := range m.ContextExtensions { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovAttributeContext(uint64(len(k))) + 1 + len(v) + sovAttributeContext(uint64(len(v))) - n += mapEntrySize + 1 + sovAttributeContext(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttributeContext_Peer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Service) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovAttributeContext(uint64(len(k))) + 1 + len(v) + sovAttributeContext(uint64(len(v))) - n += mapEntrySize + 1 + sovAttributeContext(uint64(mapEntrySize)) - } - } - l = len(m.Principal) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttributeContext_Request) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Time != nil { - l = m.Time.Size() - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.Http != nil { - l = m.Http.Size() - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AttributeContext_HttpRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Method) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - if len(m.Headers) > 0 { - for k, v := range m.Headers { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovAttributeContext(uint64(len(k))) + 1 + len(v) + sovAttributeContext(uint64(len(v))) - n += mapEntrySize + 1 + sovAttributeContext(uint64(mapEntrySize)) - } - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Host) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Scheme) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Fragment) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.Size_ != 0 { - n += 1 + sovAttributeContext(uint64(m.Size_)) - } - l = len(m.Protocol) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - l = len(m.Body) - if l > 0 { - n += 1 + l + sovAttributeContext(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAttributeContext(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAttributeContext(x uint64) (n int) { - return sovAttributeContext(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AttributeContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &AttributeContext_Peer{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Destination == nil { - m.Destination = &AttributeContext_Peer{} - } - if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &AttributeContext_Request{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextExtensions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ContextExtensions == nil { - m.ContextExtensions = 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 ErrIntOverflowAttributeContext - } - 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 ErrIntOverflowAttributeContext - } - 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 ErrInvalidLengthAttributeContext - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthAttributeContext - } - 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 ErrIntOverflowAttributeContext - } - 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 ErrInvalidLengthAttributeContext - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthAttributeContext - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ContextExtensions[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttributeContext - } - 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 *AttributeContext_Peer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Peer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Peer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &core.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = 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 ErrIntOverflowAttributeContext - } - 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 ErrIntOverflowAttributeContext - } - 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 ErrInvalidLengthAttributeContext - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthAttributeContext - } - 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 ErrIntOverflowAttributeContext - } - 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 ErrInvalidLengthAttributeContext - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthAttributeContext - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Principal = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttributeContext - } - 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 *AttributeContext_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 ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Time == nil { - m.Time = &types.Timestamp{} - } - if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Http == nil { - m.Http = &AttributeContext_HttpRequest{} - } - if err := m.Http.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttributeContext - } - 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 *AttributeContext_HttpRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - 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 Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = 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 ErrIntOverflowAttributeContext - } - 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 ErrIntOverflowAttributeContext - } - 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 ErrInvalidLengthAttributeContext - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthAttributeContext - } - 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 ErrIntOverflowAttributeContext - } - 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 ErrInvalidLengthAttributeContext - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthAttributeContext - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Headers[mapkey] = mapvalue - iNdEx = postIndex - case 4: - 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 ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scheme = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fragment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fragment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - m.Size_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size_ |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - 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 ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAttributeContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAttributeContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Body = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAttributeContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAttributeContext - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAttributeContext - } - 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 skipAttributeContext(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttributeContext - } - 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, ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttributeContext - } - 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, ErrInvalidLengthAttributeContext - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthAttributeContext - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAttributeContext - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAttributeContext(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthAttributeContext - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAttributeContext = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAttributeContext = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.validate.go index dde2a101c3..5b85f87327 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/attribute_context.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/auth/v2/attribute_context.proto -package v2 +package envoy_service_auth_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _attribute_context_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on AttributeContext with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. @@ -41,53 +44,48 @@ func (m *AttributeContext) Validate() error { return nil } - { - tmp := m.GetSource() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AttributeContextValidationError{ - field: "Source", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetDestination() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AttributeContextValidationError{ - field: "Destination", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetRequest() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AttributeContextValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, } } } // no validation rules for ContextExtensions + if v, ok := interface{}(m.GetMetadataContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + return nil } @@ -153,17 +151,12 @@ func (m *AttributeContext_Peer) Validate() error { return nil } - { - tmp := m.GetAddress() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AttributeContext_PeerValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, } } } @@ -174,6 +167,8 @@ func (m *AttributeContext_Peer) Validate() error { // no validation rules for Principal + // no validation rules for Certificate + return nil } @@ -241,32 +236,22 @@ func (m *AttributeContext_Request) Validate() error { return nil } - { - tmp := m.GetTime() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AttributeContext_RequestValidationError{ - field: "Time", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetHttp() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return AttributeContext_RequestValidationError{ - field: "Http", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.go index cf9aa599e2..3a02669474 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.go @@ -1,21 +1,21 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/auth/v2/external_auth.proto -package v2 +package envoy_service_auth_v2 import ( context "context" fmt "fmt" - io "io" - math "math" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - rpc "github.com/gogo/googleapis/google/rpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + status "google.golang.org/genproto/googleapis/rpc/status" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status1 "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,10 +27,9 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type CheckRequest struct { - // The request attributes. Attributes *AttributeContext `protobuf:"bytes,1,opt,name=attributes,proto3" json:"attributes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -43,26 +42,18 @@ func (*CheckRequest) ProtoMessage() {} func (*CheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor_5257cfee93a30acb, []int{0} } + func (m *CheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CheckRequest.Unmarshal(m, b) } func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CheckRequest.Marshal(b, m, deterministic) } func (m *CheckRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_CheckRequest.Merge(m, src) } func (m *CheckRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CheckRequest.Size(m) } func (m *CheckRequest) XXX_DiscardUnknown() { xxx_messageInfo_CheckRequest.DiscardUnknown(m) @@ -77,20 +68,13 @@ func (m *CheckRequest) GetAttributes() *AttributeContext { return nil } -// HTTP attributes for a denied response. type DeniedHttpResponse struct { - // This field allows the authorization service to send a HTTP response status - // code to the downstream client other than 403 (Forbidden). - Status *_type.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - // This field allows the authorization service to send HTTP response headers - // to the downstream client. - Headers []*core.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` - // This field allows the authorization service to send a response body data - // to the downstream client. - Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Status *_type.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Headers []*core.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` + Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DeniedHttpResponse) Reset() { *m = DeniedHttpResponse{} } @@ -99,26 +83,18 @@ func (*DeniedHttpResponse) ProtoMessage() {} func (*DeniedHttpResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5257cfee93a30acb, []int{1} } + func (m *DeniedHttpResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DeniedHttpResponse.Unmarshal(m, b) } func (m *DeniedHttpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeniedHttpResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_DeniedHttpResponse.Marshal(b, m, deterministic) } func (m *DeniedHttpResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_DeniedHttpResponse.Merge(m, src) } func (m *DeniedHttpResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DeniedHttpResponse.Size(m) } func (m *DeniedHttpResponse) XXX_DiscardUnknown() { xxx_messageInfo_DeniedHttpResponse.DiscardUnknown(m) @@ -147,14 +123,7 @@ func (m *DeniedHttpResponse) GetBody() string { return "" } -// HTTP attributes for an ok response. type OkHttpResponse struct { - // HTTP entity headers in addition to the original request headers. This allows the authorization - // service to append, to add or to override headers from the original request before - // dispatching it to the upstream. By setting `append` field to `true` in the `HeaderValueOption`, - // the filter will append the correspondent header value to the matched request header. Note that - // by Leaving `append` as false, the filter will either add a new header, or override an existing - // one if there is a match. Headers []*core.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -167,26 +136,18 @@ func (*OkHttpResponse) ProtoMessage() {} func (*OkHttpResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5257cfee93a30acb, []int{2} } + func (m *OkHttpResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_OkHttpResponse.Unmarshal(m, b) } func (m *OkHttpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OkHttpResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_OkHttpResponse.Marshal(b, m, deterministic) } func (m *OkHttpResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_OkHttpResponse.Merge(m, src) } func (m *OkHttpResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_OkHttpResponse.Size(m) } func (m *OkHttpResponse) XXX_DiscardUnknown() { xxx_messageInfo_OkHttpResponse.DiscardUnknown(m) @@ -201,15 +162,8 @@ func (m *OkHttpResponse) GetHeaders() []*core.HeaderValueOption { return nil } -// Intended for gRPC and Network Authorization servers `only`. type CheckResponse struct { - // Status `OK` allows the request. Status `UNKNOWN` causes Envoy to abort. Any other status - // indicates the request should be denied. - Status *rpc.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - // An message that contains HTTP response attributes. This message is - // used when the authorization service needs to send custom responses to the - // downstream client or, to modify/add request headers being dispatched to the upstream. - // + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // Types that are valid to be assigned to HttpResponse: // *CheckResponse_DeniedResponse // *CheckResponse_OkResponse @@ -225,26 +179,18 @@ func (*CheckResponse) ProtoMessage() {} func (*CheckResponse) Descriptor() ([]byte, []int) { return fileDescriptor_5257cfee93a30acb, []int{3} } + func (m *CheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CheckResponse.Unmarshal(m, b) } func (m *CheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CheckResponse.Marshal(b, m, deterministic) } func (m *CheckResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CheckResponse.Merge(m, src) } func (m *CheckResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CheckResponse.Size(m) } func (m *CheckResponse) XXX_DiscardUnknown() { xxx_messageInfo_CheckResponse.DiscardUnknown(m) @@ -252,21 +198,28 @@ func (m *CheckResponse) XXX_DiscardUnknown() { var xxx_messageInfo_CheckResponse proto.InternalMessageInfo +func (m *CheckResponse) GetStatus() *status.Status { + if m != nil { + return m.Status + } + return nil +} + type isCheckResponse_HttpResponse interface { isCheckResponse_HttpResponse() - MarshalTo([]byte) (int, error) - Size() int } type CheckResponse_DeniedResponse struct { DeniedResponse *DeniedHttpResponse `protobuf:"bytes,2,opt,name=denied_response,json=deniedResponse,proto3,oneof"` } + type CheckResponse_OkResponse struct { OkResponse *OkHttpResponse `protobuf:"bytes,3,opt,name=ok_response,json=okResponse,proto3,oneof"` } func (*CheckResponse_DeniedResponse) isCheckResponse_HttpResponse() {} -func (*CheckResponse_OkResponse) isCheckResponse_HttpResponse() {} + +func (*CheckResponse_OkResponse) isCheckResponse_HttpResponse() {} func (m *CheckResponse) GetHttpResponse() isCheckResponse_HttpResponse { if m != nil { @@ -275,13 +228,6 @@ func (m *CheckResponse) GetHttpResponse() isCheckResponse_HttpResponse { return nil } -func (m *CheckResponse) GetStatus() *rpc.Status { - if m != nil { - return m.Status - } - return nil -} - func (m *CheckResponse) GetDeniedResponse() *DeniedHttpResponse { if x, ok := m.GetHttpResponse().(*CheckResponse_DeniedResponse); ok { return x.DeniedResponse @@ -296,80 +242,14 @@ func (m *CheckResponse) GetOkResponse() *OkHttpResponse { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*CheckResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _CheckResponse_OneofMarshaler, _CheckResponse_OneofUnmarshaler, _CheckResponse_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CheckResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*CheckResponse_DeniedResponse)(nil), (*CheckResponse_OkResponse)(nil), } } -func _CheckResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*CheckResponse) - // http_response - switch x := m.HttpResponse.(type) { - case *CheckResponse_DeniedResponse: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.DeniedResponse); err != nil { - return err - } - case *CheckResponse_OkResponse: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.OkResponse); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("CheckResponse.HttpResponse has unexpected type %T", x) - } - return nil -} - -func _CheckResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*CheckResponse) - switch tag { - case 2: // http_response.denied_response - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DeniedHttpResponse) - err := b.DecodeMessage(msg) - m.HttpResponse = &CheckResponse_DeniedResponse{msg} - return true, err - case 3: // http_response.ok_response - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(OkHttpResponse) - err := b.DecodeMessage(msg) - m.HttpResponse = &CheckResponse_OkResponse{msg} - return true, err - default: - return false, nil - } -} - -func _CheckResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CheckResponse) - // http_response - switch x := m.HttpResponse.(type) { - case *CheckResponse_DeniedResponse: - s := proto.Size(x.DeniedResponse) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *CheckResponse_OkResponse: - s := proto.Size(x.OkResponse) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - func init() { proto.RegisterType((*CheckRequest)(nil), "envoy.service.auth.v2.CheckRequest") proto.RegisterType((*DeniedHttpResponse)(nil), "envoy.service.auth.v2.DeniedHttpResponse") @@ -382,39 +262,39 @@ func init() { } var fileDescriptor_5257cfee93a30acb = []byte{ - // 497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xd1, 0x8a, 0xd3, 0x4e, - 0x14, 0xc6, 0x77, 0xda, 0xff, 0xee, 0x1f, 0xa7, 0x76, 0x57, 0x07, 0x74, 0xcb, 0x22, 0xa5, 0x74, - 0x57, 0xec, 0x0a, 0x4e, 0x20, 0xde, 0x79, 0x21, 0x6c, 0x57, 0x31, 0x37, 0xb2, 0x25, 0x8a, 0x82, - 0x37, 0x65, 0x9a, 0x1c, 0x36, 0xa1, 0x25, 0x33, 0x4e, 0x4e, 0x42, 0xeb, 0x13, 0x88, 0xcf, 0xe1, - 0x53, 0x78, 0xe5, 0xa5, 0x97, 0x3e, 0x82, 0xf4, 0x4e, 0xf0, 0x21, 0x24, 0x33, 0x93, 0xba, 0xd5, - 0xd6, 0x1b, 0xef, 0x86, 0x9c, 0xef, 0xfb, 0xcd, 0xf9, 0xce, 0x9c, 0xd0, 0x53, 0xc8, 0x4a, 0xb9, - 0xf0, 0x72, 0xd0, 0x65, 0x1a, 0x81, 0x27, 0x0a, 0x4c, 0xbc, 0xd2, 0xf7, 0x60, 0x8e, 0xa0, 0x33, - 0x31, 0x1b, 0x57, 0x1f, 0xb8, 0xd2, 0x12, 0x25, 0xbb, 0x65, 0xa4, 0xdc, 0x49, 0xb9, 0xa9, 0x94, - 0xfe, 0xd1, 0x1d, 0x4b, 0x10, 0x2a, 0xad, 0x8c, 0x91, 0xd4, 0xe0, 0x4d, 0x44, 0x0e, 0xd6, 0x54, - 0x57, 0x71, 0xa1, 0xc0, 0x4b, 0x10, 0xd5, 0x38, 0x47, 0x81, 0x45, 0xee, 0xaa, 0x0f, 0x36, 0xdf, - 0x2e, 0x10, 0x75, 0x3a, 0x29, 0x10, 0xc6, 0x91, 0xcc, 0x10, 0xe6, 0xe8, 0xe4, 0x87, 0x97, 0x52, - 0x5e, 0xce, 0xc0, 0xd3, 0x2a, 0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xc6, 0xda, 0xd9, 0x3b, 0x0d, - 0x63, 0x3a, 0xdd, 0xf2, 0x08, 0x7f, 0xce, 0x38, 0xd8, 0x09, 0xf7, 0x2d, 0x63, 0xd5, 0x41, 0x40, - 0x5b, 0x72, 0xfa, 0x8b, 0xd8, 0x34, 0xc4, 0xbb, 0x5b, 0x88, 0xeb, 0xf3, 0x08, 0x76, 0x42, 0x2a, - 0x57, 0x59, 0x86, 0x07, 0xb4, 0x6d, 0xb6, 0xb4, 0x66, 0xf9, 0x11, 0x6d, 0x9f, 0x15, 0x98, 0x48, - 0x9d, 0xbe, 0x13, 0xd5, 0x20, 0x58, 0x48, 0x77, 0x4d, 0x7c, 0x76, 0xbc, 0x85, 0x7f, 0x75, 0xdf, - 0x8e, 0x4e, 0xfe, 0x2e, 0x72, 0xb7, 0x3e, 0xff, 0xb2, 0xec, 0x92, 0xaf, 0xcb, 0x2e, 0xf9, 0xb6, - 0xec, 0x12, 0x7a, 0x9c, 0x4a, 0xeb, 0x52, 0x5a, 0xce, 0x17, 0x9b, 0x01, 0xc3, 0x9b, 0x4f, 0xdd, - 0x1f, 0x5a, 0x75, 0x37, 0xaa, 0x76, 0x7d, 0x44, 0xde, 0x34, 0x4a, 0xff, 0x3d, 0x21, 0x93, 0x3d, - 0xb3, 0xfb, 0x0f, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x84, 0x03, 0xe3, 0xae, 0xdc, 0x03, 0x00, - 0x00, + // 500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xc1, 0x6e, 0x13, 0x3f, + 0x10, 0xc6, 0xe3, 0xe4, 0xdf, 0xfc, 0xc1, 0x21, 0x6d, 0xb1, 0x04, 0x8d, 0x22, 0x90, 0xa2, 0xb4, + 0x88, 0x14, 0x09, 0x5b, 0x0a, 0x17, 0x4e, 0x48, 0x4d, 0xa9, 0xc8, 0xad, 0xd1, 0x52, 0xc1, 0x31, + 0x72, 0x76, 0x47, 0xcd, 0x2a, 0xd1, 0xda, 0xd8, 0xb3, 0xab, 0x84, 0x13, 0x47, 0xc4, 0x63, 0xf0, + 0x18, 0x3c, 0x01, 0x57, 0xde, 0x83, 0x27, 0xe0, 0x84, 0xd6, 0x76, 0x42, 0x03, 0x09, 0x17, 0x6e, + 0xd6, 0xce, 0xf7, 0xfd, 0x3c, 0xdf, 0x78, 0x96, 0x9e, 0x42, 0x56, 0xa8, 0xa5, 0xb0, 0x60, 0x8a, + 0x34, 0x06, 0x21, 0x73, 0x9c, 0x8a, 0xa2, 0x2f, 0x60, 0x81, 0x60, 0x32, 0x39, 0x1f, 0x97, 0x1f, + 0xb8, 0x36, 0x0a, 0x15, 0xbb, 0xe7, 0xa4, 0x3c, 0x48, 0xb9, 0xab, 0x14, 0xfd, 0xf6, 0x03, 0x4f, + 0x90, 0x3a, 0x2d, 0x8d, 0xb1, 0x32, 0x20, 0x26, 0xd2, 0x82, 0x37, 0xb5, 0x9f, 0x6e, 0xe7, 0x4b, + 0x44, 0x93, 0x4e, 0x72, 0x84, 0x71, 0xac, 0x32, 0x84, 0x05, 0x06, 0x79, 0x80, 0xe1, 0x52, 0x83, + 0x98, 0x22, 0xea, 0xb1, 0x45, 0x89, 0xb9, 0x0d, 0xd5, 0xa3, 0x6b, 0xa5, 0xae, 0xe7, 0x20, 0x8c, + 0x8e, 0xc5, 0x46, 0xe1, 0x61, 0x9e, 0x68, 0x29, 0x64, 0x96, 0x29, 0x94, 0x98, 0xaa, 0xcc, 0x6e, + 0x96, 0x8f, 0x0a, 0x39, 0x4f, 0x13, 0x89, 0x20, 0x56, 0x07, 0x5f, 0xe8, 0xbe, 0xa5, 0x77, 0xce, + 0xa7, 0x10, 0xcf, 0x22, 0x78, 0x97, 0x83, 0x45, 0xf6, 0x8a, 0xd2, 0x75, 0x67, 0xb6, 0x45, 0x3a, + 0xa4, 0xd7, 0xe8, 0x3f, 0xe6, 0x5b, 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, 0xdb, 0xc9, 0x15, + 0xab, 0x0f, 0xb4, 0x79, 0x96, 0xe3, 0x54, 0x99, 0xf4, 0xbd, 0x5b, 0x3b, 0x76, 0x45, 0xf7, 0x5c, + 0x7c, 0x76, 0xbc, 0x83, 0x7f, 0x73, 0xdb, 0xda, 0x27, 0x7f, 0x17, 0xf9, 0x4b, 0xba, 0x95, 0xc1, + 0xc5, 0x97, 0x0f, 0x5f, 0xbf, 0xd5, 0xab, 0x87, 0x84, 0x1e, 0xa7, 0xca, 0x7b, 0xb4, 0x51, 0x8b, + 0xe5, 0x76, 0xfb, 0xe0, 0xee, 0x45, 0xf8, 0x79, 0xcb, 0xde, 0x46, 0xe5, 0x9e, 0x8f, 0xc8, 0x47, + 0x42, 0x26, 0x75, 0xb7, 0xf3, 0xcf, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x1b, 0x7b, 0xd5, + 0xf3, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -429,8 +309,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type AuthorizationClient interface { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) } @@ -453,11 +331,17 @@ func (c *authorizationClient) Check(ctx context.Context, in *CheckRequest, opts // AuthorizationServer is the server API for Authorization service. type AuthorizationServer interface { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. Check(context.Context, *CheckRequest) (*CheckResponse, error) } +// UnimplementedAuthorizationServer can be embedded to have forward compatible implementations. +type UnimplementedAuthorizationServer struct { +} + +func (*UnimplementedAuthorizationServer) Check(ctx context.Context, req *CheckRequest) (*CheckResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method Check not implemented") +} + func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) { s.RegisterService(&_Authorization_serviceDesc, srv) } @@ -492,913 +376,3 @@ var _Authorization_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "envoy/service/auth/v2/external_auth.proto", } - -func (m *CheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Attributes != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(m.Attributes.Size())) - n1, err := m.Attributes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DeniedHttpResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeniedHttpResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Status != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(m.Status.Size())) - n2, err := m.Status.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if len(m.Headers) > 0 { - for _, msg := range m.Headers { - dAtA[i] = 0x12 - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Body) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(len(m.Body))) - i += copy(dAtA[i:], m.Body) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *OkHttpResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OkHttpResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Headers) > 0 { - for _, msg := range m.Headers { - dAtA[i] = 0x12 - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Status != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(m.Status.Size())) - n3, err := m.Status.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.HttpResponse != nil { - nn4, err := m.HttpResponse.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CheckResponse_DeniedResponse) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.DeniedResponse != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(m.DeniedResponse.Size())) - n5, err := m.DeniedResponse.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} -func (m *CheckResponse_OkResponse) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.OkResponse != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintExternalAuth(dAtA, i, uint64(m.OkResponse.Size())) - n6, err := m.OkResponse.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - return i, nil -} -func encodeVarintExternalAuth(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *CheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Attributes != nil { - l = m.Attributes.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeniedHttpResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - if len(m.Headers) > 0 { - for _, e := range m.Headers { - l = e.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - } - l = len(m.Body) - if l > 0 { - n += 1 + l + sovExternalAuth(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OkHttpResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Headers) > 0 { - for _, e := range m.Headers { - l = e.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CheckResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - if m.HttpResponse != nil { - n += m.HttpResponse.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CheckResponse_DeniedResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeniedResponse != nil { - l = m.DeniedResponse.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - return n -} -func (m *CheckResponse_OkResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OkResponse != nil { - l = m.OkResponse.Size() - n += 1 + l + sovExternalAuth(uint64(l)) - } - return n -} - -func sovExternalAuth(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozExternalAuth(x uint64) (n int) { - return sovExternalAuth(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = &AttributeContext{} - } - if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExternalAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExternalAuth - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthExternalAuth - } - 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 *DeniedHttpResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeniedHttpResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeniedHttpResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &_type.HttpStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Headers = append(m.Headers, &core.HeaderValueOption{}) - if err := m.Headers[len(m.Headers)-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 Body", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Body = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExternalAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExternalAuth - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthExternalAuth - } - 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 *OkHttpResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OkHttpResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OkHttpResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Headers = append(m.Headers, &core.HeaderValueOption{}) - if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExternalAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExternalAuth - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthExternalAuth - } - 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 *CheckResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &rpc.Status{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeniedResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DeniedHttpResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HttpResponse = &CheckResponse_DeniedResponse{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OkResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExternalAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExternalAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &OkHttpResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.HttpResponse = &CheckResponse_OkResponse{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExternalAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExternalAuth - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthExternalAuth - } - 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 skipExternalAuth(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExternalAuth - } - 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, ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExternalAuth - } - 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, ErrInvalidLengthExternalAuth - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthExternalAuth - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExternalAuth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipExternalAuth(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthExternalAuth - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthExternalAuth = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowExternalAuth = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.validate.go index c62832849b..d68cf17ab7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2/external_auth.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/auth/v2/external_auth.proto -package v2 +package envoy_service_auth_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _external_auth_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on CheckRequest with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. @@ -41,17 +44,12 @@ func (m *CheckRequest) Validate() error { return nil } - { - tmp := m.GetAttributes() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CheckRequestValidationError{ - field: "Attributes", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, } } } @@ -128,17 +126,12 @@ func (m *DeniedHttpResponse) Validate() error { } } - { - tmp := m.GetStatus() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DeniedHttpResponseValidationError{ - field: "Status", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, } } } @@ -146,17 +139,12 @@ func (m *DeniedHttpResponse) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return DeniedHttpResponseValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -235,17 +223,12 @@ func (m *OkHttpResponse) Validate() error { for idx, item := range m.GetHeaders() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return OkHttpResponseValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -317,17 +300,12 @@ func (m *CheckResponse) Validate() error { return nil } - { - tmp := m.GetStatus() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CheckResponseValidationError{ - field: "Status", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, } } } @@ -336,34 +314,24 @@ func (m *CheckResponse) Validate() error { case *CheckResponse_DeniedResponse: - { - tmp := m.GetDeniedResponse() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CheckResponseValidationError{ - field: "DeniedResponse", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetDeniedResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, } } } case *CheckResponse_OkResponse: - { - tmp := m.GetOkResponse() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return CheckResponseValidationError{ - field: "OkResponse", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetOkResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.go index e81a32da5b..7e392f730c 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.go @@ -1,17 +1,17 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/auth/v2alpha/external_auth.proto -package v2alpha +package envoy_service_auth_v2alpha import ( context "context" fmt "fmt" - math "math" - - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - v2 "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,27 +23,25 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("envoy/service/auth/v2alpha/external_auth.proto", fileDescriptor_878c0ddb0c43de8d) } var fileDescriptor_878c0ddb0c43de8d = []byte{ - // 194 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4b, 0xcd, 0x2b, 0xcb, - 0xaf, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, - 0x33, 0x4a, 0xcc, 0x29, 0xc8, 0x48, 0xd4, 0x4f, 0xad, 0x28, 0x49, 0x2d, 0xca, 0x4b, 0xcc, 0x89, - 0x07, 0x89, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x49, 0x81, 0xd5, 0xeb, 0x41, 0xd5, 0xeb, - 0x81, 0x65, 0xa0, 0xea, 0xa5, 0x34, 0xb1, 0x9a, 0x85, 0xcd, 0x18, 0xa3, 0x64, 0x2e, 0x5e, 0xc7, - 0xd2, 0x92, 0x8c, 0xfc, 0xa2, 0xcc, 0xaa, 0xc4, 0x92, 0xcc, 0xfc, 0x3c, 0xa1, 0x20, 0x2e, 0x56, - 0xe7, 0x8c, 0xd4, 0xe4, 0x6c, 0x21, 0x65, 0x3d, 0xac, 0x36, 0xe8, 0x81, 0x65, 0x83, 0x52, 0x0b, - 0x4b, 0x53, 0x8b, 0x4b, 0xa4, 0x54, 0xf0, 0x2b, 0x2a, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x75, 0x0a, - 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0xb9, 0x34, 0x32, - 0xf3, 0x21, 0xba, 0x0a, 0x8a, 0xf2, 0x2b, 0x2a, 0xf5, 0x70, 0xfb, 0xc3, 0x89, 0xcb, 0x39, 0xb5, - 0xa8, 0xa4, 0x38, 0x00, 0xe4, 0xd0, 0x00, 0xc6, 0x28, 0x76, 0xa8, 0x70, 0x07, 0x23, 0x63, 0x12, - 0x1b, 0xd8, 0xf5, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xd9, 0x7c, 0x50, 0x36, 0x01, - 0x00, 0x00, + // 176 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0xce, 0xb1, 0x0e, 0x82, 0x30, + 0x10, 0x06, 0xe0, 0x30, 0xe8, 0xd0, 0xc4, 0x85, 0x91, 0x55, 0x07, 0x5d, 0xae, 0x09, 0x8e, 0x4e, + 0xc2, 0x0b, 0x10, 0x5e, 0xc0, 0x54, 0x72, 0x49, 0x1b, 0x49, 0xaf, 0xb6, 0x07, 0x01, 0x9f, 0xc0, + 0xc7, 0x36, 0x54, 0xc6, 0xea, 0x7a, 0xff, 0x97, 0xff, 0x7e, 0x01, 0x68, 0x47, 0x9a, 0x65, 0x40, + 0x3f, 0x9a, 0x0e, 0xa5, 0x1a, 0x58, 0xcb, 0xb1, 0x54, 0xbd, 0xd3, 0x4a, 0xe2, 0xc4, 0xe8, 0xad, + 0xea, 0x6f, 0xcb, 0x15, 0x9c, 0x27, 0xa6, 0xbc, 0x88, 0x1e, 0x56, 0x0f, 0x31, 0x59, 0x7d, 0x71, + 0x4a, 0x76, 0xa5, 0x6a, 0xca, 0x4e, 0xec, 0xae, 0x03, 0x6b, 0xf2, 0xe6, 0xa5, 0xd8, 0x90, 0xcd, + 0x5b, 0xb1, 0xa9, 0x35, 0x76, 0x8f, 0x7c, 0x0f, 0xc9, 0x0f, 0x10, 0xd3, 0x16, 0x9f, 0x03, 0x06, + 0x2e, 0x0e, 0xff, 0x51, 0x70, 0x64, 0x03, 0x56, 0x17, 0x71, 0x34, 0xf4, 0x95, 0xce, 0xd3, 0x34, + 0xc3, 0xef, 0xed, 0x95, 0xa8, 0xd1, 0x73, 0x68, 0x96, 0x71, 0x4d, 0xf6, 0xce, 0xb2, 0xfb, 0x36, + 0x0e, 0x3d, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xed, 0xe3, 0x41, 0xb2, 0x21, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -58,8 +56,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type AuthorizationClient interface { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. Check(ctx context.Context, in *v2.CheckRequest, opts ...grpc.CallOption) (*v2.CheckResponse, error) } @@ -82,11 +78,17 @@ func (c *authorizationClient) Check(ctx context.Context, in *v2.CheckRequest, op // AuthorizationServer is the server API for Authorization service. type AuthorizationServer interface { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. Check(context.Context, *v2.CheckRequest) (*v2.CheckResponse, error) } +// UnimplementedAuthorizationServer can be embedded to have forward compatible implementations. +type UnimplementedAuthorizationServer struct { +} + +func (*UnimplementedAuthorizationServer) Check(ctx context.Context, req *v2.CheckRequest) (*v2.CheckResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") +} + func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) { s.RegisterService(&_Authorization_serviceDesc, srv) } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.validate.go index 0232f51b4b..c52620a2dd 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha/external_auth.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/auth/v2alpha/external_auth.proto -package v2alpha +package envoy_service_auth_v2alpha import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,5 +30,8 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) + +// define the regex for a UUID once up-front +var _external_auth_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go index 69eac43537..f47f2ff9c7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go @@ -1,18 +1,18 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/discovery/v2/ads.proto -package v2 +package envoy_service_discovery_v2 import ( context "context" fmt "fmt" - io "io" - math "math" - - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - + _ "github.com/cncf/udpa/go/udpa/annotations" v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,10 +24,8 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 type AdsDummy struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -40,26 +38,18 @@ func (*AdsDummy) ProtoMessage() {} func (*AdsDummy) Descriptor() ([]byte, []int) { return fileDescriptor_187fd5dcc2dab695, []int{0} } + func (m *AdsDummy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AdsDummy.Unmarshal(m, b) } func (m *AdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdsDummy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AdsDummy.Marshal(b, m, deterministic) } func (m *AdsDummy) XXX_Merge(src proto.Message) { xxx_messageInfo_AdsDummy.Merge(m, src) } func (m *AdsDummy) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AdsDummy.Size(m) } func (m *AdsDummy) XXX_DiscardUnknown() { xxx_messageInfo_AdsDummy.DiscardUnknown(m) @@ -76,23 +66,24 @@ func init() { } var fileDescriptor_187fd5dcc2dab695 = []byte{ - // 251 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0x39, 0x06, 0x84, 0x3c, 0x66, 0x82, 0x08, 0x05, 0xa9, 0x74, 0xe8, 0xe4, 0x20, 0xf3, - 0x04, 0xad, 0xb2, 0xb0, 0x55, 0xed, 0xc6, 0xe6, 0x26, 0xa7, 0xc8, 0x82, 0xf4, 0x8c, 0xcf, 0xb1, - 0xc8, 0x1b, 0xf0, 0x68, 0x8c, 0x3c, 0x02, 0xca, 0xce, 0x3b, 0xa0, 0xc4, 0xd0, 0x22, 0xa0, 0xcc, - 0xf7, 0xfd, 0xff, 0x7f, 0xfa, 0xc4, 0x14, 0xb7, 0x81, 0xba, 0x9c, 0xd1, 0x05, 0x53, 0x62, 0x5e, - 0x19, 0x2e, 0x29, 0xa0, 0xeb, 0xf2, 0xa0, 0x72, 0x5d, 0xb1, 0xb4, 0x8e, 0x3c, 0x25, 0xe9, 0x48, - 0xc9, 0x4f, 0x4a, 0xee, 0x28, 0x19, 0x54, 0x7a, 0x11, 0x1b, 0xb4, 0x35, 0x43, 0x66, 0x7f, 0x1a, - 0x93, 0x13, 0x21, 0x4e, 0xe7, 0x15, 0x17, 0x6d, 0xd3, 0x74, 0xea, 0x1d, 0x44, 0x3a, 0xaf, 0x6b, - 0x87, 0xb5, 0xf6, 0x58, 0x15, 0x5f, 0xe4, 0x3a, 0xb6, 0x26, 0x1b, 0x71, 0xbe, 0xf6, 0x0e, 0x75, - 0xb3, 0x67, 0x56, 0xc8, 0xd4, 0xba, 0x12, 0x39, 0xc9, 0x64, 0x7c, 0x41, 0x5b, 0x23, 0x83, 0x92, - 0xbb, 0xf0, 0x0a, 0x1f, 0x5b, 0x64, 0x9f, 0x5e, 0x1e, 0xbc, 0xb3, 0xa5, 0x2d, 0xe3, 0xe4, 0x68, - 0x06, 0xd7, 0x90, 0xdc, 0x8b, 0xb3, 0x02, 0x1f, 0xbc, 0xfe, 0x6b, 0xe2, 0xea, 0x47, 0xc5, 0xc0, - 0xfd, 0xda, 0x99, 0xfe, 0x0f, 0x7d, 0x1f, 0x5b, 0xdc, 0xbe, 0xf4, 0x19, 0xbc, 0xf6, 0x19, 0xbc, - 0xf5, 0x19, 0x88, 0x99, 0xa1, 0x98, 0xb5, 0x8e, 0x9e, 0x3a, 0x79, 0xd8, 0xe8, 0x62, 0x30, 0xb6, - 0x1c, 0xec, 0x2d, 0xe1, 0xee, 0x38, 0xa8, 0x67, 0x80, 0xcd, 0xc9, 0x68, 0xf3, 0xe6, 0x23, 0x00, - 0x00, 0xff, 0xff, 0xe5, 0x2b, 0x38, 0xe9, 0xaf, 0x01, 0x00, 0x00, + // 264 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x4d, 0x4e, 0xc3, 0x30, + 0x10, 0x85, 0x31, 0x8b, 0x0a, 0x79, 0x85, 0xb2, 0x82, 0x88, 0x1f, 0xa9, 0x74, 0xd1, 0x95, 0x8d, + 0xc2, 0x09, 0x52, 0xe5, 0x00, 0x55, 0x7b, 0x82, 0x69, 0x32, 0x8a, 0x2c, 0x48, 0xc6, 0x78, 0x6c, + 0x8b, 0xec, 0x58, 0x72, 0x26, 0x4e, 0xc0, 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, 0xd6, 0xb2, + 0x37, 0xb7, 0x14, 0x2f, 0x42, 0x6c, 0x26, 0x83, 0xc5, 0xbb, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xf0, 0xa8, 0xc5, 0xb7, 0xc6, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -107,7 +98,6 @@ const _ = grpc.SupportPackageIsVersion4 // // 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) } @@ -184,11 +174,21 @@ func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Recv() (*v2.D // 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(srv AggregatedDiscoveryService_StreamAggregatedResourcesServer) error { + return status.Errorf(codes.Unimplemented, "method StreamAggregatedResources not implemented") +} +func (*UnimplementedAggregatedDiscoveryServiceServer) DeltaAggregatedResources(srv AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaAggregatedResources not implemented") +} + func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer) { s.RegisterService(&_AggregatedDiscoveryService_serviceDesc, srv) } @@ -265,223 +265,3 @@ var _AggregatedDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, Metadata: "envoy/service/discovery/v2/ads.proto", } - -func (m *AdsDummy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdsDummy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintAds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *AdsDummy) 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 sovAds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAds(x uint64) (n int) { - return sovAds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AdsDummy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdsDummy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdsDummy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthAds - } - 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 skipAds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAds - } - 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, ErrIntOverflowAds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAds - } - 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, ErrInvalidLengthAds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthAds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipAds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthAds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthAds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go index 229d2ab3fd..5ccb8faebf 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/discovery/v2/ads.proto -package v2 +package envoy_service_discovery_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _ads_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on AdsDummy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *AdsDummy) Validate() error { diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go index f81ef063c4..b0f91dfde7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go @@ -1,21 +1,21 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/discovery/v2/hds.proto -package v2 +package envoy_service_discovery_v2 import ( context "context" fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/googleapis/google/api" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - grpc "google.golang.org/grpc" - + _ "github.com/cncf/udpa/go/udpa/annotations" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,10 +27,8 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Different Envoy instances may have different capabilities (e.g. Redis) -// and/or have ports enabled for different protocols. type Capability_Protocol int32 const ( @@ -59,8 +57,6 @@ func (Capability_Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{0, 0} } -// Defines supported protocols etc, so the management server can assign proper -// endpoints to healthcheck. type Capability struct { HealthCheckProtocols []Capability_Protocol `protobuf:"varint,1,rep,packed,name=health_check_protocols,json=healthCheckProtocols,proto3,enum=envoy.service.discovery.v2.Capability_Protocol" json:"health_check_protocols,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -74,26 +70,18 @@ func (*Capability) ProtoMessage() {} func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{0} } + func (m *Capability) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Capability.Unmarshal(m, b) } func (m *Capability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Capability.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Capability.Marshal(b, m, deterministic) } func (m *Capability) XXX_Merge(src proto.Message) { xxx_messageInfo_Capability.Merge(m, src) } func (m *Capability) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Capability.Size(m) } func (m *Capability) XXX_DiscardUnknown() { xxx_messageInfo_Capability.DiscardUnknown(m) @@ -122,26 +110,18 @@ func (*HealthCheckRequest) ProtoMessage() {} func (*HealthCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{1} } + func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheckRequest.Unmarshal(m, b) } func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic) } func (m *HealthCheckRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheckRequest.Merge(m, src) } func (m *HealthCheckRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheckRequest.Size(m) } func (m *HealthCheckRequest) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheckRequest.DiscardUnknown(m) @@ -177,26 +157,18 @@ func (*EndpointHealth) ProtoMessage() {} func (*EndpointHealth) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{2} } + func (m *EndpointHealth) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_EndpointHealth.Unmarshal(m, b) } func (m *EndpointHealth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EndpointHealth.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_EndpointHealth.Marshal(b, m, deterministic) } func (m *EndpointHealth) XXX_Merge(src proto.Message) { xxx_messageInfo_EndpointHealth.Merge(m, src) } func (m *EndpointHealth) XXX_Size() int { - return m.Size() + return xxx_messageInfo_EndpointHealth.Size(m) } func (m *EndpointHealth) XXX_DiscardUnknown() { xxx_messageInfo_EndpointHealth.DiscardUnknown(m) @@ -231,26 +203,18 @@ func (*EndpointHealthResponse) ProtoMessage() {} func (*EndpointHealthResponse) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{3} } + func (m *EndpointHealthResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_EndpointHealthResponse.Unmarshal(m, b) } func (m *EndpointHealthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EndpointHealthResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_EndpointHealthResponse.Marshal(b, m, deterministic) } func (m *EndpointHealthResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_EndpointHealthResponse.Merge(m, src) } func (m *EndpointHealthResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_EndpointHealthResponse.Size(m) } func (m *EndpointHealthResponse) XXX_DiscardUnknown() { xxx_messageInfo_EndpointHealthResponse.DiscardUnknown(m) @@ -285,26 +249,18 @@ func (*HealthCheckRequestOrEndpointHealthResponse) ProtoMessage() {} func (*HealthCheckRequestOrEndpointHealthResponse) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{4} } + func (m *HealthCheckRequestOrEndpointHealthResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse.Unmarshal(m, b) } func (m *HealthCheckRequestOrEndpointHealthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse.Marshal(b, m, deterministic) } func (m *HealthCheckRequestOrEndpointHealthResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse.Merge(m, src) } func (m *HealthCheckRequestOrEndpointHealthResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse.Size(m) } func (m *HealthCheckRequestOrEndpointHealthResponse) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse.DiscardUnknown(m) @@ -314,19 +270,19 @@ var xxx_messageInfo_HealthCheckRequestOrEndpointHealthResponse proto.InternalMes type isHealthCheckRequestOrEndpointHealthResponse_RequestType interface { isHealthCheckRequestOrEndpointHealthResponse_RequestType() - MarshalTo([]byte) (int, error) - Size() int } type HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest struct { HealthCheckRequest *HealthCheckRequest `protobuf:"bytes,1,opt,name=health_check_request,json=healthCheckRequest,proto3,oneof"` } + type HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse struct { EndpointHealthResponse *EndpointHealthResponse `protobuf:"bytes,2,opt,name=endpoint_health_response,json=endpointHealthResponse,proto3,oneof"` } func (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest) isHealthCheckRequestOrEndpointHealthResponse_RequestType() { } + func (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse) isHealthCheckRequestOrEndpointHealthResponse_RequestType() { } @@ -351,80 +307,14 @@ func (m *HealthCheckRequestOrEndpointHealthResponse) GetEndpointHealthResponse() return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HealthCheckRequestOrEndpointHealthResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HealthCheckRequestOrEndpointHealthResponse_OneofMarshaler, _HealthCheckRequestOrEndpointHealthResponse_OneofUnmarshaler, _HealthCheckRequestOrEndpointHealthResponse_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HealthCheckRequestOrEndpointHealthResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest)(nil), (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse)(nil), } } -func _HealthCheckRequestOrEndpointHealthResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HealthCheckRequestOrEndpointHealthResponse) - // request_type - switch x := m.RequestType.(type) { - case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.HealthCheckRequest); err != nil { - return err - } - case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.EndpointHealthResponse); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("HealthCheckRequestOrEndpointHealthResponse.RequestType has unexpected type %T", x) - } - return nil -} - -func _HealthCheckRequestOrEndpointHealthResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HealthCheckRequestOrEndpointHealthResponse) - switch tag { - case 1: // request_type.health_check_request - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HealthCheckRequest) - err := b.DecodeMessage(msg) - m.RequestType = &HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest{msg} - return true, err - case 2: // request_type.endpoint_health_response - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(EndpointHealthResponse) - err := b.DecodeMessage(msg) - m.RequestType = &HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse{msg} - return true, err - default: - return false, nil - } -} - -func _HealthCheckRequestOrEndpointHealthResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HealthCheckRequestOrEndpointHealthResponse) - // request_type - switch x := m.RequestType.(type) { - case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - s := proto.Size(x.HealthCheckRequest) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: - s := proto.Size(x.EndpointHealthResponse) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type LocalityEndpoints struct { Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` Endpoints []*endpoint.Endpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` @@ -439,26 +329,18 @@ func (*LocalityEndpoints) ProtoMessage() {} func (*LocalityEndpoints) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{5} } + func (m *LocalityEndpoints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_LocalityEndpoints.Unmarshal(m, b) } func (m *LocalityEndpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalityEndpoints.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_LocalityEndpoints.Marshal(b, m, deterministic) } func (m *LocalityEndpoints) XXX_Merge(src proto.Message) { xxx_messageInfo_LocalityEndpoints.Merge(m, src) } func (m *LocalityEndpoints) XXX_Size() int { - return m.Size() + return xxx_messageInfo_LocalityEndpoints.Size(m) } func (m *LocalityEndpoints) XXX_DiscardUnknown() { xxx_messageInfo_LocalityEndpoints.DiscardUnknown(m) @@ -480,10 +362,6 @@ func (m *LocalityEndpoints) GetEndpoints() []*endpoint.Endpoint { return nil } -// The cluster name and locality is provided to Envoy for the endpoints that it -// health checks to support statistics reporting, logging and debugging by the -// Envoy instance (outside of HDS). For maximum usefulness, it should match the -// same cluster structure as that provided by EDS. type ClusterHealthCheck struct { ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` HealthChecks []*core.HealthCheck `protobuf:"bytes,2,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` @@ -499,26 +377,18 @@ func (*ClusterHealthCheck) ProtoMessage() {} func (*ClusterHealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{6} } + func (m *ClusterHealthCheck) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ClusterHealthCheck.Unmarshal(m, b) } func (m *ClusterHealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterHealthCheck.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ClusterHealthCheck.Marshal(b, m, deterministic) } func (m *ClusterHealthCheck) XXX_Merge(src proto.Message) { xxx_messageInfo_ClusterHealthCheck.Merge(m, src) } func (m *ClusterHealthCheck) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ClusterHealthCheck.Size(m) } func (m *ClusterHealthCheck) XXX_DiscardUnknown() { xxx_messageInfo_ClusterHealthCheck.DiscardUnknown(m) @@ -548,12 +418,11 @@ func (m *ClusterHealthCheck) GetLocalityEndpoints() []*LocalityEndpoints { } type HealthCheckSpecifier struct { - ClusterHealthChecks []*ClusterHealthCheck `protobuf:"bytes,1,rep,name=cluster_health_checks,json=clusterHealthChecks,proto3" json:"cluster_health_checks,omitempty"` - // The default is 1 second. - Interval *types.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ClusterHealthChecks []*ClusterHealthCheck `protobuf:"bytes,1,rep,name=cluster_health_checks,json=clusterHealthChecks,proto3" json:"cluster_health_checks,omitempty"` + Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HealthCheckSpecifier) Reset() { *m = HealthCheckSpecifier{} } @@ -562,26 +431,18 @@ func (*HealthCheckSpecifier) ProtoMessage() {} func (*HealthCheckSpecifier) Descriptor() ([]byte, []int) { return fileDescriptor_773ad67555497672, []int{7} } + func (m *HealthCheckSpecifier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HealthCheckSpecifier.Unmarshal(m, b) } func (m *HealthCheckSpecifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheckSpecifier.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HealthCheckSpecifier.Marshal(b, m, deterministic) } func (m *HealthCheckSpecifier) XXX_Merge(src proto.Message) { xxx_messageInfo_HealthCheckSpecifier.Merge(m, src) } func (m *HealthCheckSpecifier) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HealthCheckSpecifier.Size(m) } func (m *HealthCheckSpecifier) XXX_DiscardUnknown() { xxx_messageInfo_HealthCheckSpecifier.DiscardUnknown(m) @@ -596,7 +457,7 @@ func (m *HealthCheckSpecifier) GetClusterHealthChecks() []*ClusterHealthCheck { return nil } -func (m *HealthCheckSpecifier) GetInterval() *types.Duration { +func (m *HealthCheckSpecifier) GetInterval() *duration.Duration { if m != nil { return m.Interval } @@ -620,55 +481,58 @@ func init() { } var fileDescriptor_773ad67555497672 = []byte{ - // 762 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x6f, 0x12, 0x41, - 0x14, 0x66, 0x68, 0x55, 0xfa, 0x8a, 0x48, 0xc7, 0x8a, 0x88, 0x0d, 0xad, 0x9b, 0x6a, 0x48, 0x8d, - 0x4b, 0x83, 0x31, 0x26, 0x35, 0x5e, 0x0a, 0x6d, 0x30, 0x31, 0x95, 0x0c, 0xf5, 0x66, 0x42, 0x96, - 0x65, 0x5a, 0x36, 0x6e, 0x77, 0xd6, 0x9d, 0x81, 0xc8, 0xd5, 0x93, 0xc6, 0x8b, 0x49, 0xcf, 0xfe, - 0x08, 0xe3, 0x9f, 0xf0, 0x68, 0xe2, 0xcd, 0x93, 0x69, 0xfa, 0x43, 0x0c, 0x33, 0xb3, 0xcb, 0x52, - 0x0a, 0xb6, 0x37, 0x6f, 0xec, 0x9b, 0xef, 0xbd, 0xf7, 0x7d, 0xef, 0x7b, 0x33, 0xc0, 0x3a, 0xf5, - 0xfa, 0x6c, 0x50, 0xe6, 0x34, 0xe8, 0x3b, 0x36, 0x2d, 0x77, 0x1c, 0x6e, 0xb3, 0x3e, 0x0d, 0x06, - 0xe5, 0x7e, 0xa5, 0xdc, 0xed, 0x70, 0xd3, 0x0f, 0x98, 0x60, 0xb8, 0x20, 0x51, 0xa6, 0x46, 0x99, - 0x11, 0xca, 0xec, 0x57, 0x0a, 0x2b, 0xaa, 0x82, 0xe5, 0x3b, 0xc3, 0x1c, 0x9b, 0x05, 0xb4, 0xdc, - 0xb6, 0x38, 0x55, 0x99, 0x85, 0xf5, 0xc9, 0xd3, 0x2e, 0xb5, 0x5c, 0xd1, 0x6d, 0xd9, 0x5d, 0x6a, - 0xbf, 0x3d, 0x17, 0x45, 0xbd, 0x8e, 0xcf, 0x1c, 0x4f, 0x44, 0x3f, 0x34, 0x6a, 0xe5, 0x90, 0xb1, - 0x43, 0x97, 0x4a, 0x98, 0xe5, 0x79, 0x4c, 0x58, 0xc2, 0x61, 0x9e, 0xe6, 0x58, 0x28, 0xea, 0x53, - 0xf9, 0xd5, 0xee, 0x1d, 0x94, 0x3b, 0xbd, 0x40, 0x02, 0xd4, 0xb9, 0xf1, 0x15, 0x01, 0x54, 0x2d, - 0xdf, 0x6a, 0x3b, 0xae, 0x23, 0x06, 0x98, 0x42, 0x2e, 0x4e, 0xa4, 0x25, 0x41, 0x36, 0x73, 0x79, - 0x1e, 0xad, 0xcd, 0x95, 0x32, 0x95, 0xb2, 0x39, 0x5d, 0xb3, 0x39, 0xaa, 0x63, 0x36, 0x74, 0x1e, - 0x59, 0x56, 0xe5, 0xaa, 0xc3, 0x6a, 0x61, 0x90, 0x1b, 0x25, 0x48, 0x85, 0x1f, 0x38, 0x05, 0xf3, - 0xf5, 0xfd, 0xfd, 0x46, 0x36, 0x81, 0xaf, 0xc1, 0xdc, 0x7e, 0xb5, 0x91, 0x45, 0x78, 0x01, 0xae, - 0x90, 0x9d, 0xda, 0x8b, 0x66, 0x36, 0x69, 0x7c, 0x42, 0x80, 0xeb, 0xa3, 0x12, 0x84, 0xbe, 0xeb, - 0x51, 0x2e, 0xf0, 0x43, 0x98, 0xf7, 0x58, 0x87, 0xe6, 0xd1, 0x1a, 0x2a, 0x2d, 0x56, 0x6e, 0x6b, - 0x56, 0x96, 0xef, 0x0c, 0x79, 0x0c, 0xe7, 0x69, 0xee, 0xb1, 0x0e, 0x25, 0x12, 0x84, 0x77, 0x01, - 0xec, 0x88, 0x5a, 0x3e, 0x29, 0x53, 0x1e, 0x5c, 0x4c, 0x08, 0x89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 0x8f, 0x93, 0xab, 0x46, 0x61, 0xf8, 0x3f, 0x18, 0xc1, 0xb7, - 0xe2, 0x36, 0x6f, 0xa1, 0x8d, 0xed, 0x9d, 0x1f, 0x27, 0x45, 0xf4, 0xf3, 0xa4, 0x88, 0xfe, 0x9c, - 0x14, 0x11, 0x94, 0x1c, 0xa6, 0x1a, 0xf9, 0x01, 0x7b, 0x3f, 0x98, 0xd1, 0x73, 0x3b, 0x55, 0xef, - 0x70, 0xf9, 0x77, 0xd4, 0x40, 0x1f, 0x11, 0x6a, 0x5f, 0x95, 0x56, 0x3e, 0xfe, 0x1b, 0x00, 0x00, - 0xff, 0xff, 0x20, 0xa7, 0x6b, 0xb6, 0x05, 0x08, 0x00, 0x00, + // 814 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0x24, 0xbb, 0x4b, 0xfa, 0x1a, 0x42, 0x3a, 0x94, 0x6c, 0x36, 0x94, 0x65, 0xb1, 0x56, + 0x28, 0x6a, 0x85, 0x5d, 0xa5, 0x42, 0x48, 0x45, 0x5c, 0x9a, 0xb4, 0x0a, 0x12, 0x2a, 0x91, 0x53, + 0x6e, 0x48, 0x61, 0x62, 0x4f, 0x1b, 0x0b, 0xc7, 0x63, 0x3c, 0x93, 0x88, 0xdc, 0x10, 0x27, 0x10, + 0x07, 0x90, 0x7a, 0xe1, 0xc2, 0x1f, 0xc1, 0x11, 0xfe, 0x02, 0xae, 0x88, 0x1b, 0x67, 0x4e, 0x1c, + 0xf9, 0x03, 0x10, 0xca, 0xfc, 0x70, 0x9c, 0xba, 0x09, 0xed, 0x6d, 0x6f, 0xf1, 0x7b, 0xdf, 0xfb, + 0xde, 0xf7, 0xde, 0xf7, 0xec, 0xc0, 0x73, 0x1a, 0xcd, 0xd8, 0xdc, 0xe1, 0x34, 0x99, 0x05, 0x1e,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09, 0xf5, 0x5d, 0x3d, 0xb1, 0xd5, 0xf7, 0xd9, 0x36, 0xdf, 0x67, 0xbb, 0xab, 0xbf, + 0xcf, 0x6e, 0x0a, 0x6d, 0xff, 0x5d, 0x84, 0xba, 0xe2, 0xe9, 0x9a, 0xae, 0x03, 0x25, 0x03, 0x5f, + 0x23, 0xd8, 0x19, 0x88, 0x84, 0x92, 0x49, 0xd6, 0xaa, 0xb3, 0xfb, 0xbd, 0x15, 0xeb, 0xde, 0xbd, + 0xe6, 0xe1, 0x1d, 0x79, 0xd2, 0x2d, 0x5a, 0x85, 0x16, 0x3a, 0x44, 0xf8, 0x17, 0x04, 0xb5, 0x33, + 0x2a, 0xbc, 0xf1, 0x8b, 0x21, 0xea, 0xe0, 0xeb, 0x3f, 0xfe, 0xba, 0x2e, 0xee, 0x59, 0xcd, 0xc5, + 0x3f, 0x6a, 0x0a, 0x3f, 0xce, 0xda, 0x2c, 0x11, 0xa5, 0x63, 0xb4, 0x7f, 0xf2, 0xd9, 0x3f, 0x3f, + 0xfe, 0xfb, 0xfd, 0xc3, 0x27, 0xf8, 0xf1, 0x6a, 0x17, 0x05, 0xb6, 0x67, 0x47, 0xbf, 0x7e, 0xf5, + 0xdb, 0xef, 0x8f, 0x8a, 0x35, 0x04, 0xad, 0x80, 0x29, 0x25, 0x71, 0xc2, 0xbe, 0x9c, 0x6f, 0x10, + 0x75, 0x52, 0xee, 0xf9, 0x5c, 0xfe, 0x5f, 0xf5, 0xd1, 0x37, 0x08, 0x8d, 0x1e, 0x49, 0xaf, 0x8f, + 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x44, 0xf0, 0xa3, 0x70, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -683,44 +547,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type HealthDiscoveryServiceClient interface { - // 1. Envoy starts up and if its can_healthcheck option in the static - // bootstrap config is enabled, sends HealthCheckRequest to the management - // server. It supplies its capabilities (which protocol it can health check - // with, what zone it resides in, etc.). - // 2. In response to (1), the management server designates this Envoy as a - // healthchecker to health check a subset of all upstream hosts for a given - // cluster (for example upstream Host 1 and Host 2). It streams - // HealthCheckSpecifier messages with cluster related configuration for all - // clusters this Envoy is designated to health check. Subsequent - // HealthCheckSpecifier message will be sent on changes to: - // a. Endpoints to health checks - // b. Per cluster configuration change - // 3. Envoy creates a health probe based on the HealthCheck config and sends - // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck - // configuration Envoy waits upon the arrival of the probe response and - // looks at the content of the response to decide whether the endpoint is - // healthy or not. If a response hasn't been received within the timeout - // interval, the endpoint health status is considered TIMEOUT. - // 4. Envoy reports results back in an EndpointHealthResponse message. - // Envoy streams responses as often as the interval configured by the - // management server in HealthCheckSpecifier. - // 5. The management Server collects health statuses for all endpoints in the - // cluster (for all clusters) and uses this information to construct - // EndpointDiscoveryResponse messages. - // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load - // balances traffic to them without additional health checking. It may - // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection - // failed to a particular endpoint to account for health status propagation - // delay between HDS and EDS). - // By default, can_healthcheck is true. If can_healthcheck is false, Cluster - // configuration may not contain HealthCheck message. - // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above - // invariant? - // TODO(htuch): Add @amb67's diagram. StreamHealthCheck(ctx context.Context, opts ...grpc.CallOption) (HealthDiscoveryService_StreamHealthCheckClient, error) - // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of - // request/response. Should we add an identifier to the HealthCheckSpecifier - // to bind with the response? FetchHealthCheck(ctx context.Context, in *HealthCheckRequestOrEndpointHealthResponse, opts ...grpc.CallOption) (*HealthCheckSpecifier, error) } @@ -774,47 +601,21 @@ func (c *healthDiscoveryServiceClient) FetchHealthCheck(ctx context.Context, in // HealthDiscoveryServiceServer is the server API for HealthDiscoveryService service. type HealthDiscoveryServiceServer interface { - // 1. Envoy starts up and if its can_healthcheck option in the static - // bootstrap config is enabled, sends HealthCheckRequest to the management - // server. It supplies its capabilities (which protocol it can health check - // with, what zone it resides in, etc.). - // 2. In response to (1), the management server designates this Envoy as a - // healthchecker to health check a subset of all upstream hosts for a given - // cluster (for example upstream Host 1 and Host 2). It streams - // HealthCheckSpecifier messages with cluster related configuration for all - // clusters this Envoy is designated to health check. Subsequent - // HealthCheckSpecifier message will be sent on changes to: - // a. Endpoints to health checks - // b. Per cluster configuration change - // 3. Envoy creates a health probe based on the HealthCheck config and sends - // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck - // configuration Envoy waits upon the arrival of the probe response and - // looks at the content of the response to decide whether the endpoint is - // healthy or not. If a response hasn't been received within the timeout - // interval, the endpoint health status is considered TIMEOUT. - // 4. Envoy reports results back in an EndpointHealthResponse message. - // Envoy streams responses as often as the interval configured by the - // management server in HealthCheckSpecifier. - // 5. The management Server collects health statuses for all endpoints in the - // cluster (for all clusters) and uses this information to construct - // EndpointDiscoveryResponse messages. - // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load - // balances traffic to them without additional health checking. It may - // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection - // failed to a particular endpoint to account for health status propagation - // delay between HDS and EDS). - // By default, can_healthcheck is true. If can_healthcheck is false, Cluster - // configuration may not contain HealthCheck message. - // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above - // invariant? - // TODO(htuch): Add @amb67's diagram. StreamHealthCheck(HealthDiscoveryService_StreamHealthCheckServer) error - // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of - // request/response. Should we add an identifier to the HealthCheckSpecifier - // to bind with the response? FetchHealthCheck(context.Context, *HealthCheckRequestOrEndpointHealthResponse) (*HealthCheckSpecifier, error) } +// UnimplementedHealthDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHealthDiscoveryServiceServer struct { +} + +func (*UnimplementedHealthDiscoveryServiceServer) StreamHealthCheck(srv HealthDiscoveryService_StreamHealthCheckServer) error { + return status.Errorf(codes.Unimplemented, "method StreamHealthCheck not implemented") +} +func (*UnimplementedHealthDiscoveryServiceServer) FetchHealthCheck(ctx context.Context, req *HealthCheckRequestOrEndpointHealthResponse) (*HealthCheckSpecifier, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchHealthCheck not implemented") +} + func RegisterHealthDiscoveryServiceServer(s *grpc.Server, srv HealthDiscoveryServiceServer) { s.RegisterService(&_HealthDiscoveryService_serviceDesc, srv) } @@ -882,1636 +683,3 @@ var _HealthDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, Metadata: "envoy/service/discovery/v2/hds.proto", } - -func (m *Capability) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Capability) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.HealthCheckProtocols) > 0 { - dAtA2 := make([]byte, len(m.HealthCheckProtocols)*10) - var j1 int - for _, num := range m.HealthCheckProtocols { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Node != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(m.Node.Size())) - n3, err := m.Node.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Capability != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHds(dAtA, i, uint64(m.Capability.Size())) - n4, err := m.Capability.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *EndpointHealth) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointHealth) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Endpoint != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(m.Endpoint.Size())) - n5, err := m.Endpoint.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.HealthStatus != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintHds(dAtA, i, uint64(m.HealthStatus)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *EndpointHealthResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointHealthResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.EndpointsHealth) > 0 { - for _, msg := range m.EndpointsHealth { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheckRequestOrEndpointHealthResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheckRequestOrEndpointHealthResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.RequestType != nil { - nn6, err := m.RequestType.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.HealthCheckRequest != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(m.HealthCheckRequest.Size())) - n7, err := m.HealthCheckRequest.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - return i, nil -} -func (m *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.EndpointHealthResponse != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHds(dAtA, i, uint64(m.EndpointHealthResponse.Size())) - n8, err := m.EndpointHealthResponse.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} -func (m *LocalityEndpoints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalityEndpoints) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Locality != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(m.Locality.Size())) - n9, err := m.Locality.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if len(m.Endpoints) > 0 { - for _, msg := range m.Endpoints { - dAtA[i] = 0x12 - i++ - i = encodeVarintHds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ClusterHealthCheck) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterHealthCheck) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ClusterName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(len(m.ClusterName))) - i += copy(dAtA[i:], m.ClusterName) - } - if len(m.HealthChecks) > 0 { - for _, msg := range m.HealthChecks { - dAtA[i] = 0x12 - i++ - i = encodeVarintHds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.LocalityEndpoints) > 0 { - for _, msg := range m.LocalityEndpoints { - dAtA[i] = 0x1a - i++ - i = encodeVarintHds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HealthCheckSpecifier) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheckSpecifier) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ClusterHealthChecks) > 0 { - for _, msg := range m.ClusterHealthChecks { - dAtA[i] = 0xa - i++ - i = encodeVarintHds(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Interval != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintHds(dAtA, i, uint64(m.Interval.Size())) - n10, err := m.Interval.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintHds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Capability) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.HealthCheckProtocols) > 0 { - l = 0 - for _, e := range m.HealthCheckProtocols { - l += sovHds(uint64(e)) - } - n += 1 + sovHds(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovHds(uint64(l)) - } - if m.Capability != nil { - l = m.Capability.Size() - n += 1 + l + sovHds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EndpointHealth) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Endpoint != nil { - l = m.Endpoint.Size() - n += 1 + l + sovHds(uint64(l)) - } - if m.HealthStatus != 0 { - n += 1 + sovHds(uint64(m.HealthStatus)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EndpointHealthResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EndpointsHealth) > 0 { - for _, e := range m.EndpointsHealth { - l = e.Size() - n += 1 + l + sovHds(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheckRequestOrEndpointHealthResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestType != nil { - n += m.RequestType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HealthCheckRequest != nil { - l = m.HealthCheckRequest.Size() - n += 1 + l + sovHds(uint64(l)) - } - return n -} -func (m *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EndpointHealthResponse != nil { - l = m.EndpointHealthResponse.Size() - n += 1 + l + sovHds(uint64(l)) - } - return n -} -func (m *LocalityEndpoints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Locality != nil { - l = m.Locality.Size() - n += 1 + l + sovHds(uint64(l)) - } - if len(m.Endpoints) > 0 { - for _, e := range m.Endpoints { - l = e.Size() - n += 1 + l + sovHds(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterHealthCheck) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClusterName) - if l > 0 { - n += 1 + l + sovHds(uint64(l)) - } - if len(m.HealthChecks) > 0 { - for _, e := range m.HealthChecks { - l = e.Size() - n += 1 + l + sovHds(uint64(l)) - } - } - if len(m.LocalityEndpoints) > 0 { - for _, e := range m.LocalityEndpoints { - l = e.Size() - n += 1 + l + sovHds(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HealthCheckSpecifier) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ClusterHealthChecks) > 0 { - for _, e := range m.ClusterHealthChecks { - l = e.Size() - n += 1 + l + sovHds(uint64(l)) - } - } - if m.Interval != nil { - l = m.Interval.Size() - n += 1 + l + sovHds(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovHds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozHds(x uint64) (n int) { - return sovHds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Capability) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Capability: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v Capability_Protocol - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Capability_Protocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HealthCheckProtocols = append(m.HealthCheckProtocols, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.HealthCheckProtocols) == 0 { - m.HealthCheckProtocols = make([]Capability_Protocol, 0, elementCount) - } - for iNdEx < postIndex { - var v Capability_Protocol - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Capability_Protocol(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HealthCheckProtocols = append(m.HealthCheckProtocols, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field HealthCheckProtocols", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *HealthCheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HealthCheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HealthCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Node == nil { - m.Node = &core.Node{} - } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capability", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Capability == nil { - m.Capability = &Capability{} - } - if err := m.Capability.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *EndpointHealth) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointHealth: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointHealth: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Endpoint == nil { - m.Endpoint = &endpoint.Endpoint{} - } - if err := m.Endpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthStatus", wireType) - } - m.HealthStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HealthStatus |= core.HealthStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *EndpointHealthResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointHealthResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointHealthResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndpointsHealth", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EndpointsHealth = append(m.EndpointsHealth, &EndpointHealth{}) - if err := m.EndpointsHealth[len(m.EndpointsHealth)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *HealthCheckRequestOrEndpointHealthResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HealthCheckRequestOrEndpointHealthResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HealthCheckRequestOrEndpointHealthResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthCheckRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &HealthCheckRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RequestType = &HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndpointHealthResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &EndpointHealthResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RequestType = &HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *LocalityEndpoints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalityEndpoints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalityEndpoints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locality", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Locality == nil { - m.Locality = &core.Locality{} - } - if err := m.Locality.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 ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoints = append(m.Endpoints, &endpoint.Endpoint{}) - if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *ClusterHealthCheck) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterHealthCheck: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterHealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthChecks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HealthChecks = append(m.HealthChecks, &core.HealthCheck{}) - if err := m.HealthChecks[len(m.HealthChecks)-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 LocalityEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LocalityEndpoints = append(m.LocalityEndpoints, &LocalityEndpoints{}) - if err := m.LocalityEndpoints[len(m.LocalityEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 *HealthCheckSpecifier) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HealthCheckSpecifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HealthCheckSpecifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterHealthChecks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterHealthChecks = append(m.ClusterHealthChecks, &ClusterHealthCheck{}) - if err := m.ClusterHealthChecks[len(m.ClusterHealthChecks)-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 Interval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Interval == nil { - m.Interval = &types.Duration{} - } - if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHds - } - 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 skipHds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHds - } - 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, ErrIntOverflowHds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHds - } - 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, ErrInvalidLengthHds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthHds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthHds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go index cad235e0dc..b0550d6c39 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/discovery/v2/hds.proto -package v2 +package envoy_service_discovery_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" ) @@ -32,11 +32,14 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} _ = core.HealthStatus(0) ) +// define the regex for a UUID once up-front +var _hds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on Capability with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *Capability) Validate() error { @@ -109,32 +112,22 @@ func (m *HealthCheckRequest) Validate() error { return nil } - { - tmp := m.GetNode() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, } } } - { - tmp := m.GetCapability() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckRequestValidationError{ - field: "Capability", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, } } } @@ -206,17 +199,12 @@ func (m *EndpointHealth) Validate() error { return nil } - { - tmp := m.GetEndpoint() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return EndpointHealthValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, } } } @@ -291,17 +279,12 @@ func (m *EndpointHealthResponse) Validate() error { for idx, item := range m.GetEndpointsHealth() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return EndpointHealthResponseValidationError{ - field: fmt.Sprintf("EndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -379,34 +362,24 @@ func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - { - tmp := m.GetHealthCheckRequest() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "HealthCheckRequest", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, } } } case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: - { - tmp := m.GetEndpointHealthResponse() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "EndpointHealthResponse", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, } } } @@ -481,17 +454,12 @@ func (m *LocalityEndpoints) Validate() error { return nil } - { - tmp := m.GetLocality() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return LocalityEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, } } } @@ -499,17 +467,12 @@ func (m *LocalityEndpoints) Validate() error { for idx, item := range m.GetEndpoints() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return LocalityEndpointsValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -588,17 +551,12 @@ func (m *ClusterHealthCheck) Validate() error { for idx, item := range m.GetHealthChecks() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterHealthCheckValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -608,17 +566,12 @@ func (m *ClusterHealthCheck) Validate() error { for idx, item := range m.GetLocalityEndpoints() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return ClusterHealthCheckValidationError{ - field: fmt.Sprintf("LocalityEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -695,34 +648,24 @@ func (m *HealthCheckSpecifier) Validate() error { for idx, item := range m.GetClusterHealthChecks() { _, _ = idx, item - { - tmp := item - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckSpecifierValidationError{ - field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - { - tmp := m.GetInterval() - - if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { - - if err := v.Validate(); err != nil { - return HealthCheckSpecifierValidationError{ - field: "Interval", - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, } } } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go new file mode 100644 index 0000000000..d989286450 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/service/discovery/v2/rtds.proto + +package envoy_service_discovery_v2 + +import ( + context "context" + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type RtdsDummy struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RtdsDummy) Reset() { *m = RtdsDummy{} } +func (m *RtdsDummy) String() string { return proto.CompactTextString(m) } +func (*RtdsDummy) ProtoMessage() {} +func (*RtdsDummy) Descriptor() ([]byte, []int) { + return fileDescriptor_60ef541a8dd8cfbb, []int{0} +} + +func (m *RtdsDummy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RtdsDummy.Unmarshal(m, b) +} +func (m *RtdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RtdsDummy.Marshal(b, m, deterministic) +} +func (m *RtdsDummy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RtdsDummy.Merge(m, src) +} +func (m *RtdsDummy) XXX_Size() int { + return xxx_messageInfo_RtdsDummy.Size(m) +} +func (m *RtdsDummy) XXX_DiscardUnknown() { + xxx_messageInfo_RtdsDummy.DiscardUnknown(m) +} + +var xxx_messageInfo_RtdsDummy proto.InternalMessageInfo + +type Runtime struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Layer *_struct.Struct `protobuf:"bytes,2,opt,name=layer,proto3" json:"layer,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Runtime) Reset() { *m = Runtime{} } +func (m *Runtime) String() string { return proto.CompactTextString(m) } +func (*Runtime) ProtoMessage() {} +func (*Runtime) Descriptor() ([]byte, []int) { + return fileDescriptor_60ef541a8dd8cfbb, []int{1} +} + +func (m *Runtime) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Runtime.Unmarshal(m, b) +} +func (m *Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Runtime.Marshal(b, m, deterministic) +} +func (m *Runtime) XXX_Merge(src proto.Message) { + xxx_messageInfo_Runtime.Merge(m, src) +} +func (m *Runtime) XXX_Size() int { + return xxx_messageInfo_Runtime.Size(m) +} +func (m *Runtime) XXX_DiscardUnknown() { + xxx_messageInfo_Runtime.DiscardUnknown(m) +} + +var xxx_messageInfo_Runtime proto.InternalMessageInfo + +func (m *Runtime) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Runtime) GetLayer() *_struct.Struct { + if m != nil { + return m.Layer + } + return nil +} + +func init() { + proto.RegisterType((*RtdsDummy)(nil), "envoy.service.discovery.v2.RtdsDummy") + proto.RegisterType((*Runtime)(nil), "envoy.service.discovery.v2.Runtime") +} + +func init() { + proto.RegisterFile("envoy/service/discovery/v2/rtds.proto", fileDescriptor_60ef541a8dd8cfbb) +} + +var fileDescriptor_60ef541a8dd8cfbb = []byte{ + // 444 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0x9d, 0xb5, 0x6d, 0xe8, 0xb4, 0x82, 0x2c, 0x48, 0xc2, 0x5a, 0x6b, 0x58, 0xab, 0x84, + 0x82, 0xb3, 0xb2, 0xbd, 0xf5, 0x18, 0x82, 0xe7, 0xb2, 0x41, 0xaf, 0x32, 0xd9, 0x7d, 0xc6, 0x81, + 0xec, 0xce, 0x3a, 0xf3, 0x66, 0x74, 0x6f, 0xe2, 0x49, 0xbc, 0x78, 0x10, 0xc4, 0x0f, 0xe0, 0xa7, + 0xf0, 0x13, 0x78, 0x15, 0xbf, 0x82, 0x9f, 0x40, 0x0f, 0x82, 0x07, 0x91, 0xcc, 0xec, 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x00, 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 + +// RuntimeDiscoveryServiceClient is the client API for RuntimeDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RuntimeDiscoveryServiceClient interface { + StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) + DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) + FetchRuntime(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) +} + +type runtimeDiscoveryServiceClient struct { + cc *grpc.ClientConn +} + +func NewRuntimeDiscoveryServiceClient(cc *grpc.ClientConn) RuntimeDiscoveryServiceClient { + return &runtimeDiscoveryServiceClient{cc} +} + +func (c *runtimeDiscoveryServiceClient) StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) { + stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.RuntimeDiscoveryService/StreamRuntime", opts...) + if err != nil { + return nil, err + } + x := &runtimeDiscoveryServiceStreamRuntimeClient{stream} + return x, nil +} + +type RuntimeDiscoveryService_StreamRuntimeClient interface { + Send(*v2.DiscoveryRequest) error + Recv() (*v2.DiscoveryResponse, error) + grpc.ClientStream +} + +type runtimeDiscoveryServiceStreamRuntimeClient struct { + grpc.ClientStream +} + +func (x *runtimeDiscoveryServiceStreamRuntimeClient) Send(m *v2.DiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceStreamRuntimeClient) Recv() (*v2.DiscoveryResponse, error) { + m := new(v2.DiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *runtimeDiscoveryServiceClient) DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) { + stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v2.RuntimeDiscoveryService/DeltaRuntime", opts...) + if err != nil { + return nil, err + } + x := &runtimeDiscoveryServiceDeltaRuntimeClient{stream} + return x, nil +} + +type RuntimeDiscoveryService_DeltaRuntimeClient interface { + Send(*v2.DeltaDiscoveryRequest) error + Recv() (*v2.DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type runtimeDiscoveryServiceDeltaRuntimeClient struct { + grpc.ClientStream +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Send(m *v2.DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Recv() (*v2.DeltaDiscoveryResponse, error) { + m := new(v2.DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *runtimeDiscoveryServiceClient) FetchRuntime(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) { + out := new(v2.DiscoveryResponse) + err := c.cc.Invoke(ctx, "/envoy.service.discovery.v2.RuntimeDiscoveryService/FetchRuntime", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RuntimeDiscoveryServiceServer is the server API for RuntimeDiscoveryService service. +type RuntimeDiscoveryServiceServer interface { + StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error + DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error + FetchRuntime(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) +} + +// UnimplementedRuntimeDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedRuntimeDiscoveryServiceServer struct { +} + +func (*UnimplementedRuntimeDiscoveryServiceServer) StreamRuntime(srv RuntimeDiscoveryService_StreamRuntimeServer) error { + return status.Errorf(codes.Unimplemented, "method StreamRuntime not implemented") +} +func (*UnimplementedRuntimeDiscoveryServiceServer) DeltaRuntime(srv RuntimeDiscoveryService_DeltaRuntimeServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaRuntime not implemented") +} +func (*UnimplementedRuntimeDiscoveryServiceServer) FetchRuntime(ctx context.Context, req *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchRuntime not implemented") +} + +func RegisterRuntimeDiscoveryServiceServer(s *grpc.Server, srv RuntimeDiscoveryServiceServer) { + s.RegisterService(&_RuntimeDiscoveryService_serviceDesc, srv) +} + +func _RuntimeDiscoveryService_StreamRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RuntimeDiscoveryServiceServer).StreamRuntime(&runtimeDiscoveryServiceStreamRuntimeServer{stream}) +} + +type RuntimeDiscoveryService_StreamRuntimeServer interface { + Send(*v2.DiscoveryResponse) error + Recv() (*v2.DiscoveryRequest, error) + grpc.ServerStream +} + +type runtimeDiscoveryServiceStreamRuntimeServer struct { + grpc.ServerStream +} + +func (x *runtimeDiscoveryServiceStreamRuntimeServer) Send(m *v2.DiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceStreamRuntimeServer) Recv() (*v2.DiscoveryRequest, error) { + m := new(v2.DiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _RuntimeDiscoveryService_DeltaRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RuntimeDiscoveryServiceServer).DeltaRuntime(&runtimeDiscoveryServiceDeltaRuntimeServer{stream}) +} + +type RuntimeDiscoveryService_DeltaRuntimeServer interface { + Send(*v2.DeltaDiscoveryResponse) error + Recv() (*v2.DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type runtimeDiscoveryServiceDeltaRuntimeServer struct { + grpc.ServerStream +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Send(m *v2.DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Recv() (*v2.DeltaDiscoveryRequest, error) { + m := new(v2.DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _RuntimeDiscoveryService_FetchRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v2.DiscoveryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.discovery.v2.RuntimeDiscoveryService/FetchRuntime", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, req.(*v2.DiscoveryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RuntimeDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.discovery.v2.RuntimeDiscoveryService", + HandlerType: (*RuntimeDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchRuntime", + Handler: _RuntimeDiscoveryService_FetchRuntime_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamRuntime", + Handler: _RuntimeDiscoveryService_StreamRuntime_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "DeltaRuntime", + Handler: _RuntimeDiscoveryService_DeltaRuntime_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/discovery/v2/rtds.proto", +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go new file mode 100644 index 0000000000..d5a60ab453 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/discovery/v2/rtds.proto + +package envoy_service_discovery_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _rtds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on RtdsDummy with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *RtdsDummy) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// RtdsDummyValidationError is the validation error returned by +// RtdsDummy.Validate if the designated constraints aren't met. +type RtdsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RtdsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RtdsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RtdsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RtdsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RtdsDummyValidationError) ErrorName() string { return "RtdsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e RtdsDummyValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRtdsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RtdsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RtdsDummyValidationError{} + +// Validate checks the field values on Runtime with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Runtime) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return RuntimeValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// RuntimeValidationError is the validation error returned by Runtime.Validate +// if the designated constraints aren't met. +type RuntimeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RuntimeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RuntimeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RuntimeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RuntimeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RuntimeValidationError) ErrorName() string { return "RuntimeValidationError" } + +// Error satisfies the builtin error interface +func (e RuntimeValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRuntime.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RuntimeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RuntimeValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go index 0f2598ea0a..dcfaa856cb 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go @@ -1,19 +1,20 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/discovery/v2/sds.proto -package v2 +package envoy_service_discovery_v2 import ( context "context" fmt "fmt" - io "io" - math "math" - - _ "github.com/gogo/googleapis/google/api" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" + 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" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,10 +26,8 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 type SdsDummy struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -41,26 +40,18 @@ func (*SdsDummy) ProtoMessage() {} func (*SdsDummy) Descriptor() ([]byte, []int) { return fileDescriptor_f2a4da2e99d9a3e6, []int{0} } + func (m *SdsDummy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_SdsDummy.Unmarshal(m, b) } func (m *SdsDummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SdsDummy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_SdsDummy.Marshal(b, m, deterministic) } func (m *SdsDummy) XXX_Merge(src proto.Message) { xxx_messageInfo_SdsDummy.Merge(m, src) } func (m *SdsDummy) XXX_Size() int { - return m.Size() + return xxx_messageInfo_SdsDummy.Size(m) } func (m *SdsDummy) XXX_DiscardUnknown() { xxx_messageInfo_SdsDummy.DiscardUnknown(m) @@ -77,24 +68,30 @@ func init() { } var fileDescriptor_f2a4da2e99d9a3e6 = []byte{ - // 262 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x90, 0xb1, 0x4a, 0xc4, 0x40, - 0x10, 0x86, 0x5d, 0x0b, 0x91, 0x45, 0x9b, 0x80, 0x16, 0xcb, 0x11, 0x25, 0x58, 0x1c, 0x16, 0x1b, - 0x89, 0xdd, 0x95, 0xe1, 0xb0, 0x3e, 0x0c, 0xd8, 0xaf, 0xc9, 0x70, 0x2e, 0x98, 0x9d, 0xbd, 0x9d, - 0xbd, 0xc5, 0xb4, 0xbe, 0x82, 0x2f, 0x65, 0x29, 0xf8, 0x02, 0x12, 0x7d, 0x10, 0x49, 0xf6, 0x3c, - 0xb1, 0xb8, 0xce, 0xfa, 0xff, 0xff, 0x6f, 0x86, 0x8f, 0x5f, 0x80, 0x09, 0xd8, 0xe5, 0x04, 0x2e, - 0xe8, 0x1a, 0xf2, 0x46, 0x53, 0x8d, 0x01, 0x5c, 0x97, 0x87, 0x22, 0xa7, 0x86, 0xa4, 0x75, 0xe8, - 0x31, 0x11, 0x63, 0x4b, 0x6e, 0x5a, 0x72, 0xdb, 0x92, 0xa1, 0x10, 0x93, 0x48, 0x50, 0x56, 0x0f, - 0x9b, 0xdf, 0x68, 0x5c, 0x8a, 0xc9, 0x12, 0x71, 0xf9, 0x08, 0x63, 0xac, 0x8c, 0x41, 0xaf, 0xbc, - 0x46, 0xb3, 0xe1, 0x66, 0x9c, 0x1f, 0x56, 0x0d, 0xcd, 0xd7, 0x6d, 0xdb, 0x15, 0x9f, 0x8c, 0x9f, - 0x56, 0x50, 0x3b, 0xf0, 0xf3, 0x1f, 0x46, 0x15, 0xef, 0x25, 0x77, 0xfc, 0xb8, 0xf2, 0x0e, 0x54, - 0x1b, 0x73, 0x4a, 0x52, 0x19, 0x1f, 0x52, 0x56, 0xcb, 0x50, 0xc8, 0xed, 0xe0, 0x16, 0x56, 0x6b, - 0x20, 0x2f, 0xce, 0x76, 0xe6, 0x64, 0xd1, 0x10, 0x64, 0x7b, 0x53, 0x76, 0xc5, 0x92, 0x15, 0x3f, - 0xba, 0x01, 0x5f, 0x3f, 0xfc, 0x1b, 0xf6, 0xfc, 0xf9, 0xfd, 0xeb, 0x65, 0x5f, 0x64, 0x27, 0x7f, - 0x54, 0xcc, 0x28, 0xf2, 0x67, 0xec, 0xb2, 0x2c, 0x5f, 0xfb, 0x94, 0xbd, 0xf5, 0x29, 0xfb, 0xe8, - 0x53, 0xc6, 0xa7, 0x1a, 0x23, 0xd2, 0x3a, 0x7c, 0xea, 0xe4, 0x6e, 0xcb, 0xe5, 0xe0, 0x69, 0x31, - 0x38, 0x5b, 0xb0, 0xfb, 0x83, 0x51, 0xde, 0xf5, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0xfe, - 0x01, 0x55, 0xbc, 0x01, 0x00, 0x00, + // 362 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xb1, 0x4a, 0xc3, 0x40, + 0x18, 0xc7, 0x4d, 0xc5, 0x2a, 0x47, 0x05, 0x09, 0x68, 0x35, 0xd4, 0x5a, 0x6a, 0x91, 0xe2, 0x70, + 0x91, 0x74, 0xeb, 0x58, 0x8a, 0x73, 0x31, 0xe0, 0xaa, 0x67, 0xf2, 0xd1, 0x1e, 0x34, 0xb9, 0x78, + 0x77, 0x39, 0xcd, 0x26, 0x4e, 0xe2, 0xe2, 0x20, 0x88, 0x0f, 0xe0, 0x53, 0xf8, 0x04, 0xae, 0xe2, + 0x2b, 0x38, 0x3a, 0xe9, 0x2e, 0xd2, 0x5c, 0xda, 0x92, 0x4a, 0x9d, 0x9c, 0x7f, 0xff, 0xff, 0xef, + 0xbe, 0xe3, 0xfb, 0x50, 0x03, 0x42, 0xc5, 0x12, 0x5b, 0x00, 0x57, 0xd4, 0x03, 0xdb, 0xa7, 0xc2, + 0x63, 0x0a, 0x78, 0x62, 0x2b, 0xc7, 0x16, 0xbe, 0xc0, 0x11, 0x67, 0x92, 0x99, 0x56, 0x9a, 0xc2, + 0x59, 0x0a, 0x4f, 0x52, 0x58, 0x39, 0x56, 0x45, 0x1b, 0x48, 0x44, 0x47, 0x9d, 0x29, 0x4a, 0x9b, + 0x56, 0xa5, 0xcf, 0x58, 0x7f, 0x08, 0x29, 0x26, 0x61, 0xc8, 0x24, 0x91, 0x94, 0x85, 0x99, 0xd7, + 0xaa, 0x65, 0xdd, 0x29, 0xb0, 0x39, 0x08, 0x16, 0x73, 0x0f, 0xb2, 0x44, 0x35, 0xf6, 0x23, 0x92, + 0x0b, 0x04, 0xb4, 0xcf, 0x89, 0x1c, 0xf3, 0xed, 0x5f, 0x5c, 0x48, 0x22, 0xe3, 0xec, 0x81, 0x3a, + 0x42, 0x2b, 0xae, 0x2f, 0xba, 0x71, 0x10, 0x24, 0xce, 0x47, 0x01, 0x6d, 0xb8, 0xe0, 0x71, 0x90, + 0xdd, 0xf1, 0x90, 0xae, 0xfe, 0x90, 0x79, 0x82, 0x4a, 0x5d, 0x18, 0x4a, 0xa2, 0xb1, 0x30, 0x77, + 0xb1, 0xfe, 0x30, 0x89, 0x28, 0x56, 0x0e, 0x4e, 0xd9, 0xa4, 0x74, 0x04, 0xe7, 0x31, 0x08, 0x69, + 0x35, 0xfe, 0x0e, 0x89, 0x88, 0x85, 0x02, 0xea, 0x0b, 0x4d, 0xe3, 0xc0, 0x30, 0x8f, 0xd1, 0xaa, + 0x2b, 0x39, 0x90, 0x60, 0xfc, 0x42, 0x75, 0xa6, 0x3c, 0x2b, 0xdf, 0x99, 0xcb, 0x73, 0xde, 0x0b, + 0x54, 0x3a, 0x04, 0xe9, 0x0d, 0xfe, 0x4d, 0xbb, 0x77, 0xfd, 0xf6, 0x7e, 0x5f, 0x28, 0xd7, 0xd7, + 0x73, 0xcb, 0x6c, 0x0b, 0xed, 0x4f, 0xe1, 0x62, 0xdb, 0xd8, 0xb7, 0x6a, 0xb7, 0x4f, 0x0f, 0x5f, + 0xcb, 0x16, 0xda, 0xcc, 0xf9, 0x48, 0x2c, 0x07, 0x58, 0xcf, 0xd2, 0x39, 0xfd, 0x7c, 0xfc, 0xbe, + 0x5b, 0xda, 0x32, 0xcb, 0xf9, 0xdb, 0xd1, 0x26, 0xac, 0x5a, 0xcf, 0x57, 0x2f, 0xaf, 0xc5, 0xc2, + 0x9a, 0x81, 0x9a, 0x94, 0xe9, 0xa9, 0x22, 0xce, 0x2e, 0x13, 0x3c, 0xff, 0xd4, 0x3a, 0xa3, 0x5d, + 0xf6, 0x46, 0x7b, 0xed, 0x19, 0x37, 0x86, 0x71, 0x56, 0x4c, 0x77, 0xdc, 0xfa, 0x09, 0x00, 0x00, + 0xff, 0xff, 0x32, 0x5d, 0xb1, 0xc7, 0xc4, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -109,6 +106,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type SecretDiscoveryServiceClient interface { + DeltaSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_DeltaSecretsClient, error) StreamSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_StreamSecretsClient, error) FetchSecrets(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) } @@ -121,8 +119,39 @@ func NewSecretDiscoveryServiceClient(cc *grpc.ClientConn) SecretDiscoveryService return &secretDiscoveryServiceClient{cc} } +func (c *secretDiscoveryServiceClient) DeltaSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_DeltaSecretsClient, error) { + stream, err := c.cc.NewStream(ctx, &_SecretDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.SecretDiscoveryService/DeltaSecrets", opts...) + if err != nil { + return nil, err + } + x := &secretDiscoveryServiceDeltaSecretsClient{stream} + return x, nil +} + +type SecretDiscoveryService_DeltaSecretsClient interface { + Send(*v2.DeltaDiscoveryRequest) error + Recv() (*v2.DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type secretDiscoveryServiceDeltaSecretsClient struct { + grpc.ClientStream +} + +func (x *secretDiscoveryServiceDeltaSecretsClient) Send(m *v2.DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *secretDiscoveryServiceDeltaSecretsClient) Recv() (*v2.DeltaDiscoveryResponse, error) { + m := new(v2.DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *secretDiscoveryServiceClient) StreamSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_StreamSecretsClient, error) { - stream, err := c.cc.NewStream(ctx, &_SecretDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.SecretDiscoveryService/StreamSecrets", opts...) + stream, err := c.cc.NewStream(ctx, &_SecretDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v2.SecretDiscoveryService/StreamSecrets", opts...) if err != nil { return nil, err } @@ -163,14 +192,55 @@ func (c *secretDiscoveryServiceClient) FetchSecrets(ctx context.Context, in *v2. // SecretDiscoveryServiceServer is the server API for SecretDiscoveryService service. type SecretDiscoveryServiceServer interface { + DeltaSecrets(SecretDiscoveryService_DeltaSecretsServer) error StreamSecrets(SecretDiscoveryService_StreamSecretsServer) error FetchSecrets(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) } +// UnimplementedSecretDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedSecretDiscoveryServiceServer struct { +} + +func (*UnimplementedSecretDiscoveryServiceServer) DeltaSecrets(srv SecretDiscoveryService_DeltaSecretsServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaSecrets not implemented") +} +func (*UnimplementedSecretDiscoveryServiceServer) StreamSecrets(srv SecretDiscoveryService_StreamSecretsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamSecrets not implemented") +} +func (*UnimplementedSecretDiscoveryServiceServer) FetchSecrets(ctx context.Context, req *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchSecrets not implemented") +} + func RegisterSecretDiscoveryServiceServer(s *grpc.Server, srv SecretDiscoveryServiceServer) { s.RegisterService(&_SecretDiscoveryService_serviceDesc, srv) } +func _SecretDiscoveryService_DeltaSecrets_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(SecretDiscoveryServiceServer).DeltaSecrets(&secretDiscoveryServiceDeltaSecretsServer{stream}) +} + +type SecretDiscoveryService_DeltaSecretsServer interface { + Send(*v2.DeltaDiscoveryResponse) error + Recv() (*v2.DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type secretDiscoveryServiceDeltaSecretsServer struct { + grpc.ServerStream +} + +func (x *secretDiscoveryServiceDeltaSecretsServer) Send(m *v2.DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *secretDiscoveryServiceDeltaSecretsServer) Recv() (*v2.DeltaDiscoveryRequest, error) { + m := new(v2.DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _SecretDiscoveryService_StreamSecrets_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(SecretDiscoveryServiceServer).StreamSecrets(&secretDiscoveryServiceStreamSecretsServer{stream}) } @@ -225,6 +295,12 @@ var _SecretDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{ + { + StreamName: "DeltaSecrets", + Handler: _SecretDiscoveryService_DeltaSecrets_Handler, + ServerStreams: true, + ClientStreams: true, + }, { StreamName: "StreamSecrets", Handler: _SecretDiscoveryService_StreamSecrets_Handler, @@ -234,223 +310,3 @@ var _SecretDiscoveryService_serviceDesc = grpc.ServiceDesc{ }, Metadata: "envoy/service/discovery/v2/sds.proto", } - -func (m *SdsDummy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SdsDummy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintSds(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *SdsDummy) 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 sovSds(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozSds(x uint64) (n int) { - return sovSds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SdsDummy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SdsDummy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SdsDummy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipSds(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSds - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSds - } - 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 skipSds(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSds - } - 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, ErrIntOverflowSds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSds - } - 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, ErrInvalidLengthSds - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthSds - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSds - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSds(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthSds - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthSds = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSds = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go index 49b7877865..ee6071e109 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. // source: envoy/service/discovery/v2/sds.proto -package v2 +package envoy_service_discovery_v2 import ( "bytes" @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _sds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on SdsDummy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *SdsDummy) Validate() error { diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.go new file mode 100644 index 0000000000..7f8dec75cb --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/hash_policy.proto + +package envoy_type + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type HashPolicy struct { + // Types that are valid to be assigned to PolicySpecifier: + // *HashPolicy_SourceIp_ + PolicySpecifier isHashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HashPolicy) Reset() { *m = HashPolicy{} } +func (m *HashPolicy) String() string { return proto.CompactTextString(m) } +func (*HashPolicy) ProtoMessage() {} +func (*HashPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_b409d49e989a073d, []int{0} +} + +func (m *HashPolicy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HashPolicy.Unmarshal(m, b) +} +func (m *HashPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HashPolicy.Marshal(b, m, deterministic) +} +func (m *HashPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_HashPolicy.Merge(m, src) +} +func (m *HashPolicy) XXX_Size() int { + return xxx_messageInfo_HashPolicy.Size(m) +} +func (m *HashPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_HashPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_HashPolicy proto.InternalMessageInfo + +type isHashPolicy_PolicySpecifier interface { + isHashPolicy_PolicySpecifier() +} + +type HashPolicy_SourceIp_ struct { + SourceIp *HashPolicy_SourceIp `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp,proto3,oneof"` +} + +func (*HashPolicy_SourceIp_) isHashPolicy_PolicySpecifier() {} + +func (m *HashPolicy) GetPolicySpecifier() isHashPolicy_PolicySpecifier { + if m != nil { + return m.PolicySpecifier + } + return nil +} + +func (m *HashPolicy) GetSourceIp() *HashPolicy_SourceIp { + if x, ok := m.GetPolicySpecifier().(*HashPolicy_SourceIp_); ok { + return x.SourceIp + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HashPolicy) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HashPolicy_SourceIp_)(nil), + } +} + +type HashPolicy_SourceIp struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HashPolicy_SourceIp) Reset() { *m = HashPolicy_SourceIp{} } +func (m *HashPolicy_SourceIp) String() string { return proto.CompactTextString(m) } +func (*HashPolicy_SourceIp) ProtoMessage() {} +func (*HashPolicy_SourceIp) Descriptor() ([]byte, []int) { + return fileDescriptor_b409d49e989a073d, []int{0, 0} +} + +func (m *HashPolicy_SourceIp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HashPolicy_SourceIp.Unmarshal(m, b) +} +func (m *HashPolicy_SourceIp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HashPolicy_SourceIp.Marshal(b, m, deterministic) +} +func (m *HashPolicy_SourceIp) XXX_Merge(src proto.Message) { + xxx_messageInfo_HashPolicy_SourceIp.Merge(m, src) +} +func (m *HashPolicy_SourceIp) XXX_Size() int { + return xxx_messageInfo_HashPolicy_SourceIp.Size(m) +} +func (m *HashPolicy_SourceIp) XXX_DiscardUnknown() { + xxx_messageInfo_HashPolicy_SourceIp.DiscardUnknown(m) +} + +var xxx_messageInfo_HashPolicy_SourceIp proto.InternalMessageInfo + +func init() { + proto.RegisterType((*HashPolicy)(nil), "envoy.type.HashPolicy") + proto.RegisterType((*HashPolicy_SourceIp)(nil), "envoy.type.HashPolicy.SourceIp") +} + +func init() { proto.RegisterFile("envoy/type/hash_policy.proto", fileDescriptor_b409d49e989a073d) } + +var fileDescriptor_b409d49e989a073d = []byte{ + // 219 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x48, 0x2c, 0xce, 0x88, 0x2f, 0xc8, 0xcf, 0xc9, + 0x4c, 0xae, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0xcb, 0xea, 0x81, 0x64, 0xa5, + 0x64, 0x4b, 0x53, 0x0a, 0x12, 0xf5, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, + 0x8a, 0xf5, 0x8b, 0x4b, 0x12, 0x4b, 0x4a, 0x8b, 0x21, 0x4a, 0xa5, 0xc4, 0xcb, 0x12, 0x73, 0x32, + 0x53, 0x12, 0x4b, 0x52, 0xf5, 0x61, 0x0c, 0x88, 0x84, 0x52, 0x21, 0x17, 0x97, 0x47, 0x62, 0x71, + 0x46, 0x00, 0xd8, 0x5c, 0x21, 0x3b, 0x2e, 0xce, 0xe2, 0xfc, 0xd2, 0xa2, 0xe4, 0xd4, 0xf8, 0xcc, + 0x02, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x79, 0x3d, 0x84, 0x2d, 0x7a, 0x08, 0xa5, 0x7a, + 0xc1, 0x60, 0x75, 0x9e, 0x05, 0x1e, 0x0c, 0x41, 0x1c, 0xc5, 0x50, 0xb6, 0x14, 0x17, 0x17, 0x07, + 0x4c, 0xdc, 0x49, 0x9c, 0x4b, 0x00, 0xe2, 0xda, 0xf8, 0xe2, 0x82, 0xd4, 0xe4, 0xcc, 0xb4, 0xcc, + 0xd4, 0x22, 0x21, 0xe6, 0x1f, 0x4e, 0x8c, 0x4e, 0xa6, 0xbb, 0x1a, 0x4e, 0x5c, 0x64, 0x63, 0x12, + 0x60, 0xe4, 0x92, 0xc8, 0xcc, 0x87, 0x98, 0x5e, 0x50, 0x94, 0x5f, 0x51, 0x89, 0x64, 0x91, 0x13, + 0x3f, 0xc2, 0xa6, 0x00, 0x90, 0x3b, 0x03, 0x18, 0x93, 0xd8, 0xc0, 0x0e, 0x36, 0x06, 0x04, 0x00, + 0x00, 0xff, 0xff, 0xac, 0xf3, 0x7d, 0x5a, 0x14, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.validate.go new file mode 100644 index 0000000000..d44efa6b28 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/hash_policy.pb.validate.go @@ -0,0 +1,190 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/hash_policy.proto + +package envoy_type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _hash_policy_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on HashPolicy with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *HashPolicy) Validate() error { + if m == nil { + return nil + } + + switch m.PolicySpecifier.(type) { + + case *HashPolicy_SourceIp_: + + 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, + } + } + } + + default: + return HashPolicyValidationError{ + field: "PolicySpecifier", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error is returned. +func (m *HashPolicy_SourceIp) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.go new file mode 100644 index 0000000000..03d735b712 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.go @@ -0,0 +1,71 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/http.proto + +package envoy_type + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type CodecClientType int32 + +const ( + CodecClientType_HTTP1 CodecClientType = 0 + CodecClientType_HTTP2 CodecClientType = 1 + CodecClientType_HTTP3 CodecClientType = 2 +) + +var CodecClientType_name = map[int32]string{ + 0: "HTTP1", + 1: "HTTP2", + 2: "HTTP3", +} + +var CodecClientType_value = map[string]int32{ + "HTTP1": 0, + "HTTP2": 1, + "HTTP3": 2, +} + +func (x CodecClientType) String() string { + return proto.EnumName(CodecClientType_name, int32(x)) +} + +func (CodecClientType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e223f71709aae71c, []int{0} +} + +func init() { + proto.RegisterEnum("envoy.type.CodecClientType", CodecClientType_name, CodecClientType_value) +} + +func init() { proto.RegisterFile("envoy/type/http.proto", fileDescriptor_e223f71709aae71c) } + +var fileDescriptor_e223f71709aae71c = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x28, 0x29, 0x29, 0xd0, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x02, 0x0b, 0xeb, 0x81, 0x84, 0xa5, 0x64, 0x4b, 0x53, 0x0a, 0x12, 0xf5, 0x13, + 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0xf5, 0x8b, 0x4b, 0x12, 0x4b, 0x4a, + 0x8b, 0x21, 0x4a, 0xb5, 0x8c, 0xb8, 0xf8, 0x9d, 0xf3, 0x53, 0x52, 0x93, 0x9d, 0x73, 0x32, 0x53, + 0xf3, 0x4a, 0x42, 0x2a, 0x0b, 0x52, 0x85, 0x38, 0xb9, 0x58, 0x3d, 0x42, 0x42, 0x02, 0x0c, 0x05, + 0x18, 0x60, 0x4c, 0x23, 0x01, 0x46, 0x18, 0xd3, 0x58, 0x80, 0xc9, 0x49, 0x7f, 0x57, 0xc3, 0x89, + 0x8b, 0x6c, 0x4c, 0x02, 0x8c, 0x5c, 0x12, 0x99, 0xf9, 0x7a, 0x60, 0xbb, 0x0a, 0x8a, 0xf2, 0x2b, + 0x2a, 0xf5, 0x10, 0xd6, 0x3a, 0x71, 0x7a, 0x94, 0x94, 0x14, 0x04, 0x80, 0xac, 0x08, 0x60, 0x4c, + 0x62, 0x03, 0xdb, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xbe, 0x34, 0x37, 0xaf, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.validate.go new file mode 100644 index 0000000000..541c67c446 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http.pb.validate.go @@ -0,0 +1,37 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/http.proto + +package envoy_type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _http_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.go index 2f8bbdc4d0..abdc6ba5aa 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.go @@ -1,15 +1,14 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/type/http_status.proto package envoy_type import ( fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/gogo/protobuf/proto" + proto "github.com/golang/protobuf/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -21,15 +20,11 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// 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 @@ -217,9 +212,7 @@ func (StatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_7544d7adacd3389b, []int{0} } -// HTTP status. type HttpStatus struct { - // Supplies HTTP response code. Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.type.StatusCode" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -232,26 +225,18 @@ func (*HttpStatus) ProtoMessage() {} func (*HttpStatus) Descriptor() ([]byte, []int) { return fileDescriptor_7544d7adacd3389b, []int{0} } + func (m *HttpStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_HttpStatus.Unmarshal(m, b) } func (m *HttpStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_HttpStatus.Marshal(b, m, deterministic) } func (m *HttpStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_HttpStatus.Merge(m, src) } func (m *HttpStatus) XXX_Size() int { - return m.Size() + return xxx_messageInfo_HttpStatus.Size(m) } func (m *HttpStatus) XXX_DiscardUnknown() { xxx_messageInfo_HttpStatus.DiscardUnknown(m) @@ -274,311 +259,64 @@ func init() { func init() { proto.RegisterFile("envoy/type/http_status.proto", fileDescriptor_7544d7adacd3389b) } var fileDescriptor_7544d7adacd3389b = []byte{ - // 931 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x49, 0x73, 0x5b, 0x45, - 0x10, 0xce, 0xd3, 0x64, 0xf3, 0x64, 0xeb, 0x4c, 0x9c, 0xd8, 0x84, 0xe0, 0x72, 0xe5, 0x44, 0x71, - 0xb0, 0xab, 0xe0, 0xc4, 0x0d, 0xdb, 0xb1, 0x63, 0x17, 0x96, 0xa2, 0x92, 0xa5, 0x5c, 0xa9, 0xf1, - 0x9b, 0x96, 0x34, 0x95, 0xa7, 0xe9, 0x97, 0x79, 0x2d, 0xd9, 0x8f, 0x23, 0xbf, 0x80, 0x7d, 0x5f, - 0x0f, 0x2c, 0x45, 0x25, 0x04, 0x0a, 0xb8, 0x70, 0xe2, 0x18, 0xf6, 0xfc, 0x04, 0xca, 0x37, 0xee, - 0xec, 0x50, 0x40, 0xcd, 0x68, 0xb1, 0x2f, 0xdc, 0xf4, 0x7a, 0x7a, 0xf9, 0x96, 0x56, 0xcb, 0x4b, - 0xe8, 0x06, 0x54, 0x2e, 0x72, 0x99, 0xe3, 0x62, 0x97, 0x39, 0x7f, 0xa2, 0x60, 0xcd, 0xfd, 0x62, - 0x21, 0xf7, 0xc4, 0xa4, 0x64, 0x7c, 0x5d, 0x08, 0xaf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, 0x82, - 0x1c, 0x2d, 0x80, 0xbf, 0xc5, 0xe8, 0xcf, 0xb5, 0xba, 0xcb, 0x41, 0x51, 0x03, 0xff, 0x08, 0x75, - 0x59, 0x3e, 0x50, 0x43, 0xde, 0x21, 0x7f, 0xe3, 0x7f, 0x76, 0xf3, 0x5f, 0xb1, 0xfc, 0xe8, 0xdd, - 0xbd, 0xb9, 0xe4, 0xde, 0xde, 0x5c, 0xf2, 0xe3, 0xde, 0x5c, 0x22, 0x67, 0x2d, 0x0d, 0x6f, 0x5f, - 0x1e, 0x36, 0xfa, 0xc0, 0x19, 0x5c, 0x3e, 0xb3, 0x7f, 0x2d, 0xeb, 0xe1, 0x80, 0xd6, 0x93, 0xed, - 0xa3, 0xf1, 0x92, 0x3e, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xca, 0xec, 0x2e, 0x8e, - 0x05, 0x00, 0x00, + // 936 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x4e, 0x4f, 0x3b, 0x76, 0x5c, 0x71, 0xec, 0x97, 0xca, 0x62, 0x63, 0x12, 0xc9, 0xca, 0x09, + 0x71, 0xb0, 0x25, 0x10, 0xdc, 0xbd, 0xc6, 0x16, 0x9e, 0xc9, 0x68, 0x3c, 0x93, 0x2b, 0x2a, 0x77, + 0xbd, 0x99, 0x29, 0xa5, 0xa7, 0x5e, 0xa7, 0xfa, 0xf5, 0xd8, 0xcd, 0x09, 0xf1, 0x0b, 0xd8, 0xf7, + 0xf5, 0xc0, 0x22, 0x94, 0x10, 0x10, 0x70, 0xe1, 0x17, 0x84, 0x1d, 0xfe, 0x02, 0xbf, 0x81, 0x35, + 0x20, 0x40, 0x55, 0xb3, 0xd8, 0x97, 0xdc, 0x66, 0x5e, 0xbd, 0xe5, 0x5b, 0x5e, 0x3f, 0x71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 0x59, 0x5e, 0x4d, 0x73, 0xaa, 0x61, 0x87, 0xd8, + 0x28, 0xc6, 0x1c, 0xee, 0x0d, 0x71, 0xe6, 0x45, 0xbb, 0x6d, 0x12, 0x83, 0x96, 0xf7, 0x98, 0x9c, + 0xea, 0x20, 0xfc, 0x1d, 0xf6, 0x7c, 0x97, 0x28, 0xdb, 0x40, 0x0e, 0x16, 0xc0, 0x3f, 0xf1, 0xf0, + 0xe3, 0xda, 0x3c, 0x64, 0xaf, 0xa8, 0x86, 0x7f, 0x63, 0x79, 0x45, 0x5c, 0xae, 0x21, 0x1f, 0x90, + 0xbb, 0x71, 0x9f, 0xdd, 0xfc, 0x2f, 0x5e, 0x7b, 0xec, 0xab, 0xa7, 0xef, 0xfe, 0x3c, 0x59, 0x81, + 0x48, 0x2c, 0x18, 0x1a, 0x5c, 0xbb, 0xcc, 0x6f, 0xf3, 0xb1, 0xc3, 0xb7, 0x36, 0x77, 0x74, 0x1f, + 0xeb, 0xfe, 0x64, 0xd6, 0xa3, 0xfd, 0xc9, 0x70, 0x3b, 0x1f, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, + 0x93, 0x0c, 0x30, 0xee, 0x9f, 0x05, 0x00, 0x00, } - -func (m *HttpStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Code != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintHttpStatus(dAtA, i, uint64(m.Code)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintHttpStatus(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *HttpStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovHttpStatus(uint64(m.Code)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovHttpStatus(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozHttpStatus(x uint64) (n int) { - return sovHttpStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *HttpStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttpStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= StatusCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHttpStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttpStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthHttpStatus - } - 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 skipHttpStatus(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpStatus - } - 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, ErrIntOverflowHttpStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpStatus - } - 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, ErrInvalidLengthHttpStatus - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpStatus - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttpStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHttpStatus(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpStatus - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHttpStatus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttpStatus = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.validate.go index 481658733e..5c05d3c7a3 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http_status.pb.validate.go @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _http_status_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on HttpStatus with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *HttpStatus) Validate() error { @@ -40,6 +43,13 @@ func (m *HttpStatus) Validate() error { return nil } + if _, ok := _HttpStatus_Code_NotInLookup[m.GetCode()]; ok { + return HttpStatusValidationError{ + field: "Code", + reason: "value must not be in list [0]", + } + } + if _, ok := StatusCode_name[int32(m.GetCode())]; !ok { return HttpStatusValidationError{ field: "Code", @@ -103,3 +113,7 @@ var _ interface { Cause() error ErrorName() string } = HttpStatusValidationError{} + +var _HttpStatus_Code_NotInLookup = map[StatusCode]struct{}{ + 0: {}, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.go new file mode 100644 index 0000000000..e7c819644f --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.go @@ -0,0 +1,173 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/metadata.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type MetadataMatcher struct { + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` + Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataMatcher) Reset() { *m = MetadataMatcher{} } +func (m *MetadataMatcher) String() string { return proto.CompactTextString(m) } +func (*MetadataMatcher) ProtoMessage() {} +func (*MetadataMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_865eaf6a1e9e266d, []int{0} +} + +func (m *MetadataMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataMatcher.Unmarshal(m, b) +} +func (m *MetadataMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataMatcher.Marshal(b, m, deterministic) +} +func (m *MetadataMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataMatcher.Merge(m, src) +} +func (m *MetadataMatcher) XXX_Size() int { + return xxx_messageInfo_MetadataMatcher.Size(m) +} +func (m *MetadataMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataMatcher proto.InternalMessageInfo + +func (m *MetadataMatcher) GetFilter() string { + if m != nil { + return m.Filter + } + return "" +} + +func (m *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment { + if m != nil { + return m.Path + } + return nil +} + +func (m *MetadataMatcher) GetValue() *ValueMatcher { + if m != nil { + return m.Value + } + return nil +} + +type MetadataMatcher_PathSegment struct { + // Types that are valid to be assigned to Segment: + // *MetadataMatcher_PathSegment_Key + Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataMatcher_PathSegment) Reset() { *m = MetadataMatcher_PathSegment{} } +func (m *MetadataMatcher_PathSegment) String() string { return proto.CompactTextString(m) } +func (*MetadataMatcher_PathSegment) ProtoMessage() {} +func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) { + return fileDescriptor_865eaf6a1e9e266d, []int{0, 0} +} + +func (m *MetadataMatcher_PathSegment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataMatcher_PathSegment.Unmarshal(m, b) +} +func (m *MetadataMatcher_PathSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataMatcher_PathSegment.Marshal(b, m, deterministic) +} +func (m *MetadataMatcher_PathSegment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataMatcher_PathSegment.Merge(m, src) +} +func (m *MetadataMatcher_PathSegment) XXX_Size() int { + return xxx_messageInfo_MetadataMatcher_PathSegment.Size(m) +} +func (m *MetadataMatcher_PathSegment) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataMatcher_PathSegment.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataMatcher_PathSegment proto.InternalMessageInfo + +type isMetadataMatcher_PathSegment_Segment interface { + isMetadataMatcher_PathSegment_Segment() +} + +type MetadataMatcher_PathSegment_Key struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` +} + +func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {} + +func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment { + if m != nil { + return m.Segment + } + return nil +} + +func (m *MetadataMatcher_PathSegment) GetKey() string { + if x, ok := m.GetSegment().(*MetadataMatcher_PathSegment_Key); ok { + return x.Key + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MetadataMatcher_PathSegment) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MetadataMatcher_PathSegment_Key)(nil), + } +} + +func init() { + proto.RegisterType((*MetadataMatcher)(nil), "envoy.type.matcher.MetadataMatcher") + proto.RegisterType((*MetadataMatcher_PathSegment)(nil), "envoy.type.matcher.MetadataMatcher.PathSegment") +} + +func init() { proto.RegisterFile("envoy/type/matcher/metadata.proto", fileDescriptor_865eaf6a1e9e266d) } + +var fileDescriptor_865eaf6a1e9e266d = []byte{ + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x4f, 0xc3, 0x30, + 0x10, 0xc5, 0xb9, 0xa4, 0xff, 0x70, 0x05, 0x54, 0x5e, 0xa8, 0x8a, 0x00, 0xc3, 0xd4, 0xc9, 0x96, + 0xca, 0x06, 0x0b, 0xf2, 0xc4, 0x52, 0xa9, 0x0a, 0x12, 0xfb, 0x41, 0x0d, 0x8d, 0x68, 0xe3, 0x28, + 0xb9, 0x44, 0x64, 0x63, 0x66, 0xe4, 0xe3, 0xf0, 0x09, 0x58, 0xf9, 0x36, 0xa8, 0x0b, 0x28, 0x89, + 0x2b, 0xa1, 0x92, 0xcd, 0xf2, 0xbd, 0xf7, 0x7b, 0xef, 0x8e, 0x9d, 0x99, 0x28, 0xb7, 0x85, 0xa2, + 0x22, 0x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x37, 0x00, 0x26, 0x42, 0x5b, 0x47, 0xc7, + 0x89, 0x7d, 0x29, 0x1a, 0x5a, 0xe8, 0xbd, 0xcd, 0x5a, 0xb3, 0xf2, 0x78, 0x33, 0xb8, 0xef, 0x54, + 0x57, 0xbc, 0xf8, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x76, 0x5a, 0x88, 0xd6, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.validate.go new file mode 100644 index 0000000000..f3e9b23c14 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/metadata.pb.validate.go @@ -0,0 +1,235 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/metadata.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _metadata_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on MetadataMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *MetadataMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetFilter()) < 1 { + return MetadataMatcherValidationError{ + field: "Filter", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetPath()) < 1 { + return MetadataMatcherValidationError{ + field: "Path", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetPath() { + _, _ = idx, item + + 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 { + return MetadataMatcherValidationError{ + field: "Value", + reason: "value is required", + } + } + + 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, + } + } + } + + return nil +} + +// 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, an error is returned. +func (m *MetadataMatcher_PathSegment) Validate() error { + if m == nil { + return nil + } + + switch m.Segment.(type) { + + case *MetadataMatcher_PathSegment_Key: + + if len(m.GetKey()) < 1 { + return MetadataMatcher_PathSegmentValidationError{ + field: "Key", + reason: "value length must be at least 1 bytes", + } + } + + default: + return MetadataMatcher_PathSegmentValidationError{ + field: "Segment", + reason: "value is required", + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.go new file mode 100644 index 0000000000..3b1e6b5c2d --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.go @@ -0,0 +1,94 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/node.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type NodeMatcher struct { + NodeId *StringMatcher `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodeMetadatas []*StructMatcher `protobuf:"bytes,2,rep,name=node_metadatas,json=nodeMetadatas,proto3" json:"node_metadatas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeMatcher) Reset() { *m = NodeMatcher{} } +func (m *NodeMatcher) String() string { return proto.CompactTextString(m) } +func (*NodeMatcher) ProtoMessage() {} +func (*NodeMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_c20314fb2f725fb2, []int{0} +} + +func (m *NodeMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NodeMatcher.Unmarshal(m, b) +} +func (m *NodeMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NodeMatcher.Marshal(b, m, deterministic) +} +func (m *NodeMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeMatcher.Merge(m, src) +} +func (m *NodeMatcher) XXX_Size() int { + return xxx_messageInfo_NodeMatcher.Size(m) +} +func (m *NodeMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_NodeMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeMatcher proto.InternalMessageInfo + +func (m *NodeMatcher) GetNodeId() *StringMatcher { + if m != nil { + return m.NodeId + } + return nil +} + +func (m *NodeMatcher) GetNodeMetadatas() []*StructMatcher { + if m != nil { + return m.NodeMetadatas + } + return nil +} + +func init() { + proto.RegisterType((*NodeMatcher)(nil), "envoy.type.matcher.NodeMatcher") +} + +func init() { proto.RegisterFile("envoy/type/matcher/node.proto", fileDescriptor_c20314fb2f725fb2) } + +var fileDescriptor_c20314fb2f725fb2 = []byte{ + // 226 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x4d, 0x2c, 0x49, 0xce, 0x48, 0x2d, 0xd2, 0xcf, + 0xcb, 0x4f, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0x4b, 0xeb, 0x81, 0xa4, + 0xf5, 0xa0, 0xd2, 0x52, 0xf2, 0x58, 0xb4, 0x14, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x43, 0x34, 0xe1, + 0x52, 0x50, 0x9a, 0x5c, 0x02, 0x55, 0x20, 0x5b, 0x9a, 0x52, 0x90, 0xa8, 0x9f, 0x98, 0x97, 0x97, + 0x5f, 0x92, 0x58, 0x92, 0x99, 0x9f, 0x57, 0xac, 0x5f, 0x5c, 0x92, 0x58, 0x52, 0x5a, 0x0c, 0x91, + 0x56, 0x9a, 0xcc, 0xc8, 0xc5, 0xed, 0x97, 0x9f, 0x92, 0xea, 0x0b, 0xd1, 0x2b, 0x64, 0xc5, 0xc5, + 0x0e, 0x72, 0x52, 0x7c, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa2, 0x1e, 0xa6, + 0xb3, 0xf4, 0x82, 0xc1, 0x4e, 0x80, 0xea, 0x09, 0x62, 0x03, 0xe9, 0xf0, 0x4c, 0x11, 0xf2, 0xe0, + 0xe2, 0x03, 0xeb, 0xcd, 0x4d, 0x2d, 0x49, 0x4c, 0x49, 0x2c, 0x49, 0x2c, 0x96, 0x60, 0x52, 0x60, + 0xc6, 0x63, 0x44, 0x69, 0x72, 0x09, 0xcc, 0x08, 0x5e, 0x90, 0x46, 0x5f, 0x98, 0x3e, 0x27, 0xf3, + 0x5d, 0x0d, 0x27, 0x2e, 0xb2, 0x31, 0x09, 0x30, 0x72, 0x29, 0x64, 0xe6, 0x43, 0x74, 0x17, 0x14, + 0xe5, 0x57, 0x54, 0x62, 0x31, 0xc8, 0x89, 0x13, 0xe4, 0xfc, 0x00, 0x90, 0x67, 0x02, 0x18, 0x93, + 0xd8, 0xc0, 0xbe, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x95, 0xbe, 0xac, 0x6b, 0x01, + 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.validate.go new file mode 100644 index 0000000000..c818cf0741 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/node.pb.validate.go @@ -0,0 +1,127 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/node.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _node_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on NodeMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *NodeMatcher) Validate() error { + if m == nil { + return nil + } + + 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 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, + } + } + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.go new file mode 100644 index 0000000000..ccddbff4d2 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.go @@ -0,0 +1,129 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/number.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _type "github.com/envoyproxy/go-control-plane/envoy/type" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type DoubleMatcher struct { + // Types that are valid to be assigned to MatchPattern: + // *DoubleMatcher_Range + // *DoubleMatcher_Exact + MatchPattern isDoubleMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleMatcher) Reset() { *m = DoubleMatcher{} } +func (m *DoubleMatcher) String() string { return proto.CompactTextString(m) } +func (*DoubleMatcher) ProtoMessage() {} +func (*DoubleMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_58ad3770a33c5fc2, []int{0} +} + +func (m *DoubleMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DoubleMatcher.Unmarshal(m, b) +} +func (m *DoubleMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DoubleMatcher.Marshal(b, m, deterministic) +} +func (m *DoubleMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleMatcher.Merge(m, src) +} +func (m *DoubleMatcher) XXX_Size() int { + return xxx_messageInfo_DoubleMatcher.Size(m) +} +func (m *DoubleMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleMatcher proto.InternalMessageInfo + +type isDoubleMatcher_MatchPattern interface { + isDoubleMatcher_MatchPattern() +} + +type DoubleMatcher_Range struct { + Range *_type.DoubleRange `protobuf:"bytes,1,opt,name=range,proto3,oneof"` +} + +type DoubleMatcher_Exact struct { + Exact float64 `protobuf:"fixed64,2,opt,name=exact,proto3,oneof"` +} + +func (*DoubleMatcher_Range) isDoubleMatcher_MatchPattern() {} + +func (*DoubleMatcher_Exact) isDoubleMatcher_MatchPattern() {} + +func (m *DoubleMatcher) GetMatchPattern() isDoubleMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (m *DoubleMatcher) GetRange() *_type.DoubleRange { + if x, ok := m.GetMatchPattern().(*DoubleMatcher_Range); ok { + return x.Range + } + return nil +} + +func (m *DoubleMatcher) GetExact() float64 { + if x, ok := m.GetMatchPattern().(*DoubleMatcher_Exact); ok { + return x.Exact + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*DoubleMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*DoubleMatcher_Range)(nil), + (*DoubleMatcher_Exact)(nil), + } +} + +func init() { + proto.RegisterType((*DoubleMatcher)(nil), "envoy.type.matcher.DoubleMatcher") +} + +func init() { proto.RegisterFile("envoy/type/matcher/number.proto", fileDescriptor_58ad3770a33c5fc2) } + +var fileDescriptor_58ad3770a33c5fc2 = []byte{ + // 238 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x4d, 0x2c, 0x49, 0xce, 0x48, 0x2d, 0xd2, 0xcf, + 0x2b, 0xcd, 0x4d, 0x4a, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0x2b, 0xd0, + 0x03, 0x29, 0xd0, 0x83, 0x2a, 0x90, 0x12, 0x43, 0xd2, 0x54, 0x94, 0x98, 0x97, 0x9e, 0x0a, 0x51, + 0x2b, 0x25, 0x5b, 0x9a, 0x52, 0x90, 0xa8, 0x9f, 0x98, 0x97, 0x97, 0x5f, 0x92, 0x58, 0x92, 0x99, + 0x9f, 0x57, 0xac, 0x5f, 0x5c, 0x92, 0x58, 0x52, 0x5a, 0x0c, 0x95, 0x16, 0x2f, 0x4b, 0xcc, 0xc9, + 0x4c, 0x49, 0x2c, 0x49, 0xd5, 0x87, 0x31, 0x20, 0x12, 0x4a, 0x79, 0x5c, 0xbc, 0x2e, 0xf9, 0xa5, + 0x49, 0x39, 0xa9, 0xbe, 0x10, 0x0b, 0x84, 0xf4, 0xb9, 0x58, 0xc1, 0xe6, 0x4a, 0x30, 0x2a, 0x30, + 0x6a, 0x70, 0x1b, 0x89, 0xeb, 0x21, 0x39, 0x02, 0xa2, 0x32, 0x08, 0x24, 0xed, 0xc1, 0x10, 0x04, + 0x51, 0x27, 0x24, 0xc6, 0xc5, 0x9a, 0x5a, 0x91, 0x98, 0x5c, 0x22, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, + 0x08, 0x12, 0x07, 0x73, 0x9d, 0x44, 0xb8, 0x78, 0xc1, 0x8e, 0x8e, 0x2f, 0x48, 0x2c, 0x29, 0x49, + 0x2d, 0xca, 0x13, 0x62, 0xfe, 0xe1, 0xc4, 0xe8, 0x64, 0xb9, 0xab, 0xe1, 0xc4, 0x45, 0x36, 0x26, + 0x01, 0x46, 0x2e, 0x85, 0xcc, 0x7c, 0x88, 0xd9, 0x05, 0x45, 0xf9, 0x15, 0x95, 0x7a, 0x98, 0x7e, + 0x75, 0xe2, 0xf6, 0x03, 0x87, 0x46, 0x00, 0xc8, 0xa1, 0x01, 0x8c, 0x49, 0x6c, 0x60, 0x17, 0x1b, + 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x61, 0x6c, 0x1a, 0x17, 0x38, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.validate.go new file mode 100644 index 0000000000..d6860987d2 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/number.pb.validate.go @@ -0,0 +1,127 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/number.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _number_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on DoubleMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *DoubleMatcher) Validate() error { + if m == nil { + return nil + } + + switch m.MatchPattern.(type) { + + case *DoubleMatcher_Range: + + 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: + // no validation rules for Exact + + default: + return DoubleMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.go new file mode 100644 index 0000000000..dc8a43865a --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.go @@ -0,0 +1,112 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/path.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type PathMatcher struct { + // Types that are valid to be assigned to Rule: + // *PathMatcher_Path + Rule isPathMatcher_Rule `protobuf_oneof:"rule"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PathMatcher) Reset() { *m = PathMatcher{} } +func (m *PathMatcher) String() string { return proto.CompactTextString(m) } +func (*PathMatcher) ProtoMessage() {} +func (*PathMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_bec7ed88adc90b4e, []int{0} +} + +func (m *PathMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PathMatcher.Unmarshal(m, b) +} +func (m *PathMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PathMatcher.Marshal(b, m, deterministic) +} +func (m *PathMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_PathMatcher.Merge(m, src) +} +func (m *PathMatcher) XXX_Size() int { + return xxx_messageInfo_PathMatcher.Size(m) +} +func (m *PathMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_PathMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_PathMatcher proto.InternalMessageInfo + +type isPathMatcher_Rule interface { + isPathMatcher_Rule() +} + +type PathMatcher_Path struct { + Path *StringMatcher `protobuf:"bytes,1,opt,name=path,proto3,oneof"` +} + +func (*PathMatcher_Path) isPathMatcher_Rule() {} + +func (m *PathMatcher) GetRule() isPathMatcher_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (m *PathMatcher) GetPath() *StringMatcher { + if x, ok := m.GetRule().(*PathMatcher_Path); ok { + return x.Path + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*PathMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*PathMatcher_Path)(nil), + } +} + +func init() { + proto.RegisterType((*PathMatcher)(nil), "envoy.type.matcher.PathMatcher") +} + +func init() { proto.RegisterFile("envoy/type/matcher/path.proto", fileDescriptor_bec7ed88adc90b4e) } + +var fileDescriptor_bec7ed88adc90b4e = []byte{ + // 219 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x4d, 0x2c, 0x49, 0xce, 0x48, 0x2d, 0xd2, 0x2f, + 0x48, 0x2c, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0x4b, 0xeb, 0x81, 0xa4, + 0xf5, 0xa0, 0xd2, 0x52, 0xf2, 0x58, 0xb4, 0x14, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x43, 0x34, 0x49, + 0xc9, 0x96, 0xa6, 0x14, 0x24, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, + 0x15, 0xeb, 0x17, 0x97, 0x24, 0x96, 0x94, 0x16, 0x43, 0xa5, 0xc5, 0xcb, 0x12, 0x73, 0x32, 0x53, + 0x12, 0x4b, 0x52, 0xf5, 0x61, 0x0c, 0x88, 0x84, 0x52, 0x2c, 0x17, 0x77, 0x40, 0x62, 0x49, 0x86, + 0x2f, 0xc4, 0x4c, 0x21, 0x47, 0x2e, 0x16, 0x90, 0x4b, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, + 0x14, 0xf5, 0x30, 0x9d, 0xa2, 0x17, 0x0c, 0xb6, 0x16, 0xaa, 0xc1, 0x89, 0xe3, 0x97, 0x13, 0x6b, + 0x17, 0x23, 0x93, 0x00, 0xa3, 0x07, 0x43, 0x10, 0x58, 0xab, 0x13, 0x37, 0x17, 0x4b, 0x51, 0x69, + 0x4e, 0xaa, 0x10, 0xf3, 0x0f, 0x27, 0x46, 0x27, 0xf3, 0x5d, 0x0d, 0x27, 0x2e, 0xb2, 0x31, 0x09, + 0x30, 0x72, 0x29, 0x64, 0xe6, 0x43, 0x4c, 0x2b, 0x28, 0xca, 0xaf, 0xa8, 0xc4, 0x62, 0xb0, 0x13, + 0x27, 0xc8, 0x21, 0x01, 0x20, 0x57, 0x05, 0x30, 0x26, 0xb1, 0x81, 0x9d, 0x67, 0x0c, 0x08, 0x00, + 0x00, 0xff, 0xff, 0xd2, 0xe6, 0x6d, 0x00, 0x2c, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.validate.go new file mode 100644 index 0000000000..be8e22b753 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/path.pb.validate.go @@ -0,0 +1,131 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/path.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _path_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on PathMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *PathMatcher) Validate() error { + if m == nil { + return nil + } + + switch m.Rule.(type) { + + case *PathMatcher_Path: + + if m.GetPath() == nil { + return PathMatcherValidationError{ + field: "Path", + reason: "value is required", + } + } + + 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: + return PathMatcherValidationError{ + field: "Rule", + reason: "value is required", + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.go new file mode 100644 index 0000000000..993d15356e --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.go @@ -0,0 +1,218 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/regex.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type RegexMatcher struct { + // Types that are valid to be assigned to EngineType: + // *RegexMatcher_GoogleRe2 + EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` + Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RegexMatcher) Reset() { *m = RegexMatcher{} } +func (m *RegexMatcher) String() string { return proto.CompactTextString(m) } +func (*RegexMatcher) ProtoMessage() {} +func (*RegexMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_0ba289439e2572f3, []int{0} +} + +func (m *RegexMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RegexMatcher.Unmarshal(m, b) +} +func (m *RegexMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RegexMatcher.Marshal(b, m, deterministic) +} +func (m *RegexMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegexMatcher.Merge(m, src) +} +func (m *RegexMatcher) XXX_Size() int { + return xxx_messageInfo_RegexMatcher.Size(m) +} +func (m *RegexMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_RegexMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_RegexMatcher proto.InternalMessageInfo + +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() {} + +func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { + if m != nil { + return m.EngineType + } + return nil +} + +func (m *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { + if x, ok := m.GetEngineType().(*RegexMatcher_GoogleRe2); ok { + return x.GoogleRe2 + } + return nil +} + +func (m *RegexMatcher) GetRegex() string { + if m != nil { + return m.Regex + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RegexMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RegexMatcher_GoogleRe2)(nil), + } +} + +type RegexMatcher_GoogleRE2 struct { + MaxProgramSize *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RegexMatcher_GoogleRE2) Reset() { *m = RegexMatcher_GoogleRE2{} } +func (m *RegexMatcher_GoogleRE2) String() string { return proto.CompactTextString(m) } +func (*RegexMatcher_GoogleRE2) ProtoMessage() {} +func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { + return fileDescriptor_0ba289439e2572f3, []int{0, 0} +} + +func (m *RegexMatcher_GoogleRE2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RegexMatcher_GoogleRE2.Unmarshal(m, b) +} +func (m *RegexMatcher_GoogleRE2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RegexMatcher_GoogleRE2.Marshal(b, m, deterministic) +} +func (m *RegexMatcher_GoogleRE2) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegexMatcher_GoogleRE2.Merge(m, src) +} +func (m *RegexMatcher_GoogleRE2) XXX_Size() int { + return xxx_messageInfo_RegexMatcher_GoogleRE2.Size(m) +} +func (m *RegexMatcher_GoogleRE2) XXX_DiscardUnknown() { + xxx_messageInfo_RegexMatcher_GoogleRE2.DiscardUnknown(m) +} + +var xxx_messageInfo_RegexMatcher_GoogleRE2 proto.InternalMessageInfo + +func (m *RegexMatcher_GoogleRE2) GetMaxProgramSize() *wrappers.UInt32Value { + if m != nil { + return m.MaxProgramSize + } + return nil +} + +type RegexMatchAndSubstitute struct { + Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` + Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RegexMatchAndSubstitute) Reset() { *m = RegexMatchAndSubstitute{} } +func (m *RegexMatchAndSubstitute) String() string { return proto.CompactTextString(m) } +func (*RegexMatchAndSubstitute) ProtoMessage() {} +func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int) { + return fileDescriptor_0ba289439e2572f3, []int{1} +} + +func (m *RegexMatchAndSubstitute) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RegexMatchAndSubstitute.Unmarshal(m, b) +} +func (m *RegexMatchAndSubstitute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RegexMatchAndSubstitute.Marshal(b, m, deterministic) +} +func (m *RegexMatchAndSubstitute) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegexMatchAndSubstitute.Merge(m, src) +} +func (m *RegexMatchAndSubstitute) XXX_Size() int { + return xxx_messageInfo_RegexMatchAndSubstitute.Size(m) +} +func (m *RegexMatchAndSubstitute) XXX_DiscardUnknown() { + xxx_messageInfo_RegexMatchAndSubstitute.DiscardUnknown(m) +} + +var xxx_messageInfo_RegexMatchAndSubstitute proto.InternalMessageInfo + +func (m *RegexMatchAndSubstitute) GetPattern() *RegexMatcher { + if m != nil { + return m.Pattern + } + return nil +} + +func (m *RegexMatchAndSubstitute) GetSubstitution() string { + if m != nil { + return m.Substitution + } + return "" +} + +func init() { + proto.RegisterType((*RegexMatcher)(nil), "envoy.type.matcher.RegexMatcher") + proto.RegisterType((*RegexMatcher_GoogleRE2)(nil), "envoy.type.matcher.RegexMatcher.GoogleRE2") + proto.RegisterType((*RegexMatchAndSubstitute)(nil), "envoy.type.matcher.RegexMatchAndSubstitute") +} + +func init() { proto.RegisterFile("envoy/type/matcher/regex.proto", fileDescriptor_0ba289439e2572f3) } + +var fileDescriptor_0ba289439e2572f3 = []byte{ + // 367 bytes of a gzipped FileDescriptorProto + 0x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 0x16, 0xb3, 0x6d, 0x56, 0x6e, 0xd1, 0xa1, 0xdf, 0xce, + 0xdd, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xf7, 0x0c, 0x0f, 0x39, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.validate.go new file mode 100644 index 0000000000..aabf202f42 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/regex.pb.validate.go @@ -0,0 +1,294 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/regex.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _regex_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on RegexMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *RegexMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRegex()) < 1 { + return RegexMatcherValidationError{ + field: "Regex", + reason: "value length must be at least 1 bytes", + } + } + + switch m.EngineType.(type) { + + case *RegexMatcher_GoogleRe2: + + if m.GetGoogleRe2() == nil { + return RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "value is required", + } + } + + 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: + return RegexMatcherValidationError{ + field: "EngineType", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error is returned. +func (m *RegexMatchAndSubstitute) Validate() error { + if m == nil { + return nil + } + + 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, + } + } + } + + // no validation rules for Substitution + + return nil +} + +// 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{} + +// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RegexMatcher_GoogleRE2) Validate() error { + if m == nil { + return nil + } + + 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, + } + } + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.go new file mode 100644 index 0000000000..46df910140 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.go @@ -0,0 +1,233 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/string.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/go-control-plane/envoy/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type StringMatcher struct { + // Types that are valid to be assigned to MatchPattern: + // *StringMatcher_Exact + // *StringMatcher_Prefix + // *StringMatcher_Suffix + // *StringMatcher_Regex + // *StringMatcher_SafeRegex + MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringMatcher) Reset() { *m = StringMatcher{} } +func (m *StringMatcher) String() string { return proto.CompactTextString(m) } +func (*StringMatcher) ProtoMessage() {} +func (*StringMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_1dc62c75a0f154e3, []int{0} +} + +func (m *StringMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StringMatcher.Unmarshal(m, b) +} +func (m *StringMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StringMatcher.Marshal(b, m, deterministic) +} +func (m *StringMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringMatcher.Merge(m, src) +} +func (m *StringMatcher) XXX_Size() int { + return xxx_messageInfo_StringMatcher.Size(m) +} +func (m *StringMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_StringMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_StringMatcher proto.InternalMessageInfo + +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_Regex struct { + Regex string `protobuf:"bytes,4,opt,name=regex,proto3,oneof"` +} + +type StringMatcher_SafeRegex struct { + SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` +} + +func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Regex) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} + +func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (m *StringMatcher) GetExact() string { + if x, ok := m.GetMatchPattern().(*StringMatcher_Exact); ok { + return x.Exact + } + return "" +} + +func (m *StringMatcher) GetPrefix() string { + if x, ok := m.GetMatchPattern().(*StringMatcher_Prefix); ok { + return x.Prefix + } + return "" +} + +func (m *StringMatcher) GetSuffix() string { + if x, ok := m.GetMatchPattern().(*StringMatcher_Suffix); ok { + return x.Suffix + } + return "" +} + +// Deprecated: Do not use. +func (m *StringMatcher) GetRegex() string { + if x, ok := m.GetMatchPattern().(*StringMatcher_Regex); ok { + return x.Regex + } + return "" +} + +func (m *StringMatcher) GetSafeRegex() *RegexMatcher { + if x, ok := m.GetMatchPattern().(*StringMatcher_SafeRegex); ok { + return x.SafeRegex + } + return nil +} + +func (m *StringMatcher) GetIgnoreCase() bool { + if m != nil { + return m.IgnoreCase + } + return false +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*StringMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*StringMatcher_Exact)(nil), + (*StringMatcher_Prefix)(nil), + (*StringMatcher_Suffix)(nil), + (*StringMatcher_Regex)(nil), + (*StringMatcher_SafeRegex)(nil), + } +} + +type ListStringMatcher struct { + Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListStringMatcher) Reset() { *m = ListStringMatcher{} } +func (m *ListStringMatcher) String() string { return proto.CompactTextString(m) } +func (*ListStringMatcher) ProtoMessage() {} +func (*ListStringMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_1dc62c75a0f154e3, []int{1} +} + +func (m *ListStringMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListStringMatcher.Unmarshal(m, b) +} +func (m *ListStringMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListStringMatcher.Marshal(b, m, deterministic) +} +func (m *ListStringMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListStringMatcher.Merge(m, src) +} +func (m *ListStringMatcher) XXX_Size() int { + return xxx_messageInfo_ListStringMatcher.Size(m) +} +func (m *ListStringMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_ListStringMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_ListStringMatcher proto.InternalMessageInfo + +func (m *ListStringMatcher) GetPatterns() []*StringMatcher { + if m != nil { + return m.Patterns + } + return nil +} + +func init() { + proto.RegisterType((*StringMatcher)(nil), "envoy.type.matcher.StringMatcher") + proto.RegisterType((*ListStringMatcher)(nil), "envoy.type.matcher.ListStringMatcher") +} + +func init() { proto.RegisterFile("envoy/type/matcher/string.proto", fileDescriptor_1dc62c75a0f154e3) } + +var fileDescriptor_1dc62c75a0f154e3 = []byte{ + // 387 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4a, 0xeb, 0x40, + 0x18, 0x85, 0x3b, 0x49, 0x93, 0x9b, 0x4e, 0x28, 0xf4, 0x0e, 0x97, 0x7b, 0x43, 0xe1, 0xda, 0xb4, + 0x6e, 0xb2, 0x4a, 0xa0, 0xae, 0xdc, 0x8e, 0x0b, 0x0b, 0x2a, 0x94, 0xb8, 0x15, 0xca, 0x98, 0x4e, + 0x6b, 0x40, 0x33, 0x61, 0x66, 0x5a, 0xd2, 0x5d, 0xd7, 0x2e, 0xdd, 0xfa, 0x22, 0xe2, 0x13, 0xb8, + 0xd5, 0x07, 0x71, 0xe1, 0x4a, 0xba, 0x92, 0x99, 0x89, 0x42, 0x69, 0x77, 0xf9, 0x73, 0xbe, 0x73, + 0x72, 0xf2, 0xff, 0xb0, 0x47, 0x8b, 0x25, 0x5b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, + 0x4b, 0xf9, 0xb5, 0x8a, 0x7a, 0xd0, 0xcf, 0xe7, 0x05, 0xe3, 0x74, 0x92, 0x11, 0x41, 0x03, 0x37, + 0x04, 0x91, 0x97, 0x42, 0xf3, 0xea, 0x84, 0x08, 0x8a, 0xff, 0xc0, 0xb6, 0xce, 0x9b, 0x94, 0x44, + 0x4a, 0xca, 0x0b, 0x64, 0x7f, 0x62, 0x30, 0xb8, 0x82, 0xbf, 0xcf, 0x73, 0x21, 0xb7, 0x17, 0x74, + 0x0a, 0xbd, 0x1a, 0x12, 0x01, 0x08, 0xed, 0xc8, 0x1f, 0xf6, 0xf7, 0xd5, 0xda, 0x32, 0xe9, 0x5e, + 0x0f, 0xc0, 0xf2, 0x40, 0xfa, 0x63, 0xc6, 0xc7, 0xcf, 0xeb, 0x97, 0x57, 0xd7, 0xea, 0x00, 0x18, + 0xe6, 0xcc, 0x44, 0x94, 0x9c, 0x55, 0xab, 0x3d, 0x69, 0xd8, 0x37, 0x71, 0x63, 0x75, 0xb4, 0x31, + 0xb8, 0x76, 0xf5, 0xf5, 0x8e, 0xbe, 0x02, 0x00, 0x00, 0xff, 0xff, 0x89, 0xee, 0xc2, 0xe5, 0x71, + 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.validate.go new file mode 100644 index 0000000000..c9b4079cbb --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/string.pb.validate.go @@ -0,0 +1,252 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/string.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _string_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on StringMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *StringMatcher) Validate() error { + if m == nil { + return nil + } + + // no validation rules for IgnoreCase + + switch m.MatchPattern.(type) { + + case *StringMatcher_Exact: + // no validation rules for Exact + + case *StringMatcher_Prefix: + + if len(m.GetPrefix()) < 1 { + return StringMatcherValidationError{ + field: "Prefix", + reason: "value length must be at least 1 bytes", + } + } + + case *StringMatcher_Suffix: + + if len(m.GetSuffix()) < 1 { + return StringMatcherValidationError{ + field: "Suffix", + reason: "value length must be at least 1 bytes", + } + } + + case *StringMatcher_Regex: + + if len(m.GetRegex()) > 1024 { + return StringMatcherValidationError{ + field: "Regex", + reason: "value length must be at most 1024 bytes", + } + } + + case *StringMatcher_SafeRegex: + + if m.GetSafeRegex() == nil { + return StringMatcherValidationError{ + field: "SafeRegex", + reason: "value is required", + } + } + + 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, + } + } + } + + default: + return StringMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + + } + + return nil +} + +// 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, an +// error is returned. +func (m *ListStringMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetPatterns()) < 1 { + return ListStringMatcherValidationError{ + field: "Patterns", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetPatterns() { + _, _ = idx, item + + 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, + } + } + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.go new file mode 100644 index 0000000000..4ef78eebc3 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.go @@ -0,0 +1,165 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/struct.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type StructMatcher struct { + Path []*StructMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` + Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StructMatcher) Reset() { *m = StructMatcher{} } +func (m *StructMatcher) String() string { return proto.CompactTextString(m) } +func (*StructMatcher) ProtoMessage() {} +func (*StructMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_80addaed29127401, []int{0} +} + +func (m *StructMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StructMatcher.Unmarshal(m, b) +} +func (m *StructMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StructMatcher.Marshal(b, m, deterministic) +} +func (m *StructMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructMatcher.Merge(m, src) +} +func (m *StructMatcher) XXX_Size() int { + return xxx_messageInfo_StructMatcher.Size(m) +} +func (m *StructMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_StructMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_StructMatcher proto.InternalMessageInfo + +func (m *StructMatcher) GetPath() []*StructMatcher_PathSegment { + if m != nil { + return m.Path + } + return nil +} + +func (m *StructMatcher) GetValue() *ValueMatcher { + if m != nil { + return m.Value + } + return nil +} + +type StructMatcher_PathSegment struct { + // Types that are valid to be assigned to Segment: + // *StructMatcher_PathSegment_Key + Segment isStructMatcher_PathSegment_Segment `protobuf_oneof:"segment"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StructMatcher_PathSegment) Reset() { *m = StructMatcher_PathSegment{} } +func (m *StructMatcher_PathSegment) String() string { return proto.CompactTextString(m) } +func (*StructMatcher_PathSegment) ProtoMessage() {} +func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) { + return fileDescriptor_80addaed29127401, []int{0, 0} +} + +func (m *StructMatcher_PathSegment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StructMatcher_PathSegment.Unmarshal(m, b) +} +func (m *StructMatcher_PathSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StructMatcher_PathSegment.Marshal(b, m, deterministic) +} +func (m *StructMatcher_PathSegment) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructMatcher_PathSegment.Merge(m, src) +} +func (m *StructMatcher_PathSegment) XXX_Size() int { + return xxx_messageInfo_StructMatcher_PathSegment.Size(m) +} +func (m *StructMatcher_PathSegment) XXX_DiscardUnknown() { + xxx_messageInfo_StructMatcher_PathSegment.DiscardUnknown(m) +} + +var xxx_messageInfo_StructMatcher_PathSegment proto.InternalMessageInfo + +type isStructMatcher_PathSegment_Segment interface { + isStructMatcher_PathSegment_Segment() +} + +type StructMatcher_PathSegment_Key struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` +} + +func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {} + +func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment { + if m != nil { + return m.Segment + } + return nil +} + +func (m *StructMatcher_PathSegment) GetKey() string { + if x, ok := m.GetSegment().(*StructMatcher_PathSegment_Key); ok { + return x.Key + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*StructMatcher_PathSegment) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*StructMatcher_PathSegment_Key)(nil), + } +} + +func init() { + proto.RegisterType((*StructMatcher)(nil), "envoy.type.matcher.StructMatcher") + proto.RegisterType((*StructMatcher_PathSegment)(nil), "envoy.type.matcher.StructMatcher.PathSegment") +} + +func init() { proto.RegisterFile("envoy/type/matcher/struct.proto", fileDescriptor_80addaed29127401) } + +var fileDescriptor_80addaed29127401 = []byte{ + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x4b, 0xc4, 0x40, + 0x10, 0xc5, 0x9d, 0xe4, 0xfe, 0xb9, 0x41, 0x39, 0xd2, 0x78, 0x44, 0xd4, 0xc5, 0x2a, 0x8d, 0xbb, + 0x70, 0x56, 0x5a, 0xc9, 0x56, 0x82, 0x08, 0x21, 0x07, 0xf6, 0xeb, 0xdd, 0x62, 0x82, 0x77, 0xd9, + 0x90, 0x4c, 0x82, 0xe9, 0xac, 0x2d, 0xfd, 0x38, 0x7e, 0x02, 0x5b, 0x5b, 0x3f, 0x89, 0x5c, 0x25, + 0xd9, 0x8d, 0xa0, 0x98, 0x6e, 0xd9, 0x79, 0xef, 0xf7, 0xde, 0x0c, 0x39, 0x51, 0x59, 0xad, 0x1b, + 0x8e, 0x4d, 0xae, 0xf8, 0x46, 0xe2, 0x32, 0x51, 0x05, 0x2f, 0xb1, 0xa8, 0x96, 0xc8, 0xf2, 0x42, + 0xa3, 0xf6, 0x7d, 0x23, 0x60, 0xad, 0x80, 0x75, 0x82, 0xe0, 0xb8, 0xc7, 0x54, 0xcb, 0x75, 0xa5, + 0xac, 0x27, 0x38, 0xaa, 0x56, 0xb9, 0xe4, 0x32, 0xcb, 0x34, 0x4a, 0x4c, 0x75, 0x56, 0xf2, 0x12, + 0x25, 0x56, 0x65, 0x37, 0x3e, 0xa8, 0xe5, 0x3a, 0x5d, 0x49, 0x54, 0xfc, 0xe7, 0x61, 0x07, 0xa7, + 0x9f, 0x40, 0xf6, 0x16, 0x26, 0xfc, 0xd6, 0x52, 0xfd, 0x1b, 0x32, 0xc8, 0x25, 0x26, 0x33, 0x87, + 0xba, 0xa1, 0x37, 0x3f, 0x63, 0xff, 0xcb, 0xb0, 0x3f, 0x06, 0x16, 0x49, 0x4c, 0x16, 0xea, 0x61, + 0xa3, 0x32, 0x14, 0x93, 0xad, 0x18, 0xbe, 0x82, 0x33, 0x81, 0xd8, 0x40, 0xfc, 0x2b, 0x32, 0x34, + 0x2d, 0x67, 0x2e, 0x85, 0xd0, 0x9b, 0xd3, 0x3e, 0xda, 0x5d, 0x2b, 0xe8, 0x60, 0x06, 0xf0, 0x02, + 0xce, 0x14, 0x62, 0x6b, 0x0c, 0x2e, 0x89, 0xf7, 0x2b, 0xc0, 0x3f, 0x24, 0xee, 0xa3, 0x6a, 0x66, + 0x40, 0x21, 0xdc, 0x15, 0xe3, 0xad, 0x18, 0x14, 0x0e, 0x85, 0xeb, 0x9d, 0xb8, 0xfd, 0x15, 0xfb, + 0x64, 0x5c, 0x76, 0x3a, 0xf7, 0x4b, 0x80, 0xb8, 0x78, 0x7b, 0x7e, 0xff, 0x18, 0x39, 0x53, 0x20, + 0x34, 0xd5, 0x36, 0x3a, 0x2f, 0xf4, 0x53, 0xd3, 0xd3, 0x42, 0x78, 0x76, 0xa9, 0xa8, 0xbd, 0x4a, + 0x04, 0xf7, 0x23, 0x73, 0x9e, 0xf3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0x73, 0x85, 0x38, + 0xad, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.validate.go new file mode 100644 index 0000000000..52f787a331 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/struct.pb.validate.go @@ -0,0 +1,227 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/struct.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _struct_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on StructMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *StructMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetPath()) < 1 { + return StructMatcherValidationError{ + field: "Path", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetPath() { + _, _ = idx, item + + 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 { + return StructMatcherValidationError{ + field: "Value", + reason: "value is required", + } + } + + 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, + } + } + } + + return nil +} + +// 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, an error is returned. +func (m *StructMatcher_PathSegment) Validate() error { + if m == nil { + return nil + } + + switch m.Segment.(type) { + + case *StructMatcher_PathSegment_Key: + + if len(m.GetKey()) < 1 { + return StructMatcher_PathSegmentValidationError{ + field: "Key", + reason: "value length must be at least 1 bytes", + } + } + + default: + return StructMatcher_PathSegmentValidationError{ + field: "Segment", + reason: "value is required", + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.go new file mode 100644 index 0000000000..7ff869635a --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.go @@ -0,0 +1,295 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/matcher/value.proto + +package envoy_type_matcher + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type ValueMatcher struct { + // Types that are valid to be assigned to MatchPattern: + // *ValueMatcher_NullMatch_ + // *ValueMatcher_DoubleMatch + // *ValueMatcher_StringMatch + // *ValueMatcher_BoolMatch + // *ValueMatcher_PresentMatch + // *ValueMatcher_ListMatch + MatchPattern isValueMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValueMatcher) Reset() { *m = ValueMatcher{} } +func (m *ValueMatcher) String() string { return proto.CompactTextString(m) } +func (*ValueMatcher) ProtoMessage() {} +func (*ValueMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_145b36501d266253, []int{0} +} + +func (m *ValueMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ValueMatcher.Unmarshal(m, b) +} +func (m *ValueMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ValueMatcher.Marshal(b, m, deterministic) +} +func (m *ValueMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValueMatcher.Merge(m, src) +} +func (m *ValueMatcher) XXX_Size() int { + return xxx_messageInfo_ValueMatcher.Size(m) +} +func (m *ValueMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_ValueMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_ValueMatcher proto.InternalMessageInfo + +type isValueMatcher_MatchPattern interface { + isValueMatcher_MatchPattern() +} + +type ValueMatcher_NullMatch_ struct { + NullMatch *ValueMatcher_NullMatch `protobuf:"bytes,1,opt,name=null_match,json=nullMatch,proto3,oneof"` +} + +type ValueMatcher_DoubleMatch struct { + DoubleMatch *DoubleMatcher `protobuf:"bytes,2,opt,name=double_match,json=doubleMatch,proto3,oneof"` +} + +type ValueMatcher_StringMatch struct { + StringMatch *StringMatcher `protobuf:"bytes,3,opt,name=string_match,json=stringMatch,proto3,oneof"` +} + +type ValueMatcher_BoolMatch struct { + BoolMatch bool `protobuf:"varint,4,opt,name=bool_match,json=boolMatch,proto3,oneof"` +} + +type ValueMatcher_PresentMatch struct { + PresentMatch bool `protobuf:"varint,5,opt,name=present_match,json=presentMatch,proto3,oneof"` +} + +type ValueMatcher_ListMatch struct { + 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() {} + +func (m *ValueMatcher) GetMatchPattern() isValueMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (m *ValueMatcher) GetNullMatch() *ValueMatcher_NullMatch { + if x, ok := m.GetMatchPattern().(*ValueMatcher_NullMatch_); ok { + return x.NullMatch + } + return nil +} + +func (m *ValueMatcher) GetDoubleMatch() *DoubleMatcher { + if x, ok := m.GetMatchPattern().(*ValueMatcher_DoubleMatch); ok { + return x.DoubleMatch + } + return nil +} + +func (m *ValueMatcher) GetStringMatch() *StringMatcher { + if x, ok := m.GetMatchPattern().(*ValueMatcher_StringMatch); ok { + return x.StringMatch + } + return nil +} + +func (m *ValueMatcher) GetBoolMatch() bool { + if x, ok := m.GetMatchPattern().(*ValueMatcher_BoolMatch); ok { + return x.BoolMatch + } + return false +} + +func (m *ValueMatcher) GetPresentMatch() bool { + if x, ok := m.GetMatchPattern().(*ValueMatcher_PresentMatch); ok { + return x.PresentMatch + } + return false +} + +func (m *ValueMatcher) GetListMatch() *ListMatcher { + if x, ok := m.GetMatchPattern().(*ValueMatcher_ListMatch); ok { + return x.ListMatch + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ValueMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ValueMatcher_NullMatch_)(nil), + (*ValueMatcher_DoubleMatch)(nil), + (*ValueMatcher_StringMatch)(nil), + (*ValueMatcher_BoolMatch)(nil), + (*ValueMatcher_PresentMatch)(nil), + (*ValueMatcher_ListMatch)(nil), + } +} + +type ValueMatcher_NullMatch struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValueMatcher_NullMatch) Reset() { *m = ValueMatcher_NullMatch{} } +func (m *ValueMatcher_NullMatch) String() string { return proto.CompactTextString(m) } +func (*ValueMatcher_NullMatch) ProtoMessage() {} +func (*ValueMatcher_NullMatch) Descriptor() ([]byte, []int) { + return fileDescriptor_145b36501d266253, []int{0, 0} +} + +func (m *ValueMatcher_NullMatch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ValueMatcher_NullMatch.Unmarshal(m, b) +} +func (m *ValueMatcher_NullMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ValueMatcher_NullMatch.Marshal(b, m, deterministic) +} +func (m *ValueMatcher_NullMatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValueMatcher_NullMatch.Merge(m, src) +} +func (m *ValueMatcher_NullMatch) XXX_Size() int { + return xxx_messageInfo_ValueMatcher_NullMatch.Size(m) +} +func (m *ValueMatcher_NullMatch) XXX_DiscardUnknown() { + xxx_messageInfo_ValueMatcher_NullMatch.DiscardUnknown(m) +} + +var xxx_messageInfo_ValueMatcher_NullMatch proto.InternalMessageInfo + +type ListMatcher struct { + // Types that are valid to be assigned to MatchPattern: + // *ListMatcher_OneOf + MatchPattern isListMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListMatcher) Reset() { *m = ListMatcher{} } +func (m *ListMatcher) String() string { return proto.CompactTextString(m) } +func (*ListMatcher) ProtoMessage() {} +func (*ListMatcher) Descriptor() ([]byte, []int) { + return fileDescriptor_145b36501d266253, []int{1} +} + +func (m *ListMatcher) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListMatcher.Unmarshal(m, b) +} +func (m *ListMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListMatcher.Marshal(b, m, deterministic) +} +func (m *ListMatcher) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListMatcher.Merge(m, src) +} +func (m *ListMatcher) XXX_Size() int { + return xxx_messageInfo_ListMatcher.Size(m) +} +func (m *ListMatcher) XXX_DiscardUnknown() { + xxx_messageInfo_ListMatcher.DiscardUnknown(m) +} + +var xxx_messageInfo_ListMatcher proto.InternalMessageInfo + +type isListMatcher_MatchPattern interface { + isListMatcher_MatchPattern() +} + +type ListMatcher_OneOf struct { + OneOf *ValueMatcher `protobuf:"bytes,1,opt,name=one_of,json=oneOf,proto3,oneof"` +} + +func (*ListMatcher_OneOf) isListMatcher_MatchPattern() {} + +func (m *ListMatcher) GetMatchPattern() isListMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (m *ListMatcher) GetOneOf() *ValueMatcher { + if x, ok := m.GetMatchPattern().(*ListMatcher_OneOf); ok { + return x.OneOf + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ListMatcher) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*ListMatcher_OneOf)(nil), + } +} + +func init() { + proto.RegisterType((*ValueMatcher)(nil), "envoy.type.matcher.ValueMatcher") + proto.RegisterType((*ValueMatcher_NullMatch)(nil), "envoy.type.matcher.ValueMatcher.NullMatch") + proto.RegisterType((*ListMatcher)(nil), "envoy.type.matcher.ListMatcher") +} + +func init() { proto.RegisterFile("envoy/type/matcher/value.proto", fileDescriptor_145b36501d266253) } + +var fileDescriptor_145b36501d266253 = []byte{ + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcd, 0x4a, 0xeb, 0x40, + 0x1c, 0xc5, 0x9b, 0xf6, 0x36, 0xdc, 0xfe, 0xd3, 0xc2, 0x65, 0xb8, 0x70, 0x2f, 0x05, 0x6d, 0x2c, + 0x08, 0xc5, 0x45, 0x02, 0xba, 0xd1, 0x9d, 0x04, 0x91, 0x82, 0x5f, 0xa5, 0x82, 0x4b, 0xcb, 0xc4, + 0x4c, 0x35, 0x30, 0x9d, 0x09, 0xf3, 0x51, 0xec, 0xce, 0xc7, 0xf0, 0x59, 0x7c, 0x02, 0xb7, 0xbe, + 0x8d, 0x4b, 0xc9, 0xcc, 0xc4, 0x16, 0x8c, 0xb8, 0x9b, 0xf9, 0x9f, 0x73, 0x7e, 0x39, 0x93, 0x19, + 0xd8, 0x26, 0x6c, 0xc9, 0x57, 0xb1, 0x5a, 0x15, 0x24, 0x5e, 0x60, 0x75, 0xf7, 0x40, 0x44, 0xbc, + 0xc4, 0x54, 0x93, 0xa8, 0x10, 0x5c, 0x71, 0x84, 0x8c, 0x1e, 0x95, 0x7a, 0xe4, 0xf4, 0xfe, 0xa0, + 0x26, 0xc3, 0xf4, 0x22, 0x25, 0xc2, 0x86, 0x6a, 0x0d, 0x52, 0x89, 0x9c, 0xdd, 0x3b, 0xc3, 0x96, + 0xce, 0x0a, 0x1c, 0x63, 0xc6, 0xb8, 0xc2, 0x2a, 0xe7, 0x4c, 0xc6, 0x52, 0x61, 0xa5, 0xa5, 0x93, + 0xff, 0x2d, 0x31, 0xcd, 0x33, 0xac, 0x48, 0x5c, 0x2d, 0xac, 0x30, 0x7c, 0x6e, 0x41, 0xf7, 0xa6, + 0x6c, 0x77, 0x61, 0xa9, 0xe8, 0x0c, 0x80, 0x69, 0x4a, 0x67, 0xe6, 0x2b, 0xff, 0xbd, 0xd0, 0x1b, + 0x05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, 0xe6, 0xed, 0x1c, 0x7c, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x57, 0x34, 0x64, 0x98, 0xeb, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.validate.go new file mode 100644 index 0000000000..1471aed02e --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/value.pb.validate.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/value.proto + +package envoy_type_matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _value_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on ValueMatcher with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ValueMatcher) Validate() error { + if m == nil { + return nil + } + + switch m.MatchPattern.(type) { + + case *ValueMatcher_NullMatch_: + + 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, 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, 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: + // no validation rules for BoolMatch + + case *ValueMatcher_PresentMatch: + // no validation rules for PresentMatch + + case *ValueMatcher_ListMatch: + + 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: + return ValueMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error +// is returned. +func (m *ListMatcher) Validate() error { + if m == nil { + return nil + } + + switch m.MatchPattern.(type) { + + case *ListMatcher_OneOf: + + 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: + return ListMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error is returned. +func (m *ValueMatcher_NullMatch) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go new file mode 100644 index 0000000000..f898feb159 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go @@ -0,0 +1,413 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/metadata/v2/metadata.proto + +package envoy_type_metadata_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type MetadataKey struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Path []*MetadataKey_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKey) Reset() { *m = MetadataKey{} } +func (m *MetadataKey) String() string { return proto.CompactTextString(m) } +func (*MetadataKey) ProtoMessage() {} +func (*MetadataKey) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{0} +} + +func (m *MetadataKey) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKey.Unmarshal(m, b) +} +func (m *MetadataKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKey.Marshal(b, m, deterministic) +} +func (m *MetadataKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKey.Merge(m, src) +} +func (m *MetadataKey) XXX_Size() int { + return xxx_messageInfo_MetadataKey.Size(m) +} +func (m *MetadataKey) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKey.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKey proto.InternalMessageInfo + +func (m *MetadataKey) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *MetadataKey) GetPath() []*MetadataKey_PathSegment { + if m != nil { + return m.Path + } + return nil +} + +type MetadataKey_PathSegment struct { + // Types that are valid to be assigned to Segment: + // *MetadataKey_PathSegment_Key + Segment isMetadataKey_PathSegment_Segment `protobuf_oneof:"segment"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKey_PathSegment) Reset() { *m = MetadataKey_PathSegment{} } +func (m *MetadataKey_PathSegment) String() string { return proto.CompactTextString(m) } +func (*MetadataKey_PathSegment) ProtoMessage() {} +func (*MetadataKey_PathSegment) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{0, 0} +} + +func (m *MetadataKey_PathSegment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKey_PathSegment.Unmarshal(m, b) +} +func (m *MetadataKey_PathSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKey_PathSegment.Marshal(b, m, deterministic) +} +func (m *MetadataKey_PathSegment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKey_PathSegment.Merge(m, src) +} +func (m *MetadataKey_PathSegment) XXX_Size() int { + return xxx_messageInfo_MetadataKey_PathSegment.Size(m) +} +func (m *MetadataKey_PathSegment) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKey_PathSegment.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKey_PathSegment proto.InternalMessageInfo + +type isMetadataKey_PathSegment_Segment interface { + isMetadataKey_PathSegment_Segment() +} + +type MetadataKey_PathSegment_Key struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` +} + +func (*MetadataKey_PathSegment_Key) isMetadataKey_PathSegment_Segment() {} + +func (m *MetadataKey_PathSegment) GetSegment() isMetadataKey_PathSegment_Segment { + if m != nil { + return m.Segment + } + return nil +} + +func (m *MetadataKey_PathSegment) GetKey() string { + if x, ok := m.GetSegment().(*MetadataKey_PathSegment_Key); ok { + return x.Key + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MetadataKey_PathSegment) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MetadataKey_PathSegment_Key)(nil), + } +} + +type MetadataKind struct { + // Types that are valid to be assigned to Kind: + // *MetadataKind_Request_ + // *MetadataKind_Route_ + // *MetadataKind_Cluster_ + // *MetadataKind_Host_ + Kind isMetadataKind_Kind `protobuf_oneof:"kind"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKind) Reset() { *m = MetadataKind{} } +func (m *MetadataKind) String() string { return proto.CompactTextString(m) } +func (*MetadataKind) ProtoMessage() {} +func (*MetadataKind) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{1} +} + +func (m *MetadataKind) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKind.Unmarshal(m, b) +} +func (m *MetadataKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKind.Marshal(b, m, deterministic) +} +func (m *MetadataKind) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKind.Merge(m, src) +} +func (m *MetadataKind) XXX_Size() int { + return xxx_messageInfo_MetadataKind.Size(m) +} +func (m *MetadataKind) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKind.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKind proto.InternalMessageInfo + +type isMetadataKind_Kind interface { + isMetadataKind_Kind() +} + +type MetadataKind_Request_ struct { + Request *MetadataKind_Request `protobuf:"bytes,1,opt,name=request,proto3,oneof"` +} + +type MetadataKind_Route_ struct { + Route *MetadataKind_Route `protobuf:"bytes,2,opt,name=route,proto3,oneof"` +} + +type MetadataKind_Cluster_ struct { + Cluster *MetadataKind_Cluster `protobuf:"bytes,3,opt,name=cluster,proto3,oneof"` +} + +type MetadataKind_Host_ struct { + 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() {} + +func (m *MetadataKind) GetKind() isMetadataKind_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *MetadataKind) GetRequest() *MetadataKind_Request { + if x, ok := m.GetKind().(*MetadataKind_Request_); ok { + return x.Request + } + return nil +} + +func (m *MetadataKind) GetRoute() *MetadataKind_Route { + if x, ok := m.GetKind().(*MetadataKind_Route_); ok { + return x.Route + } + return nil +} + +func (m *MetadataKind) GetCluster() *MetadataKind_Cluster { + if x, ok := m.GetKind().(*MetadataKind_Cluster_); ok { + return x.Cluster + } + return nil +} + +func (m *MetadataKind) GetHost() *MetadataKind_Host { + if x, ok := m.GetKind().(*MetadataKind_Host_); ok { + return x.Host + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MetadataKind) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MetadataKind_Request_)(nil), + (*MetadataKind_Route_)(nil), + (*MetadataKind_Cluster_)(nil), + (*MetadataKind_Host_)(nil), + } +} + +type MetadataKind_Request struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKind_Request) Reset() { *m = MetadataKind_Request{} } +func (m *MetadataKind_Request) String() string { return proto.CompactTextString(m) } +func (*MetadataKind_Request) ProtoMessage() {} +func (*MetadataKind_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{1, 0} +} + +func (m *MetadataKind_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKind_Request.Unmarshal(m, b) +} +func (m *MetadataKind_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKind_Request.Marshal(b, m, deterministic) +} +func (m *MetadataKind_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKind_Request.Merge(m, src) +} +func (m *MetadataKind_Request) XXX_Size() int { + return xxx_messageInfo_MetadataKind_Request.Size(m) +} +func (m *MetadataKind_Request) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKind_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKind_Request proto.InternalMessageInfo + +type MetadataKind_Route struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKind_Route) Reset() { *m = MetadataKind_Route{} } +func (m *MetadataKind_Route) String() string { return proto.CompactTextString(m) } +func (*MetadataKind_Route) ProtoMessage() {} +func (*MetadataKind_Route) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{1, 1} +} + +func (m *MetadataKind_Route) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKind_Route.Unmarshal(m, b) +} +func (m *MetadataKind_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKind_Route.Marshal(b, m, deterministic) +} +func (m *MetadataKind_Route) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKind_Route.Merge(m, src) +} +func (m *MetadataKind_Route) XXX_Size() int { + return xxx_messageInfo_MetadataKind_Route.Size(m) +} +func (m *MetadataKind_Route) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKind_Route.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKind_Route proto.InternalMessageInfo + +type MetadataKind_Cluster struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKind_Cluster) Reset() { *m = MetadataKind_Cluster{} } +func (m *MetadataKind_Cluster) String() string { return proto.CompactTextString(m) } +func (*MetadataKind_Cluster) ProtoMessage() {} +func (*MetadataKind_Cluster) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{1, 2} +} + +func (m *MetadataKind_Cluster) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKind_Cluster.Unmarshal(m, b) +} +func (m *MetadataKind_Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKind_Cluster.Marshal(b, m, deterministic) +} +func (m *MetadataKind_Cluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKind_Cluster.Merge(m, src) +} +func (m *MetadataKind_Cluster) XXX_Size() int { + return xxx_messageInfo_MetadataKind_Cluster.Size(m) +} +func (m *MetadataKind_Cluster) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKind_Cluster.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKind_Cluster proto.InternalMessageInfo + +type MetadataKind_Host struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetadataKind_Host) Reset() { *m = MetadataKind_Host{} } +func (m *MetadataKind_Host) String() string { return proto.CompactTextString(m) } +func (*MetadataKind_Host) ProtoMessage() {} +func (*MetadataKind_Host) Descriptor() ([]byte, []int) { + return fileDescriptor_3d75f017d303239e, []int{1, 3} +} + +func (m *MetadataKind_Host) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MetadataKind_Host.Unmarshal(m, b) +} +func (m *MetadataKind_Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MetadataKind_Host.Marshal(b, m, deterministic) +} +func (m *MetadataKind_Host) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetadataKind_Host.Merge(m, src) +} +func (m *MetadataKind_Host) XXX_Size() int { + return xxx_messageInfo_MetadataKind_Host.Size(m) +} +func (m *MetadataKind_Host) XXX_DiscardUnknown() { + xxx_messageInfo_MetadataKind_Host.DiscardUnknown(m) +} + +var xxx_messageInfo_MetadataKind_Host proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MetadataKey)(nil), "envoy.type.metadata.v2.MetadataKey") + proto.RegisterType((*MetadataKey_PathSegment)(nil), "envoy.type.metadata.v2.MetadataKey.PathSegment") + proto.RegisterType((*MetadataKind)(nil), "envoy.type.metadata.v2.MetadataKind") + proto.RegisterType((*MetadataKind_Request)(nil), "envoy.type.metadata.v2.MetadataKind.Request") + proto.RegisterType((*MetadataKind_Route)(nil), "envoy.type.metadata.v2.MetadataKind.Route") + proto.RegisterType((*MetadataKind_Cluster)(nil), "envoy.type.metadata.v2.MetadataKind.Cluster") + proto.RegisterType((*MetadataKind_Host)(nil), "envoy.type.metadata.v2.MetadataKind.Host") +} + +func init() { + proto.RegisterFile("envoy/type/metadata/v2/metadata.proto", fileDescriptor_3d75f017d303239e) +} + +var fileDescriptor_3d75f017d303239e = []byte{ + // 412 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0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b, 0xbb, 0xb6, 0xf2, 0x11, 0xe1, 0x1f, 0x31, 0xaf, 0x81, 0xd2, 0x8c, 0x9f, 0x55, 0x3b, + 0xd8, 0xc8, 0xfb, 0x15, 0xdc, 0x58, 0x2c, 0xdc, 0x18, 0x1d, 0xb7, 0xe5, 0xe6, 0x0d, 0x9f, 0x03, + 0x00, 0x00, 0xff, 0xff, 0xe1, 0x4b, 0x2c, 0x5d, 0x12, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go new file mode 100644 index 0000000000..790260e4bd --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go @@ -0,0 +1,608 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/metadata/v2/metadata.proto + +package envoy_type_metadata_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _metadata_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on MetadataKey with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *MetadataKey) Validate() error { + if m == nil { + return nil + } + + if len(m.GetKey()) < 1 { + return MetadataKeyValidationError{ + field: "Key", + reason: "value length must be at least 1 bytes", + } + } + + if len(m.GetPath()) < 1 { + return MetadataKeyValidationError{ + field: "Path", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetPath() { + _, _ = idx, item + + 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, + } + } + } + + } + + return nil +} + +// 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, an error +// is returned. +func (m *MetadataKind) Validate() error { + if m == nil { + return nil + } + + switch m.Kind.(type) { + + case *MetadataKind_Request_: + + 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, 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, 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, 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: + return MetadataKindValidationError{ + field: "Kind", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error is returned. +func (m *MetadataKey_PathSegment) Validate() error { + if m == nil { + return nil + } + + switch m.Segment.(type) { + + case *MetadataKey_PathSegment_Key: + + if len(m.GetKey()) < 1 { + return MetadataKey_PathSegmentValidationError{ + field: "Key", + reason: "value length must be at least 1 bytes", + } + } + + default: + return MetadataKey_PathSegmentValidationError{ + field: "Segment", + reason: "value is required", + } + + } + + return nil +} + +// 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, an error is returned. +func (m *MetadataKind_Request) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an error is returned. +func (m *MetadataKind_Route) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an error is returned. +func (m *MetadataKind_Cluster) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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, an +// error is returned. +func (m *MetadataKind_Host) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/percent.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.go index b826ce6a4c..4b405bbf3c 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.go @@ -1,18 +1,14 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/type/percent.proto package envoy_type import ( - bytes "bytes" - encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - + _ "github.com/cncf/udpa/go/udpa/annotations" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/golang/protobuf/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,24 +20,14 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// 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_HUNDRED FractionalPercent_DenominatorType = 0 FractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1 - // 1,000,000. - // - // **Example**: 1/1000000 = 0.0001%. - FractionalPercent_MILLION FractionalPercent_DenominatorType = 2 + FractionalPercent_MILLION FractionalPercent_DenominatorType = 2 ) var FractionalPercent_DenominatorType_name = map[int32]string{ @@ -64,7 +50,6 @@ func (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_89401f90eb07307e, []int{1, 0} } -// Identifies a percentage, in the range [0.0, 100.0]. type Percent struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -78,26 +63,18 @@ func (*Percent) ProtoMessage() {} func (*Percent) Descriptor() ([]byte, []int) { return fileDescriptor_89401f90eb07307e, []int{0} } + func (m *Percent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Percent.Unmarshal(m, b) } func (m *Percent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Percent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Percent.Marshal(b, m, deterministic) } func (m *Percent) XXX_Merge(src proto.Message) { xxx_messageInfo_Percent.Merge(m, src) } func (m *Percent) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Percent.Size(m) } func (m *Percent) XXX_DiscardUnknown() { xxx_messageInfo_Percent.DiscardUnknown(m) @@ -112,17 +89,8 @@ func (m *Percent) GetValue() float64 { 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 { - // 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%). + Numerator uint32 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` Denominator FractionalPercent_DenominatorType `protobuf:"varint,2,opt,name=denominator,proto3,enum=envoy.type.FractionalPercent_DenominatorType" json:"denominator,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -135,26 +103,18 @@ func (*FractionalPercent) ProtoMessage() {} func (*FractionalPercent) Descriptor() ([]byte, []int) { return fileDescriptor_89401f90eb07307e, []int{1} } + func (m *FractionalPercent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_FractionalPercent.Unmarshal(m, b) } func (m *FractionalPercent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FractionalPercent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_FractionalPercent.Marshal(b, m, deterministic) } func (m *FractionalPercent) XXX_Merge(src proto.Message) { xxx_messageInfo_FractionalPercent.Merge(m, src) } func (m *FractionalPercent) XXX_Size() int { - return m.Size() + return xxx_messageInfo_FractionalPercent.Size(m) } func (m *FractionalPercent) XXX_DiscardUnknown() { xxx_messageInfo_FractionalPercent.DiscardUnknown(m) @@ -185,463 +145,25 @@ func init() { func init() { proto.RegisterFile("envoy/type/percent.proto", fileDescriptor_89401f90eb07307e) } var fileDescriptor_89401f90eb07307e = []byte{ - // 306 bytes of a gzipped FileDescriptorProto + // 308 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x48, 0xcd, 0x2b, 0xcb, 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2f, 0x48, 0x2d, 0x4a, 0x4e, 0xcd, 0x2b, 0xd1, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0xcb, 0xe8, 0x81, 0x64, 0xa4, 0xc4, 0xcb, 0x12, 0x73, - 0x32, 0x53, 0x12, 0x4b, 0x52, 0xf5, 0x61, 0x0c, 0x88, 0x22, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, - 0x30, 0x53, 0x1f, 0xc4, 0x82, 0x88, 0x2a, 0x59, 0x71, 0xb1, 0x07, 0x40, 0xcc, 0x12, 0xd2, 0xe7, - 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x74, 0x92, 0xdc, 0xf5, - 0xf2, 0x00, 0xb3, 0x88, 0x90, 0x90, 0x24, 0x03, 0x18, 0x44, 0x3a, 0x68, 0x32, 0x40, 0x41, 0x10, - 0x44, 0x9d, 0xd2, 0x59, 0x46, 0x2e, 0x41, 0xb7, 0xa2, 0xc4, 0xe4, 0x92, 0xcc, 0xfc, 0xbc, 0xc4, - 0x1c, 0x98, 0x31, 0x32, 0x5c, 0x9c, 0x79, 0xa5, 0xb9, 0xa9, 0x45, 0x89, 0x25, 0xf9, 0x45, 0x60, - 0xa3, 0x78, 0x83, 0x10, 0x02, 0x42, 0xd1, 0x5c, 0xdc, 0x29, 0xa9, 0x79, 0xf9, 0xb9, 0x99, 0x79, - 0x60, 0x79, 0x26, 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x5d, 0x3d, 0x84, 0x07, 0xf4, 0x30, 0x4c, 0xd4, - 0x73, 0x41, 0x68, 0x08, 0xa9, 0x2c, 0x48, 0x75, 0xe2, 0x02, 0xb9, 0x8c, 0xb5, 0x89, 0x91, 0x49, - 0x80, 0x31, 0x08, 0xd9, 0x34, 0x25, 0x5b, 0x2e, 0x7e, 0x34, 0xb5, 0x42, 0xdc, 0x5c, 0xec, 0x1e, - 0xa1, 0x7e, 0x2e, 0x41, 0xae, 0x2e, 0x02, 0x0c, 0x42, 0x02, 0x5c, 0x3c, 0x21, 0xae, 0x7e, 0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0x8a, 0x12, 0x93, 0x41, 0xb6, 0x25, 0xe6, 0xc0, 0x0c, 0x91, 0xe1, 0xe2, + 0xcc, 0x2b, 0xcd, 0x4d, 0x2d, 0x4a, 0x2c, 0xc9, 0x2f, 0x02, 0x1b, 0xc4, 0x1b, 0x84, 0x10, 0x10, + 0x8a, 0xe4, 0xe2, 0x4e, 0x49, 0xcd, 0xcb, 0xcf, 0xcd, 0xcc, 0x03, 0xcb, 0x33, 0x29, 0x30, 0x6a, + 0xf0, 0x19, 0xe9, 0xea, 0x21, 0xfc, 0xa1, 0x87, 0x61, 0xa2, 0x9e, 0x0b, 0x42, 0x43, 0x48, 0x65, + 0x41, 0xaa, 0x13, 0xc7, 0x2f, 0x27, 0xd6, 0x26, 0x46, 0x26, 0x01, 0xc6, 0x20, 0x64, 0xb3, 0x94, + 0x6c, 0xb9, 0xf8, 0xd1, 0x54, 0x0a, 0x71, 0x73, 0xb1, 0x7b, 0x84, 0xfa, 0xb9, 0x04, 0xb9, 0xba, + 0x08, 0x30, 0x08, 0x09, 0x70, 0xf1, 0x84, 0xb8, 0xfa, 0xc5, 0x87, 0x78, 0xf8, 0x87, 0x06, 0x3b, + 0xfa, 0xb9, 0x08, 0x30, 0x82, 0xa4, 0x7d, 0x3d, 0x7d, 0x7c, 0x3c, 0xfd, 0xfd, 0x04, 0x98, 0x9c, + 0x8c, 0x76, 0x35, 0x9c, 0xb8, 0xc8, 0xc6, 0x24, 0xc0, 0xc8, 0x25, 0x91, 0x99, 0x0f, 0x71, 0x50, + 0x41, 0x51, 0x7e, 0x45, 0x25, 0x92, 0xdb, 0x9c, 0x78, 0xa0, 0x4e, 0x0a, 0x00, 0x85, 0x5c, 0x00, + 0x63, 0x12, 0x1b, 0x38, 0x08, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x0b, 0xd6, 0x6f, + 0xa2, 0x01, 0x00, 0x00, } - -func (this *Percent) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Percent) - if !ok { - that2, ok := that.(Percent) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *FractionalPercent) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FractionalPercent) - if !ok { - that2, ok := that.(FractionalPercent) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Numerator != that1.Numerator { - return false - } - if this.Denominator != that1.Denominator { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Percent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Percent) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value != 0 { - dAtA[i] = 0x9 - i++ - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *FractionalPercent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FractionalPercent) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Numerator != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPercent(dAtA, i, uint64(m.Numerator)) - } - if m.Denominator != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintPercent(dAtA, i, uint64(m.Denominator)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintPercent(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Percent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FractionalPercent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Numerator != 0 { - n += 1 + sovPercent(uint64(m.Numerator)) - } - if m.Denominator != 0 { - n += 1 + sovPercent(uint64(m.Denominator)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovPercent(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozPercent(x uint64) (n int) { - return sovPercent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Percent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPercent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Percent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Percent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipPercent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPercent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPercent - } - 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 *FractionalPercent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPercent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FractionalPercent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FractionalPercent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Numerator", wireType) - } - m.Numerator = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPercent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Numerator |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Denominator", wireType) - } - m.Denominator = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPercent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Denominator |= FractionalPercent_DenominatorType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipPercent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthPercent - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthPercent - } - 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 skipPercent(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPercent - } - 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, ErrIntOverflowPercent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPercent - } - 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, ErrInvalidLengthPercent - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthPercent - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPercent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPercent(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthPercent - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthPercent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPercent = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.validate.go index 8a53ee532c..10a2f985ec 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/percent.pb.validate.go @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _percent_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on Percent with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *Percent) Validate() error { diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.go index db764c2166..b4d44741df 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.go @@ -1,17 +1,13 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/type/range.proto package envoy_type import ( - bytes "bytes" - encoding_binary "encoding/binary" fmt "fmt" - io "io" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" math "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,14 +19,10 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// Specifies the int64 start and end of the range using half-open interval semantics [start, -// end). type Int64Range struct { - // start of the range (inclusive) - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // end of the range (exclusive) + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -43,26 +35,18 @@ func (*Int64Range) ProtoMessage() {} func (*Int64Range) Descriptor() ([]byte, []int) { return fileDescriptor_6d5354588716e6e7, []int{0} } + func (m *Int64Range) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Int64Range.Unmarshal(m, b) } func (m *Int64Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Int64Range.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Int64Range.Marshal(b, m, deterministic) } func (m *Int64Range) XXX_Merge(src proto.Message) { xxx_messageInfo_Int64Range.Merge(m, src) } func (m *Int64Range) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Int64Range.Size(m) } func (m *Int64Range) XXX_DiscardUnknown() { xxx_messageInfo_Int64Range.DiscardUnknown(m) @@ -84,12 +68,55 @@ func (m *Int64Range) GetEnd() int64 { return 0 } -// Specifies the double start and end of the range using half-open interval semantics [start, -// end). +type Int32Range struct { + Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int32Range) Reset() { *m = Int32Range{} } +func (m *Int32Range) String() string { return proto.CompactTextString(m) } +func (*Int32Range) ProtoMessage() {} +func (*Int32Range) Descriptor() ([]byte, []int) { + return fileDescriptor_6d5354588716e6e7, []int{1} +} + +func (m *Int32Range) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Int32Range.Unmarshal(m, b) +} +func (m *Int32Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Int32Range.Marshal(b, m, deterministic) +} +func (m *Int32Range) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int32Range.Merge(m, src) +} +func (m *Int32Range) XXX_Size() int { + return xxx_messageInfo_Int32Range.Size(m) +} +func (m *Int32Range) XXX_DiscardUnknown() { + xxx_messageInfo_Int32Range.DiscardUnknown(m) +} + +var xxx_messageInfo_Int32Range proto.InternalMessageInfo + +func (m *Int32Range) GetStart() int32 { + if m != nil { + return m.Start + } + return 0 +} + +func (m *Int32Range) GetEnd() int32 { + if m != nil { + return m.End + } + return 0 +} + type DoubleRange struct { - // start of the range (inclusive) - Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` - // end of the range (exclusive) + Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -100,28 +127,20 @@ func (m *DoubleRange) Reset() { *m = DoubleRange{} } func (m *DoubleRange) String() string { return proto.CompactTextString(m) } func (*DoubleRange) ProtoMessage() {} func (*DoubleRange) Descriptor() ([]byte, []int) { - return fileDescriptor_6d5354588716e6e7, []int{1} + return fileDescriptor_6d5354588716e6e7, []int{2} } + func (m *DoubleRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_DoubleRange.Unmarshal(m, b) } func (m *DoubleRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_DoubleRange.Marshal(b, m, deterministic) } func (m *DoubleRange) XXX_Merge(src proto.Message) { xxx_messageInfo_DoubleRange.Merge(m, src) } func (m *DoubleRange) XXX_Size() int { - return m.Size() + return xxx_messageInfo_DoubleRange.Size(m) } func (m *DoubleRange) XXX_DiscardUnknown() { xxx_messageInfo_DoubleRange.DiscardUnknown(m) @@ -145,484 +164,25 @@ func (m *DoubleRange) GetEnd() float64 { func init() { proto.RegisterType((*Int64Range)(nil), "envoy.type.Int64Range") + proto.RegisterType((*Int32Range)(nil), "envoy.type.Int32Range") proto.RegisterType((*DoubleRange)(nil), "envoy.type.DoubleRange") } func init() { proto.RegisterFile("envoy/type/range.proto", fileDescriptor_6d5354588716e6e7) } var fileDescriptor_6d5354588716e6e7 = []byte{ - // 184 bytes of a gzipped FileDescriptorProto + // 195 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xcd, 0x2b, 0xcb, 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2f, 0x4a, 0xcc, 0x4b, 0x4f, 0xd5, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0x8b, 0xeb, 0x81, 0xc4, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, - 0xc2, 0xfa, 0x20, 0x16, 0x44, 0x85, 0x92, 0x09, 0x17, 0x97, 0x67, 0x5e, 0x89, 0x99, 0x49, 0x10, - 0x48, 0x97, 0x90, 0x08, 0x17, 0x6b, 0x71, 0x49, 0x62, 0x51, 0x89, 0x04, 0xa3, 0x02, 0xa3, 0x06, - 0x73, 0x10, 0x84, 0x23, 0x24, 0xc0, 0xc5, 0x9c, 0x9a, 0x97, 0x22, 0xc1, 0x04, 0x16, 0x03, 0x31, - 0x95, 0x4c, 0xb9, 0xb8, 0x5d, 0xf2, 0x4b, 0x93, 0x72, 0x52, 0xb1, 0x68, 0x63, 0xc4, 0xa2, 0x8d, - 0x11, 0xac, 0xcd, 0xc9, 0x65, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, - 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x91, 0x4b, 0x22, 0x33, 0x5f, 0x0f, 0xec, 0xc6, 0x82, 0xa2, 0xfc, - 0x8a, 0x4a, 0x3d, 0x84, 0x73, 0x9d, 0xb8, 0xc0, 0x46, 0x07, 0x80, 0x1c, 0x19, 0xc0, 0x18, 0x05, - 0xf1, 0x48, 0x3c, 0x48, 0x26, 0x89, 0x0d, 0xec, 0x72, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xf5, 0x05, 0x36, 0xce, 0xf5, 0x00, 0x00, 0x00, + 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0x8b, 0xeb, 0x81, 0xc4, 0xa5, 0x64, 0x4b, 0x53, 0x0a, 0x12, 0xf5, + 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0xf5, 0x8b, 0x4b, 0x12, 0x4b, + 0x4a, 0x8b, 0x21, 0x4a, 0x95, 0x4c, 0xb8, 0xb8, 0x3c, 0xf3, 0x4a, 0xcc, 0x4c, 0x82, 0x40, 0xda, + 0x85, 0x44, 0xb8, 0x58, 0x8b, 0x4b, 0x12, 0x8b, 0x4a, 0x24, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, + 0x20, 0x1c, 0x21, 0x01, 0x2e, 0xe6, 0xd4, 0xbc, 0x14, 0x09, 0x26, 0xb0, 0x18, 0x88, 0x09, 0xd5, + 0x65, 0x6c, 0x84, 0x45, 0x17, 0x2b, 0x16, 0x5d, 0xac, 0x10, 0x5d, 0xa6, 0x5c, 0xdc, 0x2e, 0xf9, + 0xa5, 0x49, 0x39, 0xa9, 0x58, 0xb4, 0x31, 0x62, 0xd1, 0xc6, 0x08, 0xd6, 0xe6, 0x64, 0xb0, 0xab, + 0xe1, 0xc4, 0x45, 0x36, 0x26, 0x01, 0x46, 0x2e, 0x89, 0xcc, 0x7c, 0x3d, 0xb0, 0xd7, 0x0a, 0x8a, + 0xf2, 0x2b, 0x2a, 0xf5, 0x10, 0xbe, 0x74, 0xe2, 0x02, 0x1b, 0x19, 0x00, 0xf2, 0x52, 0x00, 0x63, + 0x12, 0x1b, 0xd8, 0x6f, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xfa, 0xc1, 0x35, 0x20, + 0x01, 0x00, 0x00, } - -func (this *Int64Range) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Int64Range) - if !ok { - that2, ok := that.(Int64Range) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Start != that1.Start { - return false - } - if this.End != that1.End { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DoubleRange) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DoubleRange) - if !ok { - that2, ok := that.(DoubleRange) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Start != that1.Start { - return false - } - if this.End != that1.End { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Int64Range) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Int64Range) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Start != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintRange(dAtA, i, uint64(m.Start)) - } - if m.End != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintRange(dAtA, i, uint64(m.End)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DoubleRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleRange) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Start != 0 { - dAtA[i] = 0x9 - i++ - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Start)))) - i += 8 - } - if m.End != 0 { - dAtA[i] = 0x11 - i++ - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.End)))) - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintRange(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Int64Range) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Start != 0 { - n += 1 + sovRange(uint64(m.Start)) - } - if m.End != 0 { - n += 1 + sovRange(uint64(m.End)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DoubleRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Start != 0 { - n += 9 - } - if m.End != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRange(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozRange(x uint64) (n int) { - return sovRange(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Int64Range) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Int64Range: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Int64Range: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - m.Start = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Start |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - m.End = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.End |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRange(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRange - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRange - } - 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 *DoubleRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRange - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Start = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.End = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipRange(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRange - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRange - } - 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 skipRange(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRange - } - 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, ErrIntOverflowRange - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRange - } - 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, ErrInvalidLengthRange - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRange - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRange - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRange(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRange - } - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthRange = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRange = fmt.Errorf("proto: integer overflow") -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.validate.go index 8cb4882514..abdc17c202 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/range.pb.validate.go @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes" ) // ensure the imports are used @@ -30,9 +30,12 @@ var ( _ = time.Duration(0) _ = (*url.URL)(nil) _ = (*mail.Address)(nil) - _ = types.DynamicAny{} + _ = ptypes.DynamicAny{} ) +// define the regex for a UUID once up-front +var _range_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + // Validate checks the field values on Int64Range with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *Int64Range) Validate() error { @@ -101,6 +104,74 @@ var _ interface { 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, an error is returned. +func (m *Int32Range) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Start + + // no validation rules for End + + return nil +} + +// 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, an error // is returned. diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.go new file mode 100644 index 0000000000..1e43e0122b --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/semantic_version.proto + +package envoy_type + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type SemanticVersion struct { + 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SemanticVersion) Reset() { *m = SemanticVersion{} } +func (m *SemanticVersion) String() string { return proto.CompactTextString(m) } +func (*SemanticVersion) ProtoMessage() {} +func (*SemanticVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_9d201ef6b9829a8e, []int{0} +} + +func (m *SemanticVersion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SemanticVersion.Unmarshal(m, b) +} +func (m *SemanticVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SemanticVersion.Marshal(b, m, deterministic) +} +func (m *SemanticVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_SemanticVersion.Merge(m, src) +} +func (m *SemanticVersion) XXX_Size() int { + return xxx_messageInfo_SemanticVersion.Size(m) +} +func (m *SemanticVersion) XXX_DiscardUnknown() { + xxx_messageInfo_SemanticVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_SemanticVersion proto.InternalMessageInfo + +func (m *SemanticVersion) GetMajorNumber() uint32 { + if m != nil { + return m.MajorNumber + } + return 0 +} + +func (m *SemanticVersion) GetMinorNumber() uint32 { + if m != nil { + return m.MinorNumber + } + return 0 +} + +func (m *SemanticVersion) GetPatch() uint32 { + if m != nil { + return m.Patch + } + return 0 +} + +func init() { + proto.RegisterType((*SemanticVersion)(nil), "envoy.type.SemanticVersion") +} + +func init() { proto.RegisterFile("envoy/type/semantic_version.proto", fileDescriptor_9d201ef6b9829a8e) } + +var fileDescriptor_9d201ef6b9829a8e = []byte{ + // 199 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcd, 0x2b, 0xcb, + 0xaf, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2f, 0x4e, 0xcd, 0x4d, 0xcc, 0x2b, 0xc9, 0x4c, 0x8e, + 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, + 0x2b, 0xd1, 0x03, 0x29, 0x91, 0x92, 0x2d, 0x4d, 0x29, 0x48, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, + 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0x86, 0x28, 0x55, + 0xca, 0xe5, 0xe2, 0x0f, 0x86, 0x1a, 0x12, 0x06, 0x31, 0x43, 0x48, 0x91, 0x8b, 0x27, 0x37, 0x31, + 0x2b, 0xbf, 0x28, 0x3e, 0xaf, 0x34, 0x37, 0x29, 0xb5, 0x48, 0x82, 0x51, 0x81, 0x51, 0x83, 0x37, + 0x88, 0x1b, 0x2c, 0xe6, 0x07, 0x16, 0x02, 0x2b, 0xc9, 0xcc, 0x43, 0x28, 0x61, 0x82, 0x2a, 0x01, + 0x89, 0x41, 0x95, 0x88, 0x70, 0xb1, 0x16, 0x24, 0x96, 0x24, 0x67, 0x48, 0x30, 0x83, 0xe5, 0x20, + 0x1c, 0x27, 0xab, 0x5d, 0x0d, 0x27, 0x2e, 0xb2, 0x31, 0x09, 0x30, 0x72, 0x49, 0x64, 0xe6, 0xeb, + 0x81, 0x9d, 0x59, 0x50, 0x94, 0x5f, 0x51, 0xa9, 0x87, 0x70, 0xb1, 0x93, 0x08, 0x9a, 0x83, 0x02, + 0x40, 0x0e, 0x0d, 0x60, 0x4c, 0x62, 0x03, 0xbb, 0xd8, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd3, + 0x44, 0x4c, 0xaa, 0x01, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.validate.go new file mode 100644 index 0000000000..3f1b3b9e32 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/semantic_version.pb.validate.go @@ -0,0 +1,108 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/semantic_version.proto + +package envoy_type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _semantic_version_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on SemanticVersion with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *SemanticVersion) Validate() error { + if m == nil { + return nil + } + + // no validation rules for MajorNumber + + // no validation rules for MinorNumber + + // no validation rules for Patch + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.go new file mode 100644 index 0000000000..99efba5a14 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.go @@ -0,0 +1,110 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/token_bucket.proto + +package envoy_type + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type TokenBucket struct { + MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` + TokensPerFill *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"` + FillInterval *duration.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TokenBucket) Reset() { *m = TokenBucket{} } +func (m *TokenBucket) String() string { return proto.CompactTextString(m) } +func (*TokenBucket) ProtoMessage() {} +func (*TokenBucket) Descriptor() ([]byte, []int) { + return fileDescriptor_04e870b436501a80, []int{0} +} + +func (m *TokenBucket) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TokenBucket.Unmarshal(m, b) +} +func (m *TokenBucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TokenBucket.Marshal(b, m, deterministic) +} +func (m *TokenBucket) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenBucket.Merge(m, src) +} +func (m *TokenBucket) XXX_Size() int { + return xxx_messageInfo_TokenBucket.Size(m) +} +func (m *TokenBucket) XXX_DiscardUnknown() { + xxx_messageInfo_TokenBucket.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenBucket proto.InternalMessageInfo + +func (m *TokenBucket) GetMaxTokens() uint32 { + if m != nil { + return m.MaxTokens + } + return 0 +} + +func (m *TokenBucket) GetTokensPerFill() *wrappers.UInt32Value { + if m != nil { + return m.TokensPerFill + } + return nil +} + +func (m *TokenBucket) GetFillInterval() *duration.Duration { + if m != nil { + return m.FillInterval + } + return nil +} + +func init() { + proto.RegisterType((*TokenBucket)(nil), "envoy.type.TokenBucket") +} + +func init() { proto.RegisterFile("envoy/type/token_bucket.proto", fileDescriptor_04e870b436501a80) } + +var fileDescriptor_04e870b436501a80 = []byte{ + // 311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xc1, 0x4a, 0xc3, 0x30, + 0x1c, 0xc6, 0x97, 0x39, 0x36, 0xcd, 0x1c, 0x8e, 0x5e, 0xac, 0xe2, 0x64, 0x78, 0x90, 0xb1, 0x43, + 0x02, 0x1b, 0xf8, 0x00, 0x41, 0x84, 0x09, 0xc2, 0x18, 0xea, 0xb5, 0x64, 0x36, 0x1b, 0x61, 0x59, + 0x12, 0xd2, 0xa4, 0xb6, 0x37, 0x9f, 0xc7, 0x47, 0xf0, 0x09, 0x3c, 0xea, 0xeb, 0xec, 0x24, 0x4d, + 0x5b, 0x26, 0xec, 0x16, 0xf8, 0x7d, 0xdf, 0x97, 0xef, 0xff, 0xc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xdc, 0x58, 0x9c, 0x16, 0xde, 0x59, 0x65, 0x25, 0x77, 0x5f, 0x1f, 0xdf, 0xbf, 0xed, 0x66, + 0x1f, 0xc0, 0x90, 0x2b, 0xe4, 0x37, 0xd6, 0x46, 0x65, 0x39, 0xda, 0xcf, 0x4d, 0xfa, 0xff, 0x6e, + 0x9e, 0x17, 0xd9, 0x73, 0xb0, 0x6c, 0xfb, 0x4f, 0xa6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf2, + 0x4d, 0xa8, 0xdc, 0xb6, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.validate.go new file mode 100644 index 0000000000..f66d2258c8 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/token_bucket.pb.validate.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/token_bucket.proto + +package envoy_type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _token_bucket_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on TokenBucket with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *TokenBucket) Validate() error { + if m == nil { + return nil + } + + if m.GetMaxTokens() <= 0 { + return TokenBucketValidationError{ + field: "MaxTokens", + reason: "value must be greater than 0", + } + } + + if wrapper := m.GetTokensPerFill(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + return TokenBucketValidationError{ + field: "TokensPerFill", + reason: "value must be greater than 0", + } + } + + } + + if m.GetFillInterval() == nil { + return TokenBucketValidationError{ + field: "FillInterval", + reason: "value is required", + } + } + + if d := m.GetFillInterval(); d != nil { + dur, err := ptypes.Duration(d) + if err != nil { + return TokenBucketValidationError{ + field: "FillInterval", + reason: "value is not a valid duration", + cause: err, + } + } + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + return TokenBucketValidationError{ + field: "FillInterval", + reason: "value must be greater than 0s", + } + } + + } + + return nil +} + +// 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/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go new file mode 100644 index 0000000000..5895555f17 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go @@ -0,0 +1,376 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: envoy/type/tracing/v2/custom_tag.proto + +package envoy_type_tracing_v2 + +import ( + fmt "fmt" + _ "github.com/cncf/udpa/go/udpa/annotations" + v2 "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +type CustomTag struct { + Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + // Types that are valid to be assigned to Type: + // *CustomTag_Literal_ + // *CustomTag_Environment_ + // *CustomTag_RequestHeader + // *CustomTag_Metadata_ + Type isCustomTag_Type `protobuf_oneof:"type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomTag) Reset() { *m = CustomTag{} } +func (m *CustomTag) String() string { return proto.CompactTextString(m) } +func (*CustomTag) ProtoMessage() {} +func (*CustomTag) Descriptor() ([]byte, []int) { + return fileDescriptor_d6b7ba7857eb6848, []int{0} +} + +func (m *CustomTag) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomTag.Unmarshal(m, b) +} +func (m *CustomTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomTag.Marshal(b, m, deterministic) +} +func (m *CustomTag) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomTag.Merge(m, src) +} +func (m *CustomTag) XXX_Size() int { + return xxx_messageInfo_CustomTag.Size(m) +} +func (m *CustomTag) XXX_DiscardUnknown() { + xxx_messageInfo_CustomTag.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomTag proto.InternalMessageInfo + +func (m *CustomTag) GetTag() string { + if m != nil { + return m.Tag + } + return "" +} + +type isCustomTag_Type interface { + isCustomTag_Type() +} + +type CustomTag_Literal_ struct { + Literal *CustomTag_Literal `protobuf:"bytes,2,opt,name=literal,proto3,oneof"` +} + +type CustomTag_Environment_ struct { + Environment *CustomTag_Environment `protobuf:"bytes,3,opt,name=environment,proto3,oneof"` +} + +type CustomTag_RequestHeader struct { + RequestHeader *CustomTag_Header `protobuf:"bytes,4,opt,name=request_header,json=requestHeader,proto3,oneof"` +} + +type CustomTag_Metadata_ struct { + 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() {} + +func (m *CustomTag) GetType() isCustomTag_Type { + if m != nil { + return m.Type + } + return nil +} + +func (m *CustomTag) GetLiteral() *CustomTag_Literal { + if x, ok := m.GetType().(*CustomTag_Literal_); ok { + return x.Literal + } + return nil +} + +func (m *CustomTag) GetEnvironment() *CustomTag_Environment { + if x, ok := m.GetType().(*CustomTag_Environment_); ok { + return x.Environment + } + return nil +} + +func (m *CustomTag) GetRequestHeader() *CustomTag_Header { + if x, ok := m.GetType().(*CustomTag_RequestHeader); ok { + return x.RequestHeader + } + return nil +} + +func (m *CustomTag) GetMetadata() *CustomTag_Metadata { + if x, ok := m.GetType().(*CustomTag_Metadata_); ok { + return x.Metadata + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CustomTag) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*CustomTag_Literal_)(nil), + (*CustomTag_Environment_)(nil), + (*CustomTag_RequestHeader)(nil), + (*CustomTag_Metadata_)(nil), + } +} + +type CustomTag_Literal struct { + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomTag_Literal) Reset() { *m = CustomTag_Literal{} } +func (m *CustomTag_Literal) String() string { return proto.CompactTextString(m) } +func (*CustomTag_Literal) ProtoMessage() {} +func (*CustomTag_Literal) Descriptor() ([]byte, []int) { + return fileDescriptor_d6b7ba7857eb6848, []int{0, 0} +} + +func (m *CustomTag_Literal) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomTag_Literal.Unmarshal(m, b) +} +func (m *CustomTag_Literal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomTag_Literal.Marshal(b, m, deterministic) +} +func (m *CustomTag_Literal) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomTag_Literal.Merge(m, src) +} +func (m *CustomTag_Literal) XXX_Size() int { + return xxx_messageInfo_CustomTag_Literal.Size(m) +} +func (m *CustomTag_Literal) XXX_DiscardUnknown() { + xxx_messageInfo_CustomTag_Literal.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomTag_Literal proto.InternalMessageInfo + +func (m *CustomTag_Literal) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +type CustomTag_Environment struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomTag_Environment) Reset() { *m = CustomTag_Environment{} } +func (m *CustomTag_Environment) String() string { return proto.CompactTextString(m) } +func (*CustomTag_Environment) ProtoMessage() {} +func (*CustomTag_Environment) Descriptor() ([]byte, []int) { + return fileDescriptor_d6b7ba7857eb6848, []int{0, 1} +} + +func (m *CustomTag_Environment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomTag_Environment.Unmarshal(m, b) +} +func (m *CustomTag_Environment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomTag_Environment.Marshal(b, m, deterministic) +} +func (m *CustomTag_Environment) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomTag_Environment.Merge(m, src) +} +func (m *CustomTag_Environment) XXX_Size() int { + return xxx_messageInfo_CustomTag_Environment.Size(m) +} +func (m *CustomTag_Environment) XXX_DiscardUnknown() { + xxx_messageInfo_CustomTag_Environment.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomTag_Environment proto.InternalMessageInfo + +func (m *CustomTag_Environment) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *CustomTag_Environment) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +type CustomTag_Header struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomTag_Header) Reset() { *m = CustomTag_Header{} } +func (m *CustomTag_Header) String() string { return proto.CompactTextString(m) } +func (*CustomTag_Header) ProtoMessage() {} +func (*CustomTag_Header) Descriptor() ([]byte, []int) { + return fileDescriptor_d6b7ba7857eb6848, []int{0, 2} +} + +func (m *CustomTag_Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomTag_Header.Unmarshal(m, b) +} +func (m *CustomTag_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomTag_Header.Marshal(b, m, deterministic) +} +func (m *CustomTag_Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomTag_Header.Merge(m, src) +} +func (m *CustomTag_Header) XXX_Size() int { + return xxx_messageInfo_CustomTag_Header.Size(m) +} +func (m *CustomTag_Header) XXX_DiscardUnknown() { + xxx_messageInfo_CustomTag_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomTag_Header proto.InternalMessageInfo + +func (m *CustomTag_Header) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *CustomTag_Header) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +type CustomTag_Metadata struct { + Kind *v2.MetadataKind `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + MetadataKey *v2.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` + DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomTag_Metadata) Reset() { *m = CustomTag_Metadata{} } +func (m *CustomTag_Metadata) String() string { return proto.CompactTextString(m) } +func (*CustomTag_Metadata) ProtoMessage() {} +func (*CustomTag_Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d6b7ba7857eb6848, []int{0, 3} +} + +func (m *CustomTag_Metadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomTag_Metadata.Unmarshal(m, b) +} +func (m *CustomTag_Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomTag_Metadata.Marshal(b, m, deterministic) +} +func (m *CustomTag_Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomTag_Metadata.Merge(m, src) +} +func (m *CustomTag_Metadata) XXX_Size() int { + return xxx_messageInfo_CustomTag_Metadata.Size(m) +} +func (m *CustomTag_Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_CustomTag_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomTag_Metadata proto.InternalMessageInfo + +func (m *CustomTag_Metadata) GetKind() *v2.MetadataKind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *CustomTag_Metadata) GetMetadataKey() *v2.MetadataKey { + if m != nil { + return m.MetadataKey + } + return nil +} + +func (m *CustomTag_Metadata) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +func init() { + proto.RegisterType((*CustomTag)(nil), "envoy.type.tracing.v2.CustomTag") + proto.RegisterType((*CustomTag_Literal)(nil), "envoy.type.tracing.v2.CustomTag.Literal") + proto.RegisterType((*CustomTag_Environment)(nil), "envoy.type.tracing.v2.CustomTag.Environment") + proto.RegisterType((*CustomTag_Header)(nil), "envoy.type.tracing.v2.CustomTag.Header") + proto.RegisterType((*CustomTag_Metadata)(nil), "envoy.type.tracing.v2.CustomTag.Metadata") +} + +func init() { + proto.RegisterFile("envoy/type/tracing/v2/custom_tag.proto", fileDescriptor_d6b7ba7857eb6848) +} + +var fileDescriptor_d6b7ba7857eb6848 = []byte{ + // 473 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xcb, 0x8a, 0xd4, 0x40, + 0x14, 0x86, 0x53, 0xdd, 0xe9, 0xdb, 0xc9, 0xf4, 0x20, 0x05, 0x62, 0x6c, 0x19, 0x68, 0x6d, 0x2f, + 0x2d, 0x48, 0x02, 0x71, 0xe3, 0x4e, 0x88, 0xb7, 0x80, 0x8a, 0x21, 0x88, 0xdb, 0xe6, 0x38, 0x29, + 0xdb, 0x30, 0x49, 0xa5, 0xad, 0x54, 0x82, 0xd9, 0xf9, 0x4a, 0x6e, 0x5d, 0xb9, 0x9c, 0xad, 0x4f, + 0xe1, 0x2b, 0xc8, 0xac, 0x24, 0x95, 0xcb, 0xb4, 0x76, 0x43, 0x33, 0xbb, 0xca, 0xa9, 0xff, 0xff, + 0x72, 0xea, 0x3f, 0x55, 0x70, 0x9f, 0xf1, 0x22, 0x2d, 0x6d, 0x59, 0x6e, 0x98, 0x2d, 0x05, 0x9e, + 0x46,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 0xff, + 0xff, 0xea, 0x2c, 0x64, 0xf5, 0xd1, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go new file mode 100644 index 0000000000..af8491f4a0 --- /dev/null +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go @@ -0,0 +1,488 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/tracing/v2/custom_tag.proto + +package envoy_type_tracing_v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "github.com/golang/protobuf/ptypes" +) + +// 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) + _ = ptypes.DynamicAny{} +) + +// define the regex for a UUID once up-front +var _custom_tag_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") + +// Validate checks the field values on CustomTag with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *CustomTag) Validate() error { + if m == nil { + return nil + } + + if len(m.GetTag()) < 1 { + return CustomTagValidationError{ + field: "Tag", + reason: "value length must be at least 1 bytes", + } + } + + switch m.Type.(type) { + + case *CustomTag_Literal_: + + 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, 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, 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, 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: + return CustomTagValidationError{ + field: "Type", + reason: "value is required", + } + + } + + return nil +} + +// 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, an +// error is returned. +func (m *CustomTag_Literal) Validate() error { + if m == nil { + return nil + } + + if len(m.GetValue()) < 1 { + return CustomTag_LiteralValidationError{ + field: "Value", + reason: "value length must be at least 1 bytes", + } + } + + return nil +} + +// 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, an error is returned. +func (m *CustomTag_Environment) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return CustomTag_EnvironmentValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + // no validation rules for DefaultValue + + return nil +} + +// 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, an +// error is returned. +func (m *CustomTag_Header) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) < 1 { + return CustomTag_HeaderValidationError{ + field: "Name", + reason: "value length must be at least 1 bytes", + } + } + + if !_CustomTag_Header_Name_Pattern.MatchString(m.GetName()) { + return CustomTag_HeaderValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + } + + // no validation rules for DefaultValue + + return nil +} + +// 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, an error is returned. +func (m *CustomTag_Metadata) Validate() error { + if m == nil { + return nil + } + + 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 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 + + return nil +} + +// 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/envoyproxy/go-control-plane/pkg/util/struct.go b/vendor/github.com/envoyproxy/go-control-plane/pkg/conversion/struct.go similarity index 77% rename from vendor/github.com/envoyproxy/go-control-plane/pkg/util/struct.go rename to vendor/github.com/envoyproxy/go-control-plane/pkg/conversion/struct.go index a56e8f9567..a37748a218 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/pkg/util/struct.go +++ b/vendor/github.com/envoyproxy/go-control-plane/pkg/conversion/struct.go @@ -12,22 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package util contains shared utility functions. -package util +// Package conversion contains shared utility functions for converting xDS resources. +package conversion import ( "bytes" "errors" - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" + pstruct "github.com/golang/protobuf/ptypes/struct" ) // MessageToStruct encodes a protobuf Message into a Struct. Hilariously, it // uses JSON as the intermediary // author:glen@turbinelabs.io -func MessageToStruct(msg proto.Message) (*types.Struct, error) { +func MessageToStruct(msg proto.Message) (*pstruct.Struct, error) { if msg == nil { return nil, errors.New("nil message") } @@ -37,7 +37,7 @@ func MessageToStruct(msg proto.Message) (*types.Struct, error) { return nil, err } - pbs := &types.Struct{} + pbs := &pstruct.Struct{} if err := jsonpb.Unmarshal(buf, pbs); err != nil { return nil, err } @@ -46,7 +46,7 @@ func MessageToStruct(msg proto.Message) (*types.Struct, error) { } // StructToMessage decodes a protobuf Message from a Struct. -func StructToMessage(pbst *types.Struct, out proto.Message) error { +func StructToMessage(pbst *pstruct.Struct, out proto.Message) error { if pbst == nil { return errors.New("nil struct") } diff --git a/vendor/github.com/envoyproxy/go-control-plane/pkg/util/wellknown.go b/vendor/github.com/envoyproxy/go-control-plane/pkg/wellknown/wellknown.go similarity index 75% rename from vendor/github.com/envoyproxy/go-control-plane/pkg/util/wellknown.go rename to vendor/github.com/envoyproxy/go-control-plane/pkg/wellknown/wellknown.go index b0627e8d1e..ff1978561a 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/pkg/util/wellknown.go +++ b/vendor/github.com/envoyproxy/go-control-plane/pkg/wellknown/wellknown.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package util +// Package wellknown contains common names for filters, listeners, etc. +package wellknown // HTTP filter names const ( @@ -45,7 +46,11 @@ const ( // Squash HTTP filter Squash = "envoy.squash" // HTTPExternalAuthorization HTTP filter - HTTPExternalAuthorization = "envoy.ext_authz" + HTTPExternalAuthorization = "envoy.filters.http.ext_authz" + // HTTPRoleBasedAccessControl HTTP filter + HTTPRoleBasedAccessControl = "envoy.filters.http.rbac" + // HTTPGRPCStats HTTP filter + HTTPGRPCStats = "envoy.filters.http.grpc_stats" ) // Network filter names @@ -69,7 +74,9 @@ const ( // MySQLProxy network filter MySQLProxy = "envoy.filters.network.mysql_proxy" // ExternalAuthorization network filter - ExternalAuthorization = "envoy.ext_authz" + ExternalAuthorization = "envoy.filters.network.ext_authz" + // RoleBasedAccessControl network filter + RoleBasedAccessControl = "envoy.filters.network.rbac" ) // Listener filter names @@ -80,6 +87,8 @@ const ( ProxyProtocol = "envoy.listener.proxy_protocol" // TlsInspector listener filter TlsInspector = "envoy.listener.tls_inspector" + // HttpInspector listener filter + HttpInspector = "envoy.listener.http_inspector" ) // Tracing provider names @@ -109,3 +118,17 @@ const ( // HTTPGRPCAccessLog sink for the HTTP gRPC access log service HTTPGRPCAccessLog = "envoy.http_grpc_access_log" ) + +// Transport socket names +const ( + // TransportSocket Alts + TransportSocketAlts = "envoy.transport_sockets.alts" + // TransportSocket Tap + TransportSocketTap = "envoy.transport_sockets.tap" + // TransportSocket RawBuffer + TransportSocketRawBuffer = "envoy.transport_sockets.raw_buffer" + // TransportSocket Tls + TransportSocketTls = "envoy.transport_sockets.tls" + // TransportSocket Quic + TransportSocketQuic = "envoy.transport_sockets.quic" +) diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/NOTICE b/vendor/github.com/envoyproxy/protoc-gen-validate/NOTICE new file mode 100644 index 0000000000..60884a0590 --- /dev/null +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/NOTICE @@ -0,0 +1,4 @@ +protoc-gen-validate +Copyright 2019 Envoy Project Authors + +Licensed under Apache License 2.0. See LICENSE for terms. diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD index af8c6c182f..8a3d063d62 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD @@ -31,7 +31,7 @@ py_proto_library( go_proto_library( name = "go_default_library", - importpath = "github.com/lyft/protoc-gen-validate/validate", + importpath = "github.com/envoyproxy/protoc-gen-validate/validate", proto = ":validate_proto", 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 index 0b4119859f..b309c2ef3b 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h @@ -2,12 +2,20 @@ #define _VALIDATE_H #include +#include #include #include #include #include #include +#if !defined(_WIN32) +#include +#else +#include +#include +#endif + namespace pgv { using std::string; @@ -68,6 +76,49 @@ static inline bool Contains(const string& search_in, const string& to_find) return search_in.find(to_find) != string::npos; } +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 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 index ef5938c831..255dc5ec0e 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: validate/validate.proto -package validate // import "github.com/lyft/protoc-gen-validate/validate" +package validate // import "github.com/envoyproxy/protoc-gen-validate/validate" import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -21,6 +21,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +// 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 { // Types that are valid to be assigned to Type: // *FieldRules_Float @@ -55,7 +57,7 @@ func (m *FieldRules) Reset() { *m = FieldRules{} } func (m *FieldRules) String() string { return proto.CompactTextString(m) } func (*FieldRules) ProtoMessage() {} func (*FieldRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{0} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{0} } func (m *FieldRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FieldRules.Unmarshal(m, b) @@ -82,91 +84,133 @@ type isFieldRules_Type interface { type FieldRules_Float struct { 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 { Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` } + type FieldRules_Message struct { Message *MessageRules `protobuf:"bytes,17,opt,name=message,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 { 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_Message) isFieldRules_Type() {} -func (*FieldRules_Repeated) isFieldRules_Type() {} -func (*FieldRules_Map) isFieldRules_Type() {} -func (*FieldRules_Any) isFieldRules_Type() {} -func (*FieldRules_Duration) isFieldRules_Type() {} +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_Message) 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() {} func (m *FieldRules) GetType() isFieldRules_Type { @@ -784,13 +828,29 @@ func _FieldRules_OneofSizer(msg proto.Message) (n int) { return n } +// FloatRules describes the constraints applied to `float` values type FloatRules struct { - Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - Lt *float32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` - Lte *float32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` - Gt *float32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` - Gte *float32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` - In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -801,7 +861,7 @@ func (m *FloatRules) Reset() { *m = FloatRules{} } func (m *FloatRules) String() string { return proto.CompactTextString(m) } func (*FloatRules) ProtoMessage() {} func (*FloatRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{1} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{1} } func (m *FloatRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FloatRules.Unmarshal(m, b) @@ -870,13 +930,29 @@ func (m *FloatRules) GetNotIn() []float32 { return nil } +// DoubleRules describes the constraints applied to `double` values type DoubleRules struct { - Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - Lt *float64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` - Lte *float64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` - Gt *float64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` - Gte *float64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` - In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -887,7 +963,7 @@ func (m *DoubleRules) Reset() { *m = DoubleRules{} } func (m *DoubleRules) String() string { return proto.CompactTextString(m) } func (*DoubleRules) ProtoMessage() {} func (*DoubleRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{2} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{2} } func (m *DoubleRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DoubleRules.Unmarshal(m, b) @@ -956,13 +1032,29 @@ func (m *DoubleRules) GetNotIn() []float64 { return nil } +// Int32Rules describes the constraints applied to `int32` values type Int32Rules struct { - Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - Lt *int32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - Lte *int32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - Gt *int32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - Gte *int32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -973,7 +1065,7 @@ func (m *Int32Rules) Reset() { *m = Int32Rules{} } func (m *Int32Rules) String() string { return proto.CompactTextString(m) } func (*Int32Rules) ProtoMessage() {} func (*Int32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{3} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{3} } func (m *Int32Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Int32Rules.Unmarshal(m, b) @@ -1042,13 +1134,29 @@ func (m *Int32Rules) GetNotIn() []int32 { return nil } +// Int64Rules describes the constraints applied to `int64` values type Int64Rules struct { - Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - Lt *int64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - Lte *int64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - Gt *int64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - Gte *int64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1059,7 +1167,7 @@ func (m *Int64Rules) Reset() { *m = Int64Rules{} } func (m *Int64Rules) String() string { return proto.CompactTextString(m) } func (*Int64Rules) ProtoMessage() {} func (*Int64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{4} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{4} } func (m *Int64Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Int64Rules.Unmarshal(m, b) @@ -1128,13 +1236,29 @@ func (m *Int64Rules) GetNotIn() []int64 { return nil } +// UInt32Rules describes the constraints applied to `uint32` values type UInt32Rules struct { - Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - Lt *uint32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - Lte *uint32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - Gt *uint32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - Gte *uint32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1145,7 +1269,7 @@ func (m *UInt32Rules) Reset() { *m = UInt32Rules{} } func (m *UInt32Rules) String() string { return proto.CompactTextString(m) } func (*UInt32Rules) ProtoMessage() {} func (*UInt32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{5} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{5} } func (m *UInt32Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UInt32Rules.Unmarshal(m, b) @@ -1214,13 +1338,29 @@ func (m *UInt32Rules) GetNotIn() []uint32 { return nil } +// UInt64Rules describes the constraints applied to `uint64` values type UInt64Rules struct { - Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - Lt *uint64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - Lte *uint64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - Gt *uint64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - Gte *uint64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1231,7 +1371,7 @@ func (m *UInt64Rules) Reset() { *m = UInt64Rules{} } func (m *UInt64Rules) String() string { return proto.CompactTextString(m) } func (*UInt64Rules) ProtoMessage() {} func (*UInt64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{6} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{6} } func (m *UInt64Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UInt64Rules.Unmarshal(m, b) @@ -1300,13 +1440,29 @@ func (m *UInt64Rules) GetNotIn() []uint64 { return nil } +// SInt32Rules describes the constraints applied to `sint32` values type SInt32Rules struct { - Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` - Lt *int32 `protobuf:"zigzag32,2,opt,name=lt" json:"lt,omitempty"` - Lte *int32 `protobuf:"zigzag32,3,opt,name=lte" json:"lte,omitempty"` - Gt *int32 `protobuf:"zigzag32,4,opt,name=gt" json:"gt,omitempty"` - Gte *int32 `protobuf:"zigzag32,5,opt,name=gte" json:"gte,omitempty"` - In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1317,7 +1473,7 @@ func (m *SInt32Rules) Reset() { *m = SInt32Rules{} } func (m *SInt32Rules) String() string { return proto.CompactTextString(m) } func (*SInt32Rules) ProtoMessage() {} func (*SInt32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{7} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{7} } func (m *SInt32Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SInt32Rules.Unmarshal(m, b) @@ -1386,13 +1542,29 @@ func (m *SInt32Rules) GetNotIn() []int32 { return nil } +// SInt64Rules describes the constraints applied to `sint64` values type SInt64Rules struct { - Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` - Lt *int64 `protobuf:"zigzag64,2,opt,name=lt" json:"lt,omitempty"` - Lte *int64 `protobuf:"zigzag64,3,opt,name=lte" json:"lte,omitempty"` - Gt *int64 `protobuf:"zigzag64,4,opt,name=gt" json:"gt,omitempty"` - Gte *int64 `protobuf:"zigzag64,5,opt,name=gte" json:"gte,omitempty"` - In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1403,7 +1575,7 @@ func (m *SInt64Rules) Reset() { *m = SInt64Rules{} } func (m *SInt64Rules) String() string { return proto.CompactTextString(m) } func (*SInt64Rules) ProtoMessage() {} func (*SInt64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{8} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{8} } func (m *SInt64Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SInt64Rules.Unmarshal(m, b) @@ -1472,13 +1644,29 @@ func (m *SInt64Rules) GetNotIn() []int64 { return nil } +// Fixed32Rules describes the constraints applied to `fixed32` values type Fixed32Rules struct { - Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - Lt *uint32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` - Lte *uint32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` - Gt *uint32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` - Gte *uint32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` - In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1489,7 +1677,7 @@ func (m *Fixed32Rules) Reset() { *m = Fixed32Rules{} } func (m *Fixed32Rules) String() string { return proto.CompactTextString(m) } func (*Fixed32Rules) ProtoMessage() {} func (*Fixed32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{9} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{9} } func (m *Fixed32Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Fixed32Rules.Unmarshal(m, b) @@ -1558,13 +1746,29 @@ func (m *Fixed32Rules) GetNotIn() []uint32 { return nil } +// Fixed64Rules describes the constraints applied to `fixed64` values type Fixed64Rules struct { - Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - Lt *uint64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` - Lte *uint64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` - Gt *uint64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` - Gte *uint64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` - In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1575,7 +1779,7 @@ func (m *Fixed64Rules) Reset() { *m = Fixed64Rules{} } func (m *Fixed64Rules) String() string { return proto.CompactTextString(m) } func (*Fixed64Rules) ProtoMessage() {} func (*Fixed64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{10} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{10} } func (m *Fixed64Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Fixed64Rules.Unmarshal(m, b) @@ -1644,13 +1848,29 @@ func (m *Fixed64Rules) GetNotIn() []uint64 { return nil } +// SFixed32Rules describes the constraints applied to `sfixed32` values type SFixed32Rules struct { - Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - Lt *int32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` - Lte *int32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` - Gt *int32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` - Gte *int32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` - In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1661,7 +1881,7 @@ func (m *SFixed32Rules) Reset() { *m = SFixed32Rules{} } func (m *SFixed32Rules) String() string { return proto.CompactTextString(m) } func (*SFixed32Rules) ProtoMessage() {} func (*SFixed32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{11} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{11} } func (m *SFixed32Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SFixed32Rules.Unmarshal(m, b) @@ -1730,13 +1950,29 @@ func (m *SFixed32Rules) GetNotIn() []int32 { return nil } +// SFixed64Rules describes the constraints applied to `sfixed64` values type SFixed64Rules struct { - Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - Lt *int64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` - Lte *int64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` - Gt *int64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` - Gte *int64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` - In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1747,7 +1983,7 @@ func (m *SFixed64Rules) Reset() { *m = SFixed64Rules{} } func (m *SFixed64Rules) String() string { return proto.CompactTextString(m) } func (*SFixed64Rules) ProtoMessage() {} func (*SFixed64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{12} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{12} } func (m *SFixed64Rules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SFixed64Rules.Unmarshal(m, b) @@ -1816,7 +2052,9 @@ func (m *SFixed64Rules) GetNotIn() []int64 { return nil } +// BoolRules describes the constraints applied to `bool` values type BoolRules struct { + // Const specifies that this field must be exactly the specified value Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1827,7 +2065,7 @@ func (m *BoolRules) Reset() { *m = BoolRules{} } func (m *BoolRules) String() string { return proto.CompactTextString(m) } func (*BoolRules) ProtoMessage() {} func (*BoolRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{13} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{13} } func (m *BoolRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BoolRules.Unmarshal(m, b) @@ -1854,20 +2092,53 @@ func (m *BoolRules) GetConst() bool { return false } +// StringRules describe the constraints applied to `string` values type StringRules struct { - Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"` - MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` - MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` - MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"` - MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` - Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` - Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"` - Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"` - Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` - In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` - NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // 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 + // at a minimum + 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"` + // 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 valid to be assigned to WellKnown: // *StringRules_Email // *StringRules_Hostname @@ -1876,6 +2147,7 @@ type StringRules struct { // *StringRules_Ipv6 // *StringRules_Uri // *StringRules_UriRef + // *StringRules_Address WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1886,7 +2158,7 @@ func (m *StringRules) Reset() { *m = StringRules{} } func (m *StringRules) String() string { return proto.CompactTextString(m) } func (*StringRules) ProtoMessage() {} func (*StringRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{14} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{14} } func (m *StringRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StringRules.Unmarshal(m, b) @@ -1906,47 +2178,6 @@ func (m *StringRules) XXX_DiscardUnknown() { var xxx_messageInfo_StringRules proto.InternalMessageInfo -type isStringRules_WellKnown interface { - isStringRules_WellKnown() -} - -type StringRules_Email struct { - Email bool `protobuf:"varint,12,opt,name=email,oneof"` -} -type StringRules_Hostname struct { - Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` -} -type StringRules_Ip struct { - Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` -} -type StringRules_Ipv4 struct { - Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` -} -type StringRules_Ipv6 struct { - Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` -} -type StringRules_Uri struct { - Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` -} -type StringRules_UriRef struct { - UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,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 (m *StringRules) GetWellKnown() isStringRules_WellKnown { - if m != nil { - return m.WellKnown - } - return nil -} - func (m *StringRules) GetConst() string { if m != nil && m.Const != nil { return *m.Const @@ -2038,6 +2269,65 @@ func (m *StringRules) GetNotIn() []string { return nil } +type isStringRules_WellKnown interface { + isStringRules_WellKnown() +} + +type StringRules_Email struct { + Email bool `protobuf:"varint,12,opt,name=email,oneof"` +} + +type StringRules_Hostname struct { + Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` +} + +type StringRules_Ip struct { + Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` +} + +type StringRules_Ipv4 struct { + Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` +} + +type StringRules_Ipv6 struct { + Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` +} + +type StringRules_Uri struct { + Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` +} + +type StringRules_UriRef struct { + UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` +} + +type StringRules_Address struct { + Address bool `protobuf:"varint,21,opt,name=address,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 (m *StringRules) GetWellKnown() isStringRules_WellKnown { + if m != nil { + return m.WellKnown + } + return nil +} + func (m *StringRules) GetEmail() bool { if x, ok := m.GetWellKnown().(*StringRules_Email); ok { return x.Email @@ -2087,6 +2377,13 @@ func (m *StringRules) GetUriRef() bool { return false } +func (m *StringRules) GetAddress() bool { + if x, ok := m.GetWellKnown().(*StringRules_Address); ok { + return x.Address + } + return false +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*StringRules) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _StringRules_OneofMarshaler, _StringRules_OneofUnmarshaler, _StringRules_OneofSizer, []interface{}{ @@ -2097,6 +2394,7 @@ func (*StringRules) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) e (*StringRules_Ipv6)(nil), (*StringRules_Uri)(nil), (*StringRules_UriRef)(nil), + (*StringRules_Address)(nil), } } @@ -2153,6 +2451,13 @@ func _StringRules_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { } b.EncodeVarint(18<<3 | proto.WireVarint) b.EncodeVarint(t) + case *StringRules_Address: + t := uint64(0) + if x.Address { + t = 1 + } + b.EncodeVarint(21<<3 | proto.WireVarint) + b.EncodeVarint(t) case nil: default: return fmt.Errorf("StringRules.WellKnown has unexpected type %T", x) @@ -2212,6 +2517,13 @@ func _StringRules_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Bu x, err := b.DecodeVarint() m.WellKnown = &StringRules_UriRef{x != 0} return true, err + case 21: // well_known.address + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.WellKnown = &StringRules_Address{x != 0} + return true, err default: return false, nil } @@ -2242,6 +2554,9 @@ func _StringRules_OneofSizer(msg proto.Message) (n int) { case *StringRules_UriRef: n += 2 // tag and wire n += 1 + case *StringRules_Address: + n += 2 // tag and wire + n += 1 case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -2249,17 +2564,40 @@ func _StringRules_OneofSizer(msg proto.Message) (n int) { return n } +// BytesRules describe the constraints applied to `bytes` values type BytesRules struct { - Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"` - MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` - MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` - Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"` - Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"` - Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"` - In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"` - NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // 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 valid to be assigned to WellKnown: // *BytesRules_Ip // *BytesRules_Ipv4 @@ -2274,7 +2612,7 @@ func (m *BytesRules) Reset() { *m = BytesRules{} } func (m *BytesRules) String() string { return proto.CompactTextString(m) } func (*BytesRules) ProtoMessage() {} func (*BytesRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{15} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{15} } func (m *BytesRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BytesRules.Unmarshal(m, b) @@ -2294,31 +2632,6 @@ func (m *BytesRules) XXX_DiscardUnknown() { var xxx_messageInfo_BytesRules proto.InternalMessageInfo -type isBytesRules_WellKnown interface { - isBytesRules_WellKnown() -} - -type BytesRules_Ip struct { - Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` -} -type BytesRules_Ipv4 struct { - Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` -} -type BytesRules_Ipv6 struct { - Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` -} - -func (*BytesRules_Ip) isBytesRules_WellKnown() {} -func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} -func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} - -func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown { - if m != nil { - return m.WellKnown - } - return nil -} - func (m *BytesRules) GetConst() []byte { if m != nil { return m.Const @@ -2389,6 +2702,35 @@ func (m *BytesRules) GetNotIn() [][]byte { return nil } +type isBytesRules_WellKnown interface { + isBytesRules_WellKnown() +} + +type BytesRules_Ip struct { + Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` +} + +type BytesRules_Ipv4 struct { + Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` +} + +type BytesRules_Ipv6 struct { + Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` +} + +func (*BytesRules_Ip) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} + +func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown { + if m != nil { + return m.WellKnown + } + return nil +} + func (m *BytesRules) GetIp() bool { if x, ok := m.GetWellKnown().(*BytesRules_Ip); ok { return x.Ip @@ -2500,10 +2842,18 @@ func _BytesRules_OneofSizer(msg proto.Message) (n int) { return n } +// EnumRules describe the constraints applied to enum values type EnumRules struct { - Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"` - In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2514,7 +2864,7 @@ func (m *EnumRules) Reset() { *m = EnumRules{} } func (m *EnumRules) String() string { return proto.CompactTextString(m) } func (*EnumRules) ProtoMessage() {} func (*EnumRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{16} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{16} } func (m *EnumRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EnumRules.Unmarshal(m, b) @@ -2562,8 +2912,13 @@ func (m *EnumRules) GetNotIn() []int32 { return nil } +// MessageRules describe the constraints applied to embedded message values. +// For message-type fields, validation is performed recursively. type MessageRules struct { - Skip *bool `protobuf:"varint,1,opt,name=skip" json:"skip,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2574,7 +2929,7 @@ func (m *MessageRules) Reset() { *m = MessageRules{} } func (m *MessageRules) String() string { return proto.CompactTextString(m) } func (*MessageRules) ProtoMessage() {} func (*MessageRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{17} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{17} } func (m *MessageRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MessageRules.Unmarshal(m, b) @@ -2608,10 +2963,21 @@ func (m *MessageRules) GetRequired() bool { return false } +// RepeatedRules describe the constraints applied to `repeated` values type RepeatedRules struct { - MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` - MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` - Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2622,7 +2988,7 @@ func (m *RepeatedRules) Reset() { *m = RepeatedRules{} } func (m *RepeatedRules) String() string { return proto.CompactTextString(m) } func (*RepeatedRules) ProtoMessage() {} func (*RepeatedRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{18} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{18} } func (m *RepeatedRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RepeatedRules.Unmarshal(m, b) @@ -2670,11 +3036,22 @@ func (m *RepeatedRules) GetItems() *FieldRules { return nil } +// MapRules describe the constraints applied to `map` values type MapRules struct { - MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` - MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"` - NoSparse *bool `protobuf:"varint,3,opt,name=no_sparse,json=noSparse" json:"no_sparse,omitempty"` - Keys *FieldRules `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2685,7 +3062,7 @@ func (m *MapRules) Reset() { *m = MapRules{} } func (m *MapRules) String() string { return proto.CompactTextString(m) } func (*MapRules) ProtoMessage() {} func (*MapRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{19} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{19} } func (m *MapRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MapRules.Unmarshal(m, b) @@ -2740,9 +3117,16 @@ func (m *MapRules) GetValues() *FieldRules { return nil } +// AnyRules describe constraints applied exclusively to the +// `google.protobuf.Any` well-known type type AnyRules struct { - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` + // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2753,7 +3137,7 @@ func (m *AnyRules) Reset() { *m = AnyRules{} } func (m *AnyRules) String() string { return proto.CompactTextString(m) } func (*AnyRules) ProtoMessage() {} func (*AnyRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{20} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{20} } func (m *AnyRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AnyRules.Unmarshal(m, b) @@ -2794,14 +3178,30 @@ func (m *AnyRules) GetNotIn() []string { return nil } +// DurationRules describe the constraints applied exclusively to the +// `google.protobuf.Duration` well-known type type DurationRules struct { - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - Const *duration.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` - Lt *duration.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` - Lte *duration.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` - Gt *duration.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` - Gte *duration.Duration `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` - In []*duration.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` + // 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 *duration.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *duration.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` + // Lt specifies that this field must be less than the specified value, + // inclusive + Lte *duration.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive + Gt *duration.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than the specified value, + // inclusive + Gte *duration.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 []*duration.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 []*duration.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2812,7 +3212,7 @@ func (m *DurationRules) Reset() { *m = DurationRules{} } func (m *DurationRules) String() string { return proto.CompactTextString(m) } func (*DurationRules) ProtoMessage() {} func (*DurationRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{21} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{21} } func (m *DurationRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DurationRules.Unmarshal(m, b) @@ -2888,26 +3288,45 @@ func (m *DurationRules) GetNotIn() []*duration.Duration { return nil } +// TimestampRules describe the constraints applied exclusively to the +// `google.protobuf.Timestamp` well-known type type TimestampRules struct { - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - Const *timestamp.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` - Lt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` - Lte *timestamp.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` - Gt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` - Gte *timestamp.Timestamp `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` - LtNow *bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow" json:"lt_now,omitempty"` - GtNow *bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow" json:"gt_now,omitempty"` - Within *duration.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // 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 *timestamp.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than the specified value, + // inclusive + Lte *timestamp.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive + Gt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than the specified value, + // inclusive + Gte *timestamp.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 *duration.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *TimestampRules) Reset() { *m = TimestampRules{} } func (m *TimestampRules) String() string { return proto.CompactTextString(m) } func (*TimestampRules) ProtoMessage() {} func (*TimestampRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_42a9c75c83428773, []int{22} + return fileDescriptor_validate_c8f5e113dd6422a8, []int{22} } func (m *TimestampRules) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TimestampRules.Unmarshal(m, b) @@ -3046,109 +3465,111 @@ func init() { proto.RegisterExtension(E_Rules) } -func init() { proto.RegisterFile("validate/validate.proto", fileDescriptor_validate_42a9c75c83428773) } +func init() { proto.RegisterFile("validate/validate.proto", fileDescriptor_validate_c8f5e113dd6422a8) } -var fileDescriptor_validate_42a9c75c83428773 = []byte{ - // 1609 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0xc7, 0x3f, 0xf1, 0x26, 0x6a, 0x2c, 0x45, 0xd2, 0xc4, 0x76, 0x18, 0x7f, 0x97, 0x38, 0x5a, - 0x7c, 0x70, 0x52, 0xc7, 0x4e, 0x1d, 0x57, 0x08, 0x52, 0xb4, 0x40, 0x8d, 0x34, 0x68, 0xd0, 0xa6, - 0x29, 0xe8, 0x66, 0xd3, 0x8d, 0x40, 0x5b, 0x23, 0x65, 0x60, 0x6a, 0xc8, 0x90, 0x54, 0x6c, 0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, 0xb9, 0x0d, 0x61, 0xde, 0x54, 0x66, 0x57, 0x32, 0x5d, 0x30, - 0x3e, 0xf6, 0x9c, 0xa6, 0x82, 0x62, 0x01, 0x25, 0xe3, 0x05, 0xa9, 0x5c, 0xa1, 0x0d, 0x0b, 0x4e, - 0xab, 0x2b, 0xa4, 0xf9, 0x0a, 0xa9, 0x5c, 0xc1, 0x6d, 0x2a, 0x28, 0xad, 0x20, 0x65, 0xf8, 0x08, - 0xb5, 0x67, 0xf4, 0x8a, 0x4c, 0x9f, 0x1c, 0x79, 0x1d, 0x51, 0xb1, 0x5d, 0xda, 0x00, 0x99, 0xd0, - 0x25, 0x5a, 0x98, 0xd7, 0x8c, 0x8f, 0x3d, 0xd4, 0x58, 0x53, 0x2c, 0xa3, 0x85, 0xf8, 0x13, 0xe4, - 0xa6, 0x7a, 0xa1, 0x0d, 0x51, 0x74, 0xa7, 0x84, 0x06, 0x56, 0xca, 0xa5, 0x45, 0xd9, 0xf8, 0xd8, - 0xeb, 0x36, 0x97, 0x15, 0x8b, 0xe5, 0x52, 0xfc, 0x00, 0x59, 0x67, 0x51, 0x14, 0x7a, 0x3d, 0x51, - 0x72, 0xbb, 0x28, 0x39, 0x89, 0xa2, 0x50, 0xcb, 0x85, 0x44, 0x38, 0x96, 0x25, 0x94, 0xcd, 0xbd, - 0x5b, 0x35, 0xc7, 0x44, 0xbc, 0x70, 0x4c, 0x0c, 0xf9, 0x7f, 0xe4, 0x6c, 0x95, 0x91, 0xd4, 0xeb, - 0xc3, 0xff, 0xc8, 0x09, 0x0f, 0xe7, 0xff, 0x11, 0x21, 0xe2, 0x24, 0x84, 0x2d, 0x17, 0xde, 0x00, +var fileDescriptor_validate_c8f5e113dd6422a8 = []byte{ + // 1640 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0xcd, 0x6e, 0xdb, 0xc6, + 0x16, 0xc7, 0xaf, 0xf8, 0x25, 0x6a, 0x2c, 0x45, 0xd2, 0xc4, 0x76, 0x18, 0xdf, 0x8f, 0x38, 0x5a, + 0x5c, 0x38, 0xb9, 0x89, 0x9d, 0xeb, 0xb8, 0x42, 0x90, 0xa2, 0x05, 0x6a, 0xa4, 0x41, 0x83, 0x36, + 0x4d, 0x40, 0x37, 0x9b, 0x6e, 0x04, 0xda, 0x1a, 0x29, 0x03, 0x53, 0x43, 0x86, 0xa4, 0x6c, 0xeb, + 0x21, 0xd2, 0x76, 0xd7, 0xbe, 0x4a, 0x57, 0xdd, 0xf7, 0x4d, 0xba, 0xee, 0x0b, 0x14, 0xf3, 0xc5, + 0x8f, 0x43, 0x5a, 0x5e, 0x74, 0xa7, 0x39, 0xe7, 0x7f, 0x66, 0x7e, 0xf8, 0x0f, 0x39, 0x73, 0x28, + 0x74, 0xe7, 0x22, 0x08, 0xe9, 0x34, 0xc8, 0xc8, 0x81, 0xfe, 0xb1, 0x1f, 0x27, 0x51, 0x16, 0x61, + 0x57, 0x8f, 0x77, 0x76, 0xe7, 0x51, 0x34, 0x0f, 0xc9, 0x81, 0x88, 0x9f, 0x2e, 0x67, 0x07, 0x53, + 0x92, 0x9e, 0x25, 0x34, 0xce, 0xa2, 0x44, 0x6a, 0x77, 0xfe, 0x53, 0x53, 0x2c, 0x93, 0x20, 0xa3, + 0x11, 0x53, 0xf9, 0x7b, 0x30, 0x9f, 0xd1, 0x05, 0x49, 0xb3, 0x60, 0x11, 0x4b, 0xc1, 0xe8, 0x77, + 0x17, 0xa1, 0x97, 0x94, 0x84, 0x53, 0x7f, 0x19, 0x92, 0x14, 0x3f, 0x42, 0xf6, 0x2c, 0x8c, 0x82, + 0xcc, 0x6b, 0xed, 0xb6, 0xf6, 0x36, 0x0e, 0x37, 0xf7, 0x73, 0xb6, 0x97, 0x3c, 0x2c, 0x44, 0x5f, + 0xfd, 0xc3, 0x97, 0x22, 0x7c, 0x80, 0x9c, 0x69, 0xb4, 0x3c, 0x0d, 0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 0x02, 0xb5, 0x20, 0x50, 0xab, 0x01, 0xa8, 0xa5, 0x81, 0xb8, 0x41, 0xc5, 0x49, 0x51, 0xe5, 0xb1, 0xeb, 0x3c, 0x36, 0xe4, 0xb1, 0x21, 0x8f, 0x0d, 0x79, 0x6c, 0xc8, 0x63, 0x37, 0xf0, 0xd8, 0x80, - 0x47, 0x3d, 0xb4, 0x55, 0x1e, 0xb3, 0xce, 0x63, 0x42, 0x1e, 0x13, 0xf2, 0x98, 0x90, 0xc7, 0x84, - 0x3c, 0x66, 0x03, 0x8f, 0x59, 0xde, 0xb0, 0x37, 0xd7, 0x19, 0xd4, 0xab, 0x03, 0xf5, 0x20, 0x50, + 0x47, 0xbd, 0xb4, 0x55, 0x1e, 0xb3, 0xce, 0x63, 0x42, 0x1e, 0x13, 0xf2, 0x98, 0x90, 0xc7, 0x84, + 0x3c, 0x66, 0x03, 0x8f, 0x59, 0xde, 0xb0, 0x77, 0xd7, 0x19, 0xd4, 0xab, 0x03, 0xf5, 0x20, 0x50, 0x0f, 0x02, 0xf5, 0x20, 0x50, 0x0f, 0x02, 0xf5, 0x1a, 0x80, 0x7a, 0x10, 0xa8, 0xd1, 0x21, 0xab, 0x0e, 0x64, 0x41, 0x20, 0x0b, 0x02, 0x59, 0x10, 0xc8, 0x82, 0x40, 0x56, 0x03, 0x90, 0x55, 0x06, - 0x3a, 0xbd, 0xce, 0xa1, 0x61, 0x1d, 0x68, 0x08, 0x81, 0x86, 0x10, 0x68, 0x08, 0x81, 0x86, 0x10, + 0x3a, 0xb9, 0xce, 0xa1, 0x61, 0x1d, 0x68, 0x08, 0x81, 0x86, 0x10, 0x68, 0x08, 0x81, 0x86, 0x10, 0x68, 0xd8, 0x00, 0x34, 0x84, 0x40, 0x8d, 0x0e, 0xe1, 0x3a, 0x10, 0x86, 0x40, 0x18, 0x02, 0x61, - 0x08, 0x84, 0x21, 0x10, 0x6e, 0x00, 0xc2, 0x1a, 0xe8, 0xa7, 0x16, 0xea, 0x96,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x97, 0x34, 0x7b, 0x2f, 0x4e, 0xd6, 0x1b, 0xf6, 0x53, 0x09, + 0x9f, 0x7f, 0x86, 0xdc, 0x29, 0x4d, 0x83, 0xd3, 0x90, 0x4c, 0xf1, 0xbd, 0x9a, 0x5c, 0x9d, 0x6b, + 0x6f, 0x62, 0x5e, 0x93, 0x7a, 0x3f, 0x7f, 0x7c, 0x26, 0x77, 0x41, 0x97, 0x3c, 0xff, 0xb4, 0xd8, + 0x21, 0xfc, 0xef, 0x5a, 0xf9, 0x1b, 0x46, 0xa2, 0x59, 0xad, 0x58, 0x17, 0x3c, 0xff, 0x1a, 0xd9, + 0x89, 0xd8, 0xe7, 0x7a, 0xa5, 0x78, 0xb5, 0xab, 0x95, 0xd7, 0x9e, 0x5a, 0x62, 0x8e, 0xe3, 0xb7, + 0x68, 0x87, 0x46, 0xfb, 0x84, 0x5d, 0x44, 0xab, 0x38, 0x89, 0xae, 0x56, 0xfb, 0xf1, 0xfc, 0x22, + 0xd7, 0x7f, 0x7f, 0x38, 0xa7, 0xd9, 0xfb, 0xe5, 0xe9, 0xfe, 0x59, 0xb4, 0x38, 0x28, 0x34, 0xf2, + 0xcf, 0xcd, 0xb3, 0xc7, 0x73, 0xc2, 0x1e, 0xd7, 0xfe, 0x53, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, + 0xca, 0xcb, 0x15, 0xa8, 0x67, 0x15, 0x00, 0x00, } diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto index 1c5e04a165..e50286e227 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto @@ -1,8 +1,8 @@ syntax = "proto2"; package validate; -option go_package = "github.com/lyft/protoc-gen-validate/validate"; -option java_package = "com.lyft.pgv.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"; @@ -540,6 +540,11 @@ message StringRules { // 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; } } diff --git a/vendor/github.com/gogo/googleapis/google/api/annotations.proto b/vendor/github.com/gogo/googleapis/google/api/annotations.proto deleted file mode 100644 index 9daedc9f7e..0000000000 --- a/vendor/github.com/gogo/googleapis/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "api"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/vendor/github.com/gogo/googleapis/google/api/http.pb.go b/vendor/github.com/gogo/googleapis/google/api/http.pb.go deleted file mode 100644 index b2bba63db6..0000000000 --- a/vendor/github.com/gogo/googleapis/google/api/http.pb.go +++ /dev/null @@ -1,2338 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/api/http.proto - -package api - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import bytes "bytes" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// 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 { - // 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" json:"rules,omitempty"` - // When set to true, URL path parmeters 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Http) Reset() { *m = Http{} } -func (*Http) ProtoMessage() {} -func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_http_0b206a4af4ed46aa, []int{0} -} -func (m *Http) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Http.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Http) XXX_Merge(src proto.Message) { - xxx_messageInfo_Http.Merge(dst, src) -} -func (m *Http) XXX_Size() int { - return m.Size() -} -func (m *Http) XXX_DiscardUnknown() { - xxx_messageInfo_Http.DiscardUnknown(m) -} - -var xxx_messageInfo_Http proto.InternalMessageInfo - -func (m *Http) GetRules() []*HttpRule { - if m != nil { - return m.Rules - } - return nil -} - -func (m *Http) GetFullyDecodeReservedExpansion() bool { - if m != nil { - return m.FullyDecodeReservedExpansion - } - return false -} - -func (*Http) XXX_MessageName() string { - return "google.api.Http" -} - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped -// } -// message Message { -// string text = 1; // content of the resource -// } -// -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// -// 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 the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter -// } -// -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `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 HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which 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) = { -// put: "/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 | RPC -// -----|----- -// `PUT /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) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /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 of -// 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 | RPC -// -----|----- -// `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 -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. -// -// 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=*}`. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. -// -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. -type HttpRule struct { - // Selects methods 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 valid to be assigned 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 body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of 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 - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. - 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" json:"additional_bindings,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HttpRule) Reset() { *m = HttpRule{} } -func (*HttpRule) ProtoMessage() {} -func (*HttpRule) Descriptor() ([]byte, []int) { - return fileDescriptor_http_0b206a4af4ed46aa, []int{1} -} -func (m *HttpRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HttpRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HttpRule.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *HttpRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_HttpRule.Merge(dst, src) -} -func (m *HttpRule) XXX_Size() int { - return m.Size() -} -func (m *HttpRule) XXX_DiscardUnknown() { - xxx_messageInfo_HttpRule.DiscardUnknown(m) -} - -var xxx_messageInfo_HttpRule proto.InternalMessageInfo - -type isHttpRule_Pattern interface { - isHttpRule_Pattern() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type HttpRule_Get struct { - Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` -} -type HttpRule_Put struct { - Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` -} -type HttpRule_Post struct { - Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` -} -type HttpRule_Delete struct { - Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` -} -type HttpRule_Patch struct { - Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` -} -type HttpRule_Custom struct { - Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,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() {} - -func (m *HttpRule) GetPattern() isHttpRule_Pattern { - if m != nil { - return m.Pattern - } - return nil -} - -func (m *HttpRule) GetSelector() string { - if m != nil { - return m.Selector - } - return "" -} - -func (m *HttpRule) GetGet() string { - if x, ok := m.GetPattern().(*HttpRule_Get); ok { - return x.Get - } - return "" -} - -func (m *HttpRule) GetPut() string { - if x, ok := m.GetPattern().(*HttpRule_Put); ok { - return x.Put - } - return "" -} - -func (m *HttpRule) GetPost() string { - if x, ok := m.GetPattern().(*HttpRule_Post); ok { - return x.Post - } - return "" -} - -func (m *HttpRule) GetDelete() string { - if x, ok := m.GetPattern().(*HttpRule_Delete); ok { - return x.Delete - } - return "" -} - -func (m *HttpRule) GetPatch() string { - if x, ok := m.GetPattern().(*HttpRule_Patch); ok { - return x.Patch - } - return "" -} - -func (m *HttpRule) GetCustom() *CustomHttpPattern { - if x, ok := m.GetPattern().(*HttpRule_Custom); ok { - return x.Custom - } - return nil -} - -func (m *HttpRule) GetBody() string { - if m != nil { - return m.Body - } - return "" -} - -func (m *HttpRule) GetResponseBody() string { - if m != nil { - return m.ResponseBody - } - return "" -} - -func (m *HttpRule) GetAdditionalBindings() []*HttpRule { - if m != nil { - return m.AdditionalBindings - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*HttpRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _HttpRule_OneofMarshaler, _HttpRule_OneofUnmarshaler, _HttpRule_OneofSizer, []interface{}{ - (*HttpRule_Get)(nil), - (*HttpRule_Put)(nil), - (*HttpRule_Post)(nil), - (*HttpRule_Delete)(nil), - (*HttpRule_Patch)(nil), - (*HttpRule_Custom)(nil), - } -} - -func _HttpRule_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*HttpRule) - // pattern - switch x := m.Pattern.(type) { - case *HttpRule_Get: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Get) - case *HttpRule_Put: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Put) - case *HttpRule_Post: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Post) - case *HttpRule_Delete: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Delete) - case *HttpRule_Patch: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Patch) - case *HttpRule_Custom: - _ = b.EncodeVarint(8<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Custom); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("HttpRule.Pattern has unexpected type %T", x) - } - return nil -} - -func _HttpRule_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*HttpRule) - switch tag { - case 2: // pattern.get - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Pattern = &HttpRule_Get{x} - return true, err - case 3: // pattern.put - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Pattern = &HttpRule_Put{x} - return true, err - case 4: // pattern.post - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Pattern = &HttpRule_Post{x} - return true, err - case 5: // pattern.delete - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Pattern = &HttpRule_Delete{x} - return true, err - case 6: // pattern.patch - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Pattern = &HttpRule_Patch{x} - return true, err - case 8: // pattern.custom - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(CustomHttpPattern) - err := b.DecodeMessage(msg) - m.Pattern = &HttpRule_Custom{msg} - return true, err - default: - return false, nil - } -} - -func _HttpRule_OneofSizer(msg proto.Message) (n int) { - m := msg.(*HttpRule) - // pattern - switch x := m.Pattern.(type) { - case *HttpRule_Get: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Get))) - n += len(x.Get) - case *HttpRule_Put: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Put))) - n += len(x.Put) - case *HttpRule_Post: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Post))) - n += len(x.Post) - case *HttpRule_Delete: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Delete))) - n += len(x.Delete) - case *HttpRule_Patch: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Patch))) - n += len(x.Patch) - case *HttpRule_Custom: - s := proto.Size(x.Custom) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func (*HttpRule) XXX_MessageName() string { - return "google.api.HttpRule" -} - -// A custom pattern is used for defining custom HTTP verb. -type CustomHttpPattern struct { - // 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"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CustomHttpPattern) Reset() { *m = CustomHttpPattern{} } -func (*CustomHttpPattern) ProtoMessage() {} -func (*CustomHttpPattern) Descriptor() ([]byte, []int) { - return fileDescriptor_http_0b206a4af4ed46aa, []int{2} -} -func (m *CustomHttpPattern) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomHttpPattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CustomHttpPattern.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *CustomHttpPattern) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomHttpPattern.Merge(dst, src) -} -func (m *CustomHttpPattern) XXX_Size() int { - return m.Size() -} -func (m *CustomHttpPattern) XXX_DiscardUnknown() { - xxx_messageInfo_CustomHttpPattern.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomHttpPattern proto.InternalMessageInfo - -func (m *CustomHttpPattern) GetKind() string { - if m != nil { - return m.Kind - } - return "" -} - -func (m *CustomHttpPattern) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (*CustomHttpPattern) XXX_MessageName() string { - return "google.api.CustomHttpPattern" -} -func init() { - proto.RegisterType((*Http)(nil), "google.api.Http") - proto.RegisterType((*HttpRule)(nil), "google.api.HttpRule") - proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern") -} -func (this *Http) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Http) - if !ok { - that2, ok := that.(Http) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Rules) != len(that1.Rules) { - return false - } - for i := range this.Rules { - if !this.Rules[i].Equal(that1.Rules[i]) { - return false - } - } - if this.FullyDecodeReservedExpansion != that1.FullyDecodeReservedExpansion { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HttpRule) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule) - if !ok { - that2, ok := that.(HttpRule) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Selector != that1.Selector { - return false - } - if that1.Pattern == nil { - if this.Pattern != nil { - return false - } - } else if this.Pattern == nil { - return false - } else if !this.Pattern.Equal(that1.Pattern) { - return false - } - if this.Body != that1.Body { - return false - } - if this.ResponseBody != that1.ResponseBody { - return false - } - if len(this.AdditionalBindings) != len(that1.AdditionalBindings) { - return false - } - for i := range this.AdditionalBindings { - if !this.AdditionalBindings[i].Equal(that1.AdditionalBindings[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HttpRule_Get) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Get) - if !ok { - that2, ok := that.(HttpRule_Get) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Get != that1.Get { - return false - } - return true -} -func (this *HttpRule_Put) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Put) - if !ok { - that2, ok := that.(HttpRule_Put) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Put != that1.Put { - return false - } - return true -} -func (this *HttpRule_Post) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Post) - if !ok { - that2, ok := that.(HttpRule_Post) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Post != that1.Post { - return false - } - return true -} -func (this *HttpRule_Delete) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Delete) - if !ok { - that2, ok := that.(HttpRule_Delete) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Delete != that1.Delete { - return false - } - return true -} -func (this *HttpRule_Patch) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Patch) - if !ok { - that2, ok := that.(HttpRule_Patch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Patch != that1.Patch { - return false - } - return true -} -func (this *HttpRule_Custom) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HttpRule_Custom) - if !ok { - that2, ok := that.(HttpRule_Custom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Custom.Equal(that1.Custom) { - return false - } - return true -} -func (this *CustomHttpPattern) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CustomHttpPattern) - if !ok { - that2, ok := that.(CustomHttpPattern) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Kind != that1.Kind { - return false - } - if this.Path != that1.Path { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Http) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&api.Http{") - if this.Rules != nil { - s = append(s, "Rules: "+fmt.Sprintf("%#v", this.Rules)+",\n") - } - s = append(s, "FullyDecodeReservedExpansion: "+fmt.Sprintf("%#v", this.FullyDecodeReservedExpansion)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HttpRule) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&api.HttpRule{") - s = append(s, "Selector: "+fmt.Sprintf("%#v", this.Selector)+",\n") - if this.Pattern != nil { - s = append(s, "Pattern: "+fmt.Sprintf("%#v", this.Pattern)+",\n") - } - s = append(s, "Body: "+fmt.Sprintf("%#v", this.Body)+",\n") - s = append(s, "ResponseBody: "+fmt.Sprintf("%#v", this.ResponseBody)+",\n") - if this.AdditionalBindings != nil { - s = append(s, "AdditionalBindings: "+fmt.Sprintf("%#v", this.AdditionalBindings)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HttpRule_Get) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&api.HttpRule_Get{` + - `Get:` + fmt.Sprintf("%#v", this.Get) + `}`}, ", ") - return s -} -func (this *HttpRule_Put) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&api.HttpRule_Put{` + - `Put:` + fmt.Sprintf("%#v", this.Put) + `}`}, ", ") - return s -} -func (this *HttpRule_Post) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&api.HttpRule_Post{` + - `Post:` + fmt.Sprintf("%#v", this.Post) + `}`}, ", ") - return s -} -func (this *HttpRule_Delete) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&api.HttpRule_Delete{` + - `Delete:` + fmt.Sprintf("%#v", this.Delete) + `}`}, ", ") - return s -} -func (this *HttpRule_Patch) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&api.HttpRule_Patch{` + - `Patch:` + fmt.Sprintf("%#v", this.Patch) + `}`}, ", ") - return s -} -func (this *HttpRule_Custom) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&api.HttpRule_Custom{` + - `Custom:` + fmt.Sprintf("%#v", this.Custom) + `}`}, ", ") - return s -} -func (this *CustomHttpPattern) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&api.CustomHttpPattern{") - s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") - s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringHttp(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Http) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Http) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Rules) > 0 { - for _, msg := range m.Rules { - dAtA[i] = 0xa - i++ - i = encodeVarintHttp(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.FullyDecodeReservedExpansion { - dAtA[i] = 0x10 - i++ - if m.FullyDecodeReservedExpansion { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HttpRule) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Selector) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Selector))) - i += copy(dAtA[i:], m.Selector) - } - if m.Pattern != nil { - nn1, err := m.Pattern.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn1 - } - if len(m.Body) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Body))) - i += copy(dAtA[i:], m.Body) - } - if len(m.AdditionalBindings) > 0 { - for _, msg := range m.AdditionalBindings { - dAtA[i] = 0x5a - i++ - i = encodeVarintHttp(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseBody) > 0 { - dAtA[i] = 0x62 - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.ResponseBody))) - i += copy(dAtA[i:], m.ResponseBody) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *HttpRule_Get) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x12 - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Get))) - i += copy(dAtA[i:], m.Get) - return i, nil -} -func (m *HttpRule_Put) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x1a - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Put))) - i += copy(dAtA[i:], m.Put) - return i, nil -} -func (m *HttpRule_Post) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x22 - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Post))) - i += copy(dAtA[i:], m.Post) - return i, nil -} -func (m *HttpRule_Delete) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x2a - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Delete))) - i += copy(dAtA[i:], m.Delete) - return i, nil -} -func (m *HttpRule_Patch) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x32 - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Patch))) - i += copy(dAtA[i:], m.Patch) - return i, nil -} -func (m *HttpRule_Custom) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Custom != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintHttp(dAtA, i, uint64(m.Custom.Size())) - n2, err := m.Custom.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} -func (m *CustomHttpPattern) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomHttpPattern) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Kind) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Kind))) - i += copy(dAtA[i:], m.Kind) - } - if len(m.Path) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintHttp(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintHttp(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedHttp(r randyHttp, easy bool) *Http { - this := &Http{} - if r.Intn(10) == 0 { - v1 := r.Intn(5) - this.Rules = make([]*HttpRule, v1) - for i := 0; i < v1; i++ { - this.Rules[i] = NewPopulatedHttpRule(r, easy) - } - } - this.FullyDecodeReservedExpansion = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHttp(r, 3) - } - return this -} - -func NewPopulatedHttpRule(r randyHttp, easy bool) *HttpRule { - this := &HttpRule{} - this.Selector = string(randStringHttp(r)) - oneofNumber_Pattern := []int32{2, 3, 4, 5, 6, 8}[r.Intn(6)] - switch oneofNumber_Pattern { - case 2: - this.Pattern = NewPopulatedHttpRule_Get(r, easy) - case 3: - this.Pattern = NewPopulatedHttpRule_Put(r, easy) - case 4: - this.Pattern = NewPopulatedHttpRule_Post(r, easy) - case 5: - this.Pattern = NewPopulatedHttpRule_Delete(r, easy) - case 6: - this.Pattern = NewPopulatedHttpRule_Patch(r, easy) - case 8: - this.Pattern = NewPopulatedHttpRule_Custom(r, easy) - } - this.Body = string(randStringHttp(r)) - if r.Intn(10) == 0 { - v2 := r.Intn(5) - this.AdditionalBindings = make([]*HttpRule, v2) - for i := 0; i < v2; i++ { - this.AdditionalBindings[i] = NewPopulatedHttpRule(r, easy) - } - } - this.ResponseBody = string(randStringHttp(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHttp(r, 13) - } - return this -} - -func NewPopulatedHttpRule_Get(r randyHttp, easy bool) *HttpRule_Get { - this := &HttpRule_Get{} - this.Get = string(randStringHttp(r)) - return this -} -func NewPopulatedHttpRule_Put(r randyHttp, easy bool) *HttpRule_Put { - this := &HttpRule_Put{} - this.Put = string(randStringHttp(r)) - return this -} -func NewPopulatedHttpRule_Post(r randyHttp, easy bool) *HttpRule_Post { - this := &HttpRule_Post{} - this.Post = string(randStringHttp(r)) - return this -} -func NewPopulatedHttpRule_Delete(r randyHttp, easy bool) *HttpRule_Delete { - this := &HttpRule_Delete{} - this.Delete = string(randStringHttp(r)) - return this -} -func NewPopulatedHttpRule_Patch(r randyHttp, easy bool) *HttpRule_Patch { - this := &HttpRule_Patch{} - this.Patch = string(randStringHttp(r)) - return this -} -func NewPopulatedHttpRule_Custom(r randyHttp, easy bool) *HttpRule_Custom { - this := &HttpRule_Custom{} - this.Custom = NewPopulatedCustomHttpPattern(r, easy) - return this -} -func NewPopulatedCustomHttpPattern(r randyHttp, easy bool) *CustomHttpPattern { - this := &CustomHttpPattern{} - this.Kind = string(randStringHttp(r)) - this.Path = string(randStringHttp(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHttp(r, 3) - } - return this -} - -type randyHttp interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneHttp(r randyHttp) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringHttp(r randyHttp) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneHttp(r) - } - return string(tmps) -} -func randUnrecognizedHttp(r randyHttp, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldHttp(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldHttp(dAtA []byte, r randyHttp, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateHttp(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateHttp(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateHttp(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateHttp(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateHttp(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateHttp(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateHttp(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Http) Size() (n int) { - var l int - _ = l - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovHttp(uint64(l)) - } - } - if m.FullyDecodeReservedExpansion { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpRule) Size() (n int) { - var l int - _ = l - l = len(m.Selector) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - if m.Pattern != nil { - n += m.Pattern.Size() - } - l = len(m.Body) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - if len(m.AdditionalBindings) > 0 { - for _, e := range m.AdditionalBindings { - l = e.Size() - n += 1 + l + sovHttp(uint64(l)) - } - } - l = len(m.ResponseBody) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HttpRule_Get) Size() (n int) { - var l int - _ = l - l = len(m.Get) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Put) Size() (n int) { - var l int - _ = l - l = len(m.Put) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Post) Size() (n int) { - var l int - _ = l - l = len(m.Post) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Delete) Size() (n int) { - var l int - _ = l - l = len(m.Delete) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Patch) Size() (n int) { - var l int - _ = l - l = len(m.Patch) - n += 1 + l + sovHttp(uint64(l)) - return n -} -func (m *HttpRule_Custom) Size() (n int) { - var l int - _ = l - if m.Custom != nil { - l = m.Custom.Size() - n += 1 + l + sovHttp(uint64(l)) - } - return n -} -func (m *CustomHttpPattern) Size() (n int) { - var l int - _ = l - l = len(m.Kind) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovHttp(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovHttp(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozHttp(x uint64) (n int) { - return sovHttp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Http) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Http{`, - `Rules:` + strings.Replace(fmt.Sprintf("%v", this.Rules), "HttpRule", "HttpRule", 1) + `,`, - `FullyDecodeReservedExpansion:` + fmt.Sprintf("%v", this.FullyDecodeReservedExpansion) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule{`, - `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, - `Pattern:` + fmt.Sprintf("%v", this.Pattern) + `,`, - `Body:` + fmt.Sprintf("%v", this.Body) + `,`, - `AdditionalBindings:` + strings.Replace(fmt.Sprintf("%v", this.AdditionalBindings), "HttpRule", "HttpRule", 1) + `,`, - `ResponseBody:` + fmt.Sprintf("%v", this.ResponseBody) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Get) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Get{`, - `Get:` + fmt.Sprintf("%v", this.Get) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Put) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Put{`, - `Put:` + fmt.Sprintf("%v", this.Put) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Post) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Post{`, - `Post:` + fmt.Sprintf("%v", this.Post) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Delete) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Delete{`, - `Delete:` + fmt.Sprintf("%v", this.Delete) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Patch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Patch{`, - `Patch:` + fmt.Sprintf("%v", this.Patch) + `,`, - `}`, - }, "") - return s -} -func (this *HttpRule_Custom) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HttpRule_Custom{`, - `Custom:` + strings.Replace(fmt.Sprintf("%v", this.Custom), "CustomHttpPattern", "CustomHttpPattern", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomHttpPattern) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomHttpPattern{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringHttp(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Http) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Http: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Http: 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 ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, &HttpRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FullyDecodeReservedExpansion", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FullyDecodeReservedExpansion = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipHttp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttp - } - 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 *HttpRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HttpRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HttpRule: 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 ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Selector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Get", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Get{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Put", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Put{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Post", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Post{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Delete{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Patch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = &HttpRule_Patch{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Body = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CustomHttpPattern{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Pattern = &HttpRule_Custom{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalBindings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalBindings = append(m.AdditionalBindings, &HttpRule{}) - if err := m.AdditionalBindings[len(m.AdditionalBindings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseBody", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseBody = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttp - } - 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 *CustomHttpPattern) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomHttpPattern: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomHttpPattern: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHttp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHttp - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHttp(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthHttp - } - 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 skipHttp(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - 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, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthHttp - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHttp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipHttp(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthHttp = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttp = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_http_0b206a4af4ed46aa) } - -var fileDescriptor_http_0b206a4af4ed46aa = []byte{ - // 446 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xb1, 0x6f, 0x13, 0x31, - 0x14, 0xc6, 0xe3, 0xe4, 0x92, 0x26, 0x2f, 0x05, 0x09, 0x53, 0x90, 0x85, 0xc0, 0x44, 0x61, 0x89, - 0x18, 0x52, 0xa9, 0x0c, 0x0c, 0x4c, 0x1c, 0x44, 0x94, 0x2d, 0xba, 0x11, 0x21, 0x9d, 0x9c, 0xf3, - 0x23, 0xb1, 0xb8, 0x9e, 0xad, 0xb3, 0x0f, 0x91, 0x8d, 0xbf, 0x85, 0x89, 0x3f, 0x85, 0xb1, 0x23, - 0x62, 0x22, 0xc7, 0xc2, 0xd8, 0xb1, 0x23, 0xb2, 0xef, 0x42, 0x2b, 0x21, 0x75, 0x7b, 0xdf, 0xe7, - 0x9f, 0xed, 0xef, 0x3d, 0x3d, 0xb8, 0xb7, 0xd6, 0x7a, 0x9d, 0xe3, 0xb1, 0x30, 0xea, 0x78, 0xe3, - 0x9c, 0x99, 0x9b, 0x52, 0x3b, 0x4d, 0xa1, 0xb1, 0xe7, 0xc2, 0xa8, 0xe9, 0x16, 0xa2, 0x53, 0xe7, - 0x0c, 0x7d, 0x0a, 0xfd, 0xb2, 0xca, 0xd1, 0x32, 0x32, 0xe9, 0xcd, 0xc6, 0x27, 0x47, 0xf3, 0x2b, - 0x66, 0xee, 0x81, 0xa4, 0xca, 0x31, 0x69, 0x10, 0xba, 0x80, 0xc7, 0x1f, 0xaa, 0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, 0xee, 0x30, 0x84, 0x3b, 0xdc, 0x9b, 0xb1, 0x96, 0xdb, 0x78, 0x04, 0x07, - 0xa6, 0x09, 0x30, 0x7d, 0x01, 0x77, 0xfe, 0x4b, 0xe5, 0x1b, 0xfb, 0xa8, 0x0a, 0xd9, 0x0e, 0x38, - 0xd4, 0xde, 0x33, 0xc2, 0x6d, 0x9a, 0xe9, 0x26, 0xa1, 0x8e, 0xdf, 0x9f, 0xef, 0x78, 0xe7, 0xc7, - 0x8e, 0x77, 0x2e, 0x76, 0x9c, 0x5c, 0xee, 0x38, 0xf9, 0x52, 0x73, 0xf2, 0xad, 0xe6, 0xe4, 0x7b, - 0xcd, 0xc9, 0x79, 0xcd, 0xc9, 0xaf, 0x9a, 0x93, 0x3f, 0x35, 0xef, 0x5c, 0x78, 0xef, 0x37, 0x27, - 0x70, 0x3b, 0xd3, 0x67, 0xd7, 0x7a, 0x89, 0x47, 0xe1, 0x5b, 0xbf, 0x6d, 0x4b, 0xf2, 0xae, 0x27, - 0x8c, 0xba, 0x24, 0xe4, 0x6b, 0x37, 0x7a, 0xf3, 0x72, 0xf9, 0x76, 0x35, 0x08, 0x5b, 0xf8, 0xec, - 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0x7e, 0xd3, 0x2c, 0x9e, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/googleapis/google/api/http.proto b/vendor/github.com/gogo/googleapis/google/api/http.proto deleted file mode 100644 index 6f92729b87..0000000000 --- a/vendor/github.com/gogo/googleapis/google/api/http.proto +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2018 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. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "api"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - - -// 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. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parmeters 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. - bool fully_decode_reserved_expansion = 2; -} - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped -// } -// message Message { -// string text = 1; // content of the resource -// } -// -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// -// 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 the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter -// } -// -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `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 HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which 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) = { -// put: "/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 | RPC -// -----|----- -// `PUT /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) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /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 of -// 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 | RPC -// -----|----- -// `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 -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. -// -// 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=*}`. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. -// -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. -message HttpRule { - // Selects methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // 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. - oneof pattern { - // Used for listing and getting information about resources. - string get = 2; - - // Used for updating a resource. - string put = 3; - - // Used for creating a resource. - string post = 4; - - // Used for deleting a resource. - string delete = 5; - - // Used for updating a resource. - string patch = 6; - - // 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. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. - string response_body = 12; - - // 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). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go deleted file mode 100644 index f2cbae8f76..0000000000 --- a/vendor/github.com/gogo/googleapis/google/rpc/code.pb.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/rpc/code.proto - -package rpc - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strconv "strconv" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// The canonical error codes for Google APIs. -// -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -type Code int32 - -const ( - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK Code = 0 - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED Code = 1 - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN Code = 2 - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT Code = 3 - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED Code = 4 - // Some requested entity (e.g., file or directory) was not found. - // - // Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented whitelist, - // `NOT_FOUND` may be used. If a request is denied for some users within - // a class of users, such as user-based access control, `PERMISSION_DENIED` - // must be used. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND Code = 5 - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS Code = 6 - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). This error code does not imply the - // request is valid or the requested entity exists or satisfies - // other pre-conditions. - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED Code = 7 - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED Code = 16 - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED Code = 8 - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., when a client-specified test-and-set fails, indicating the - // client should restart a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // - // HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION Code = 9 - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED Code = 10 - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE Code = 11 - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED Code = 12 - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL Code = 13 - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE Code = 14 - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS Code = 15 -) - -var Code_name = map[int32]string{ - 0: "OK", - 1: "CANCELLED", - 2: "UNKNOWN", - 3: "INVALID_ARGUMENT", - 4: "DEADLINE_EXCEEDED", - 5: "NOT_FOUND", - 6: "ALREADY_EXISTS", - 7: "PERMISSION_DENIED", - 16: "UNAUTHENTICATED", - 8: "RESOURCE_EXHAUSTED", - 9: "FAILED_PRECONDITION", - 10: "ABORTED", - 11: "OUT_OF_RANGE", - 12: "UNIMPLEMENTED", - 13: "INTERNAL", - 14: "UNAVAILABLE", - 15: "DATA_LOSS", -} -var Code_value = map[string]int32{ - "OK": 0, - "CANCELLED": 1, - "UNKNOWN": 2, - "INVALID_ARGUMENT": 3, - "DEADLINE_EXCEEDED": 4, - "NOT_FOUND": 5, - "ALREADY_EXISTS": 6, - "PERMISSION_DENIED": 7, - "UNAUTHENTICATED": 16, - "RESOURCE_EXHAUSTED": 8, - "FAILED_PRECONDITION": 9, - "ABORTED": 10, - "OUT_OF_RANGE": 11, - "UNIMPLEMENTED": 12, - "INTERNAL": 13, - "UNAVAILABLE": 14, - "DATA_LOSS": 15, -} - -func (Code) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_code_29c527ae4b4f0e5d, []int{0} -} - -func init() { - proto.RegisterEnum("google.rpc.Code", Code_name, Code_value) -} -func (x Code) String() string { - s, ok := Code_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} - -func init() { proto.RegisterFile("google/rpc/code.proto", fileDescriptor_code_29c527ae4b4f0e5d) } - -var fileDescriptor_code_29c527ae4b4f0e5d = []byte{ - // 393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0x3d, 0x6e, 0x13, 0x41, - 0x14, 0xc7, 0x3d, 0x76, 0x70, 0xe2, 0xf1, 0xd7, 0xcb, 0x84, 0x40, 0x37, 0x07, 0xa0, 0x70, 0x0a, - 0x4e, 0xf0, 0xbc, 0xf3, 0x9c, 0x8c, 0x32, 0x7e, 0xb3, 0x9a, 0x9d, 0x09, 0x01, 0x21, 0xad, 0xc4, - 0xc6, 0x4a, 0x03, 0x5a, 0xcb, 0xe2, 0x00, 0x9c, 0x85, 0x8a, 0x1b, 0x70, 0x85, 0x94, 0x29, 0x29, - 0xf1, 0xa6, 0xa1, 0x74, 0x49, 0x89, 0x06, 0x0a, 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x40, - 0x4e, 0x7c, 0x8a, 0xb5, 0x5f, 0xd5, 0x01, 0xf9, 0x92, 0x60, 0xac, 0x4e, 0xe5, 0x34, 0xb1, 0x5d, - 0x97, 0x8e, 0xb2, 0x0d, 0x32, 0x30, 0x51, 0x13, 0x79, 0x62, 0x39, 0x52, 0x60, 0x74, 0x30, 0x55, - 0x73, 0x39, 0x4e, 0x8c, 0x37, 0x68, 0x1d, 0x2e, 0x1d, 0xc1, 0x2c, 0x1b, 0x32, 0x18, 0xb1, 0x76, - 0xbe, 0xaa, 0x60, 0xbe, 0x7c, 0xff, 0xb8, 0xd7, 0xbd, 0x1f, 0x7b, 0xdd, 0x3b, 0xec, 0xb5, 0xf8, - 0xbd, 0xd7, 0xe2, 0x4b, 0xa7, 0xc5, 0xb7, 0x4e, 0x8b, 0x87, 0x4e, 0x8b, 0xc7, 0x4e, 0x8b, 0x9f, - 0x9d, 0x16, 0xbf, 0x3a, 0xdd, 0x3b, 0x64, 0xfe, 0xa4, 0xc5, 0xc3, 0x93, 0x16, 0x72, 0xd6, 0xb4, - 0x9f, 0x16, 0xff, 0xf3, 0x5f, 0x8e, 0x72, 0xf8, 0x65, 0xae, 0xa5, 0x14, 0xef, 0x06, 0xbb, 0x6d, - 0xf3, 0xb5, 0x3f, 0x08, 0x65, 0xf1, 0x61, 0xf8, 0xb7, 0xaa, 0xd7, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x03, 0xd4, 0x27, 0xff, 0xc3, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/googleapis/google/rpc/code.proto b/vendor/github.com/gogo/googleapis/google/rpc/code.proto deleted file mode 100644 index d832de11e9..0000000000 --- a/vendor/github.com/gogo/googleapis/google/rpc/code.proto +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -option go_package = "rpc"; -option java_multiple_files = true; -option java_outer_classname = "CodeProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - - -// The canonical error codes for Google APIs. -// -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -enum Code { - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK = 0; - - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED = 1; - - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2; - - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3; - - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4; - - // Some requested entity (e.g., file or directory) was not found. - // - // Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented whitelist, - // `NOT_FOUND` may be used. If a request is denied for some users within - // a class of users, such as user-based access control, `PERMISSION_DENIED` - // must be used. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND = 5; - - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6; - - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). This error code does not imply the - // request is valid or the requested entity exists or satisfies - // other pre-conditions. - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7; - - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16; - - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8; - - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., when a client-specified test-and-set fails, indicating the - // client should restart a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // - // HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION = 9; - - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED = 10; - - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11; - - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12; - - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL = 13; - - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14; - - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15; -} diff --git a/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go deleted file mode 100644 index 9a91abe03d..0000000000 --- a/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go +++ /dev/null @@ -1,4659 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/rpc/error_details.proto - -package rpc - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import types "github.com/gogo/protobuf/types" - -import bytes "bytes" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retires have been reached or a maximum retry delay cap has been -// reached. -type RetryInfo struct { - // Clients should wait at least this long between retrying the same request. - RetryDelay *types.Duration `protobuf:"bytes,1,opt,name=retry_delay,json=retryDelay" json:"retry_delay,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryInfo) Reset() { *m = RetryInfo{} } -func (*RetryInfo) ProtoMessage() {} -func (*RetryInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{0} -} -func (m *RetryInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RetryInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *RetryInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryInfo.Merge(dst, src) -} -func (m *RetryInfo) XXX_Size() int { - return m.Size() -} -func (m *RetryInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RetryInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryInfo proto.InternalMessageInfo - -func (m *RetryInfo) GetRetryDelay() *types.Duration { - if m != nil { - return m.RetryDelay - } - return nil -} - -func (*RetryInfo) XXX_MessageName() string { - return "google.rpc.RetryInfo" -} - -// Describes additional debugging info. -type DebugInfo struct { - // The stack trace entries indicating where the error occurred. - StackEntries []string `protobuf:"bytes,1,rep,name=stack_entries,json=stackEntries" json:"stack_entries,omitempty"` - // Additional debugging information provided by the server. - Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DebugInfo) Reset() { *m = DebugInfo{} } -func (*DebugInfo) ProtoMessage() {} -func (*DebugInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{1} -} -func (m *DebugInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DebugInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DebugInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *DebugInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DebugInfo.Merge(dst, src) -} -func (m *DebugInfo) XXX_Size() int { - return m.Size() -} -func (m *DebugInfo) XXX_DiscardUnknown() { - xxx_messageInfo_DebugInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_DebugInfo proto.InternalMessageInfo - -func (m *DebugInfo) GetStackEntries() []string { - if m != nil { - return m.StackEntries - } - return nil -} - -func (m *DebugInfo) GetDetail() string { - if m != nil { - return m.Detail - } - return "" -} - -func (*DebugInfo) XXX_MessageName() string { - return "google.rpc.DebugInfo" -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryDetail and Help types for other details about handling a -// quota failure. -type QuotaFailure struct { - // Describes all quota violations. - Violations []*QuotaFailure_Violation `protobuf:"bytes,1,rep,name=violations" json:"violations,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *QuotaFailure) Reset() { *m = QuotaFailure{} } -func (*QuotaFailure) ProtoMessage() {} -func (*QuotaFailure) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{2} -} -func (m *QuotaFailure) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuotaFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuotaFailure.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *QuotaFailure) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuotaFailure.Merge(dst, src) -} -func (m *QuotaFailure) XXX_Size() int { - return m.Size() -} -func (m *QuotaFailure) XXX_DiscardUnknown() { - xxx_messageInfo_QuotaFailure.DiscardUnknown(m) -} - -var xxx_messageInfo_QuotaFailure proto.InternalMessageInfo - -func (m *QuotaFailure) GetViolations() []*QuotaFailure_Violation { - if m != nil { - return m.Violations - } - return nil -} - -func (*QuotaFailure) XXX_MessageName() string { - return "google.rpc.QuotaFailure" -} - -// A message type used to describe a single quota violation. For example, a -// daily quota or a custom quota that was exceeded. -type QuotaFailure_Violation struct { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *QuotaFailure_Violation) Reset() { *m = QuotaFailure_Violation{} } -func (*QuotaFailure_Violation) ProtoMessage() {} -func (*QuotaFailure_Violation) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{2, 0} -} -func (m *QuotaFailure_Violation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QuotaFailure_Violation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuotaFailure_Violation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *QuotaFailure_Violation) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuotaFailure_Violation.Merge(dst, src) -} -func (m *QuotaFailure_Violation) XXX_Size() int { - return m.Size() -} -func (m *QuotaFailure_Violation) XXX_DiscardUnknown() { - xxx_messageInfo_QuotaFailure_Violation.DiscardUnknown(m) -} - -var xxx_messageInfo_QuotaFailure_Violation proto.InternalMessageInfo - -func (m *QuotaFailure_Violation) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *QuotaFailure_Violation) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (*QuotaFailure_Violation) XXX_MessageName() string { - return "google.rpc.QuotaFailure.Violation" -} - -// Describes what preconditions have failed. -// -// For example, if an RPC failed because it required the Terms of Service to be -// acknowledged, it could list the terms of service violation in the -// PreconditionFailure message. -type PreconditionFailure struct { - // Describes all precondition violations. - Violations []*PreconditionFailure_Violation `protobuf:"bytes,1,rep,name=violations" json:"violations,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PreconditionFailure) Reset() { *m = PreconditionFailure{} } -func (*PreconditionFailure) ProtoMessage() {} -func (*PreconditionFailure) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{3} -} -func (m *PreconditionFailure) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreconditionFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PreconditionFailure.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *PreconditionFailure) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreconditionFailure.Merge(dst, src) -} -func (m *PreconditionFailure) XXX_Size() int { - return m.Size() -} -func (m *PreconditionFailure) XXX_DiscardUnknown() { - xxx_messageInfo_PreconditionFailure.DiscardUnknown(m) -} - -var xxx_messageInfo_PreconditionFailure proto.InternalMessageInfo - -func (m *PreconditionFailure) GetViolations() []*PreconditionFailure_Violation { - if m != nil { - return m.Violations - } - return nil -} - -func (*PreconditionFailure) XXX_MessageName() string { - return "google.rpc.PreconditionFailure" -} - -// A message type used to describe a single precondition failure. -type PreconditionFailure_Violation struct { - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation types. For - // example, "TOS" for "Terms of Service violation". - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would - // indicate which terms of service is being referenced. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PreconditionFailure_Violation) Reset() { *m = PreconditionFailure_Violation{} } -func (*PreconditionFailure_Violation) ProtoMessage() {} -func (*PreconditionFailure_Violation) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{3, 0} -} -func (m *PreconditionFailure_Violation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreconditionFailure_Violation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PreconditionFailure_Violation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *PreconditionFailure_Violation) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreconditionFailure_Violation.Merge(dst, src) -} -func (m *PreconditionFailure_Violation) XXX_Size() int { - return m.Size() -} -func (m *PreconditionFailure_Violation) XXX_DiscardUnknown() { - xxx_messageInfo_PreconditionFailure_Violation.DiscardUnknown(m) -} - -var xxx_messageInfo_PreconditionFailure_Violation proto.InternalMessageInfo - -func (m *PreconditionFailure_Violation) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *PreconditionFailure_Violation) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *PreconditionFailure_Violation) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (*PreconditionFailure_Violation) XXX_MessageName() string { - return "google.rpc.PreconditionFailure.Violation" -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -type BadRequest struct { - // Describes all violations in a client request. - FieldViolations []*BadRequest_FieldViolation `protobuf:"bytes,1,rep,name=field_violations,json=fieldViolations" json:"field_violations,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BadRequest) Reset() { *m = BadRequest{} } -func (*BadRequest) ProtoMessage() {} -func (*BadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{4} -} -func (m *BadRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BadRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BadRequest.Merge(dst, src) -} -func (m *BadRequest) XXX_Size() int { - return m.Size() -} -func (m *BadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BadRequest proto.InternalMessageInfo - -func (m *BadRequest) GetFieldViolations() []*BadRequest_FieldViolation { - if m != nil { - return m.FieldViolations - } - return nil -} - -func (*BadRequest) XXX_MessageName() string { - return "google.rpc.BadRequest" -} - -// A message type used to describe a single bad request field. -type BadRequest_FieldViolation struct { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "field_violations.field" would identify this field. - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` - // A description of why the request element is bad. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BadRequest_FieldViolation) Reset() { *m = BadRequest_FieldViolation{} } -func (*BadRequest_FieldViolation) ProtoMessage() {} -func (*BadRequest_FieldViolation) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{4, 0} -} -func (m *BadRequest_FieldViolation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BadRequest_FieldViolation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BadRequest_FieldViolation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BadRequest_FieldViolation) XXX_Merge(src proto.Message) { - xxx_messageInfo_BadRequest_FieldViolation.Merge(dst, src) -} -func (m *BadRequest_FieldViolation) XXX_Size() int { - return m.Size() -} -func (m *BadRequest_FieldViolation) XXX_DiscardUnknown() { - xxx_messageInfo_BadRequest_FieldViolation.DiscardUnknown(m) -} - -var xxx_messageInfo_BadRequest_FieldViolation proto.InternalMessageInfo - -func (m *BadRequest_FieldViolation) GetField() string { - if m != nil { - return m.Field - } - return "" -} - -func (m *BadRequest_FieldViolation) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (*BadRequest_FieldViolation) XXX_MessageName() string { - return "google.rpc.BadRequest.FieldViolation" -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -type RequestInfo struct { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - ServingData string `protobuf:"bytes,2,opt,name=serving_data,json=servingData,proto3" json:"serving_data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RequestInfo) Reset() { *m = RequestInfo{} } -func (*RequestInfo) ProtoMessage() {} -func (*RequestInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{5} -} -func (m *RequestInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *RequestInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestInfo.Merge(dst, src) -} -func (m *RequestInfo) XXX_Size() int { - return m.Size() -} -func (m *RequestInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RequestInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestInfo proto.InternalMessageInfo - -func (m *RequestInfo) GetRequestId() string { - if m != nil { - return m.RequestId - } - return "" -} - -func (m *RequestInfo) GetServingData() string { - if m != nil { - return m.ServingData - } - return "" -} - -func (*RequestInfo) XXX_MessageName() string { - return "google.rpc.RequestInfo" -} - -// Describes the resource that is being accessed. -type ResourceInfo struct { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - ResourceName string `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` - // The owner of the resource (optional). - // For example, "user:" or "project:". - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResourceInfo) Reset() { *m = ResourceInfo{} } -func (*ResourceInfo) ProtoMessage() {} -func (*ResourceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{6} -} -func (m *ResourceInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *ResourceInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceInfo.Merge(dst, src) -} -func (m *ResourceInfo) XXX_Size() int { - return m.Size() -} -func (m *ResourceInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceInfo proto.InternalMessageInfo - -func (m *ResourceInfo) GetResourceType() string { - if m != nil { - return m.ResourceType - } - return "" -} - -func (m *ResourceInfo) GetResourceName() string { - if m != nil { - return m.ResourceName - } - return "" -} - -func (m *ResourceInfo) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *ResourceInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (*ResourceInfo) XXX_MessageName() string { - return "google.rpc.ResourceInfo" -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -type Help struct { - // URL(s) pointing to additional information on handling the current error. - Links []*Help_Link `protobuf:"bytes,1,rep,name=links" json:"links,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Help) Reset() { *m = Help{} } -func (*Help) ProtoMessage() {} -func (*Help) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{7} -} -func (m *Help) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Help) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Help.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Help) XXX_Merge(src proto.Message) { - xxx_messageInfo_Help.Merge(dst, src) -} -func (m *Help) XXX_Size() int { - return m.Size() -} -func (m *Help) XXX_DiscardUnknown() { - xxx_messageInfo_Help.DiscardUnknown(m) -} - -var xxx_messageInfo_Help proto.InternalMessageInfo - -func (m *Help) GetLinks() []*Help_Link { - if m != nil { - return m.Links - } - return nil -} - -func (*Help) XXX_MessageName() string { - return "google.rpc.Help" -} - -// Describes a URL link. -type Help_Link struct { - // Describes what the link offers. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The URL of the link. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Help_Link) Reset() { *m = Help_Link{} } -func (*Help_Link) ProtoMessage() {} -func (*Help_Link) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{7, 0} -} -func (m *Help_Link) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Help_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Help_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Help_Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Help_Link.Merge(dst, src) -} -func (m *Help_Link) XXX_Size() int { - return m.Size() -} -func (m *Help_Link) XXX_DiscardUnknown() { - xxx_messageInfo_Help_Link.DiscardUnknown(m) -} - -var xxx_messageInfo_Help_Link proto.InternalMessageInfo - -func (m *Help_Link) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Help_Link) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (*Help_Link) XXX_MessageName() string { - return "google.rpc.Help.Link" -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -type LocalizedMessage struct { - // The locale used following the specification defined at - // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - Locale string `protobuf:"bytes,1,opt,name=locale,proto3" json:"locale,omitempty"` - // The localized error message in the above locale. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalizedMessage) Reset() { *m = LocalizedMessage{} } -func (*LocalizedMessage) ProtoMessage() {} -func (*LocalizedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_error_details_ff696d72eb1e7a26, []int{8} -} -func (m *LocalizedMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalizedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalizedMessage.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *LocalizedMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalizedMessage.Merge(dst, src) -} -func (m *LocalizedMessage) XXX_Size() int { - return m.Size() -} -func (m *LocalizedMessage) XXX_DiscardUnknown() { - xxx_messageInfo_LocalizedMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalizedMessage proto.InternalMessageInfo - -func (m *LocalizedMessage) GetLocale() string { - if m != nil { - return m.Locale - } - return "" -} - -func (m *LocalizedMessage) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (*LocalizedMessage) XXX_MessageName() string { - return "google.rpc.LocalizedMessage" -} -func init() { - proto.RegisterType((*RetryInfo)(nil), "google.rpc.RetryInfo") - proto.RegisterType((*DebugInfo)(nil), "google.rpc.DebugInfo") - proto.RegisterType((*QuotaFailure)(nil), "google.rpc.QuotaFailure") - proto.RegisterType((*QuotaFailure_Violation)(nil), "google.rpc.QuotaFailure.Violation") - proto.RegisterType((*PreconditionFailure)(nil), "google.rpc.PreconditionFailure") - proto.RegisterType((*PreconditionFailure_Violation)(nil), "google.rpc.PreconditionFailure.Violation") - proto.RegisterType((*BadRequest)(nil), "google.rpc.BadRequest") - proto.RegisterType((*BadRequest_FieldViolation)(nil), "google.rpc.BadRequest.FieldViolation") - proto.RegisterType((*RequestInfo)(nil), "google.rpc.RequestInfo") - proto.RegisterType((*ResourceInfo)(nil), "google.rpc.ResourceInfo") - proto.RegisterType((*Help)(nil), "google.rpc.Help") - proto.RegisterType((*Help_Link)(nil), "google.rpc.Help.Link") - proto.RegisterType((*LocalizedMessage)(nil), "google.rpc.LocalizedMessage") -} -func (this *RetryInfo) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*RetryInfo) - if !ok { - that2, ok := that.(RetryInfo) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.RetryDelay.Compare(that1.RetryDelay); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *DebugInfo) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*DebugInfo) - if !ok { - that2, ok := that.(DebugInfo) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.StackEntries) != len(that1.StackEntries) { - if len(this.StackEntries) < len(that1.StackEntries) { - return -1 - } - return 1 - } - for i := range this.StackEntries { - if this.StackEntries[i] != that1.StackEntries[i] { - if this.StackEntries[i] < that1.StackEntries[i] { - return -1 - } - return 1 - } - } - if this.Detail != that1.Detail { - if this.Detail < that1.Detail { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *QuotaFailure) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*QuotaFailure) - if !ok { - that2, ok := that.(QuotaFailure) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Violations) != len(that1.Violations) { - if len(this.Violations) < len(that1.Violations) { - return -1 - } - return 1 - } - for i := range this.Violations { - if c := this.Violations[i].Compare(that1.Violations[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *QuotaFailure_Violation) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*QuotaFailure_Violation) - if !ok { - that2, ok := that.(QuotaFailure_Violation) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Subject != that1.Subject { - if this.Subject < that1.Subject { - return -1 - } - return 1 - } - if this.Description != that1.Description { - if this.Description < that1.Description { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *PreconditionFailure) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*PreconditionFailure) - if !ok { - that2, ok := that.(PreconditionFailure) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Violations) != len(that1.Violations) { - if len(this.Violations) < len(that1.Violations) { - return -1 - } - return 1 - } - for i := range this.Violations { - if c := this.Violations[i].Compare(that1.Violations[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *PreconditionFailure_Violation) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*PreconditionFailure_Violation) - if !ok { - that2, ok := that.(PreconditionFailure_Violation) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Type != that1.Type { - if this.Type < that1.Type { - return -1 - } - return 1 - } - if this.Subject != that1.Subject { - if this.Subject < that1.Subject { - return -1 - } - return 1 - } - if this.Description != that1.Description { - if this.Description < that1.Description { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *BadRequest) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*BadRequest) - if !ok { - that2, ok := that.(BadRequest) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.FieldViolations) != len(that1.FieldViolations) { - if len(this.FieldViolations) < len(that1.FieldViolations) { - return -1 - } - return 1 - } - for i := range this.FieldViolations { - if c := this.FieldViolations[i].Compare(that1.FieldViolations[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *BadRequest_FieldViolation) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*BadRequest_FieldViolation) - if !ok { - that2, ok := that.(BadRequest_FieldViolation) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field != that1.Field { - if this.Field < that1.Field { - return -1 - } - return 1 - } - if this.Description != that1.Description { - if this.Description < that1.Description { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *RequestInfo) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*RequestInfo) - if !ok { - that2, ok := that.(RequestInfo) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.RequestId != that1.RequestId { - if this.RequestId < that1.RequestId { - return -1 - } - return 1 - } - if this.ServingData != that1.ServingData { - if this.ServingData < that1.ServingData { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *ResourceInfo) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ResourceInfo) - if !ok { - that2, ok := that.(ResourceInfo) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.ResourceType != that1.ResourceType { - if this.ResourceType < that1.ResourceType { - return -1 - } - return 1 - } - if this.ResourceName != that1.ResourceName { - if this.ResourceName < that1.ResourceName { - return -1 - } - return 1 - } - if this.Owner != that1.Owner { - if this.Owner < that1.Owner { - return -1 - } - return 1 - } - if this.Description != that1.Description { - if this.Description < that1.Description { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Help) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Help) - if !ok { - that2, ok := that.(Help) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Links) != len(that1.Links) { - if len(this.Links) < len(that1.Links) { - return -1 - } - return 1 - } - for i := range this.Links { - if c := this.Links[i].Compare(that1.Links[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Help_Link) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Help_Link) - if !ok { - that2, ok := that.(Help_Link) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Description != that1.Description { - if this.Description < that1.Description { - return -1 - } - return 1 - } - if this.Url != that1.Url { - if this.Url < that1.Url { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *LocalizedMessage) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*LocalizedMessage) - if !ok { - that2, ok := that.(LocalizedMessage) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Locale != that1.Locale { - if this.Locale < that1.Locale { - return -1 - } - return 1 - } - if this.Message != that1.Message { - if this.Message < that1.Message { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *RetryInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RetryInfo) - if !ok { - that2, ok := that.(RetryInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RetryDelay.Equal(that1.RetryDelay) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DebugInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DebugInfo) - if !ok { - that2, ok := that.(DebugInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.StackEntries) != len(that1.StackEntries) { - return false - } - for i := range this.StackEntries { - if this.StackEntries[i] != that1.StackEntries[i] { - return false - } - } - if this.Detail != that1.Detail { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *QuotaFailure) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QuotaFailure) - if !ok { - that2, ok := that.(QuotaFailure) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Violations) != len(that1.Violations) { - return false - } - for i := range this.Violations { - if !this.Violations[i].Equal(that1.Violations[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *QuotaFailure_Violation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QuotaFailure_Violation) - if !ok { - that2, ok := that.(QuotaFailure_Violation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Subject != that1.Subject { - return false - } - if this.Description != that1.Description { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *PreconditionFailure) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PreconditionFailure) - if !ok { - that2, ok := that.(PreconditionFailure) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Violations) != len(that1.Violations) { - return false - } - for i := range this.Violations { - if !this.Violations[i].Equal(that1.Violations[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *PreconditionFailure_Violation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PreconditionFailure_Violation) - if !ok { - that2, ok := that.(PreconditionFailure_Violation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Subject != that1.Subject { - return false - } - if this.Description != that1.Description { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BadRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BadRequest) - if !ok { - that2, ok := that.(BadRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.FieldViolations) != len(that1.FieldViolations) { - return false - } - for i := range this.FieldViolations { - if !this.FieldViolations[i].Equal(that1.FieldViolations[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BadRequest_FieldViolation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BadRequest_FieldViolation) - if !ok { - that2, ok := that.(BadRequest_FieldViolation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Field != that1.Field { - return false - } - if this.Description != that1.Description { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RequestInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RequestInfo) - if !ok { - that2, ok := that.(RequestInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RequestId != that1.RequestId { - return false - } - if this.ServingData != that1.ServingData { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ResourceInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ResourceInfo) - if !ok { - that2, ok := that.(ResourceInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ResourceType != that1.ResourceType { - return false - } - if this.ResourceName != that1.ResourceName { - return false - } - if this.Owner != that1.Owner { - return false - } - if this.Description != that1.Description { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Help) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Help) - if !ok { - that2, ok := that.(Help) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Help_Link) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Help_Link) - if !ok { - that2, ok := that.(Help_Link) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Description != that1.Description { - return false - } - if this.Url != that1.Url { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LocalizedMessage) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LocalizedMessage) - if !ok { - that2, ok := that.(LocalizedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Locale != that1.Locale { - return false - } - if this.Message != that1.Message { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RetryInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&rpc.RetryInfo{") - if this.RetryDelay != nil { - s = append(s, "RetryDelay: "+fmt.Sprintf("%#v", this.RetryDelay)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DebugInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&rpc.DebugInfo{") - s = append(s, "StackEntries: "+fmt.Sprintf("%#v", this.StackEntries)+",\n") - s = append(s, "Detail: "+fmt.Sprintf("%#v", this.Detail)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *QuotaFailure) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&rpc.QuotaFailure{") - if this.Violations != nil { - s = append(s, "Violations: "+fmt.Sprintf("%#v", this.Violations)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *QuotaFailure_Violation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&rpc.QuotaFailure_Violation{") - s = append(s, "Subject: "+fmt.Sprintf("%#v", this.Subject)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PreconditionFailure) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&rpc.PreconditionFailure{") - if this.Violations != nil { - s = append(s, "Violations: "+fmt.Sprintf("%#v", this.Violations)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PreconditionFailure_Violation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&rpc.PreconditionFailure_Violation{") - s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") - s = append(s, "Subject: "+fmt.Sprintf("%#v", this.Subject)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BadRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&rpc.BadRequest{") - if this.FieldViolations != nil { - s = append(s, "FieldViolations: "+fmt.Sprintf("%#v", this.FieldViolations)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BadRequest_FieldViolation) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&rpc.BadRequest_FieldViolation{") - s = append(s, "Field: "+fmt.Sprintf("%#v", this.Field)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *RequestInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&rpc.RequestInfo{") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "ServingData: "+fmt.Sprintf("%#v", this.ServingData)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ResourceInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&rpc.ResourceInfo{") - s = append(s, "ResourceType: "+fmt.Sprintf("%#v", this.ResourceType)+",\n") - s = append(s, "ResourceName: "+fmt.Sprintf("%#v", this.ResourceName)+",\n") - s = append(s, "Owner: "+fmt.Sprintf("%#v", this.Owner)+",\n") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Help) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&rpc.Help{") - if this.Links != nil { - s = append(s, "Links: "+fmt.Sprintf("%#v", this.Links)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Help_Link) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&rpc.Help_Link{") - s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") - s = append(s, "Url: "+fmt.Sprintf("%#v", this.Url)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *LocalizedMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&rpc.LocalizedMessage{") - s = append(s, "Locale: "+fmt.Sprintf("%#v", this.Locale)+",\n") - s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringErrorDetails(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *RetryInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryInfo) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.RetryDelay != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(m.RetryDelay.Size())) - n1, err := m.RetryDelay.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DebugInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DebugInfo) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StackEntries) > 0 { - for _, s := range m.StackEntries { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Detail) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Detail))) - i += copy(dAtA[i:], m.Detail) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *QuotaFailure) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QuotaFailure) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Violations) > 0 { - for _, msg := range m.Violations { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *QuotaFailure_Violation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QuotaFailure_Violation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Subject) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) - } - if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *PreconditionFailure) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PreconditionFailure) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Violations) > 0 { - for _, msg := range m.Violations { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *PreconditionFailure_Violation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PreconditionFailure_Violation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Type) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - } - if len(m.Subject) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) - } - if len(m.Description) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BadRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BadRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.FieldViolations) > 0 { - for _, msg := range m.FieldViolations { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BadRequest_FieldViolation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BadRequest_FieldViolation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) - } - if len(m.Description) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *RequestInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.RequestId))) - i += copy(dAtA[i:], m.RequestId) - } - if len(m.ServingData) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ServingData))) - i += copy(dAtA[i:], m.ServingData) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ResourceInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceInfo) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ResourceType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceType))) - i += copy(dAtA[i:], m.ResourceType) - } - if len(m.ResourceName) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.ResourceName))) - i += copy(dAtA[i:], m.ResourceName) - } - if len(m.Owner) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Owner))) - i += copy(dAtA[i:], m.Owner) - } - if len(m.Description) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Help) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Help) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Links) > 0 { - for _, msg := range m.Links { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Help_Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Help_Link) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Description) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if len(m.Url) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Url))) - i += copy(dAtA[i:], m.Url) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *LocalizedMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalizedMessage) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Locale) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Locale))) - i += copy(dAtA[i:], m.Locale) - } - if len(m.Message) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintErrorDetails(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintErrorDetails(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedRetryInfo(r randyErrorDetails, easy bool) *RetryInfo { - this := &RetryInfo{} - if r.Intn(10) != 0 { - this.RetryDelay = types.NewPopulatedDuration(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 2) - } - return this -} - -func NewPopulatedDebugInfo(r randyErrorDetails, easy bool) *DebugInfo { - this := &DebugInfo{} - v1 := r.Intn(10) - this.StackEntries = make([]string, v1) - for i := 0; i < v1; i++ { - this.StackEntries[i] = string(randStringErrorDetails(r)) - } - this.Detail = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 3) - } - return this -} - -func NewPopulatedQuotaFailure(r randyErrorDetails, easy bool) *QuotaFailure { - this := &QuotaFailure{} - if r.Intn(10) != 0 { - v2 := r.Intn(5) - this.Violations = make([]*QuotaFailure_Violation, v2) - for i := 0; i < v2; i++ { - this.Violations[i] = NewPopulatedQuotaFailure_Violation(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 2) - } - return this -} - -func NewPopulatedQuotaFailure_Violation(r randyErrorDetails, easy bool) *QuotaFailure_Violation { - this := &QuotaFailure_Violation{} - this.Subject = string(randStringErrorDetails(r)) - this.Description = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 3) - } - return this -} - -func NewPopulatedPreconditionFailure(r randyErrorDetails, easy bool) *PreconditionFailure { - this := &PreconditionFailure{} - if r.Intn(10) != 0 { - v3 := r.Intn(5) - this.Violations = make([]*PreconditionFailure_Violation, v3) - for i := 0; i < v3; i++ { - this.Violations[i] = NewPopulatedPreconditionFailure_Violation(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 2) - } - return this -} - -func NewPopulatedPreconditionFailure_Violation(r randyErrorDetails, easy bool) *PreconditionFailure_Violation { - this := &PreconditionFailure_Violation{} - this.Type = string(randStringErrorDetails(r)) - this.Subject = string(randStringErrorDetails(r)) - this.Description = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 4) - } - return this -} - -func NewPopulatedBadRequest(r randyErrorDetails, easy bool) *BadRequest { - this := &BadRequest{} - if r.Intn(10) != 0 { - v4 := r.Intn(5) - this.FieldViolations = make([]*BadRequest_FieldViolation, v4) - for i := 0; i < v4; i++ { - this.FieldViolations[i] = NewPopulatedBadRequest_FieldViolation(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 2) - } - return this -} - -func NewPopulatedBadRequest_FieldViolation(r randyErrorDetails, easy bool) *BadRequest_FieldViolation { - this := &BadRequest_FieldViolation{} - this.Field = string(randStringErrorDetails(r)) - this.Description = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 3) - } - return this -} - -func NewPopulatedRequestInfo(r randyErrorDetails, easy bool) *RequestInfo { - this := &RequestInfo{} - this.RequestId = string(randStringErrorDetails(r)) - this.ServingData = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 3) - } - return this -} - -func NewPopulatedResourceInfo(r randyErrorDetails, easy bool) *ResourceInfo { - this := &ResourceInfo{} - this.ResourceType = string(randStringErrorDetails(r)) - this.ResourceName = string(randStringErrorDetails(r)) - this.Owner = string(randStringErrorDetails(r)) - this.Description = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 5) - } - return this -} - -func NewPopulatedHelp(r randyErrorDetails, easy bool) *Help { - this := &Help{} - if r.Intn(10) != 0 { - v5 := r.Intn(5) - this.Links = make([]*Help_Link, v5) - for i := 0; i < v5; i++ { - this.Links[i] = NewPopulatedHelp_Link(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 2) - } - return this -} - -func NewPopulatedHelp_Link(r randyErrorDetails, easy bool) *Help_Link { - this := &Help_Link{} - this.Description = string(randStringErrorDetails(r)) - this.Url = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 3) - } - return this -} - -func NewPopulatedLocalizedMessage(r randyErrorDetails, easy bool) *LocalizedMessage { - this := &LocalizedMessage{} - this.Locale = string(randStringErrorDetails(r)) - this.Message = string(randStringErrorDetails(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedErrorDetails(r, 3) - } - return this -} - -type randyErrorDetails interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneErrorDetails(r randyErrorDetails) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringErrorDetails(r randyErrorDetails) string { - v6 := r.Intn(100) - tmps := make([]rune, v6) - for i := 0; i < v6; i++ { - tmps[i] = randUTF8RuneErrorDetails(r) - } - return string(tmps) -} -func randUnrecognizedErrorDetails(r randyErrorDetails, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldErrorDetails(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldErrorDetails(dAtA []byte, r randyErrorDetails, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateErrorDetails(dAtA, uint64(key)) - v7 := r.Int63() - if r.Intn(2) == 0 { - v7 *= -1 - } - dAtA = encodeVarintPopulateErrorDetails(dAtA, uint64(v7)) - case 1: - dAtA = encodeVarintPopulateErrorDetails(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateErrorDetails(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateErrorDetails(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateErrorDetails(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateErrorDetails(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *RetryInfo) Size() (n int) { - var l int - _ = l - if m.RetryDelay != nil { - l = m.RetryDelay.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DebugInfo) Size() (n int) { - var l int - _ = l - if len(m.StackEntries) > 0 { - for _, s := range m.StackEntries { - l = len(s) - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - l = len(m.Detail) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *QuotaFailure) Size() (n int) { - var l int - _ = l - if len(m.Violations) > 0 { - for _, e := range m.Violations { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *QuotaFailure_Violation) Size() (n int) { - var l int - _ = l - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PreconditionFailure) Size() (n int) { - var l int - _ = l - if len(m.Violations) > 0 { - for _, e := range m.Violations { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PreconditionFailure_Violation) Size() (n int) { - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BadRequest) Size() (n int) { - var l int - _ = l - if len(m.FieldViolations) > 0 { - for _, e := range m.FieldViolations { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BadRequest_FieldViolation) Size() (n int) { - var l int - _ = l - l = len(m.Field) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RequestInfo) Size() (n int) { - var l int - _ = l - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.ServingData) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ResourceInfo) Size() (n int) { - var l int - _ = l - l = len(m.ResourceType) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Help) Size() (n int) { - var l int - _ = l - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovErrorDetails(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Help_Link) Size() (n int) { - var l int - _ = l - l = len(m.Description) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalizedMessage) Size() (n int) { - var l int - _ = l - l = len(m.Locale) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovErrorDetails(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovErrorDetails(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozErrorDetails(x uint64) (n int) { - return sovErrorDetails(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *RetryInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RetryInfo{`, - `RetryDelay:` + strings.Replace(fmt.Sprintf("%v", this.RetryDelay), "Duration", "types.Duration", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *DebugInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DebugInfo{`, - `StackEntries:` + fmt.Sprintf("%v", this.StackEntries) + `,`, - `Detail:` + fmt.Sprintf("%v", this.Detail) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *QuotaFailure) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&QuotaFailure{`, - `Violations:` + strings.Replace(fmt.Sprintf("%v", this.Violations), "QuotaFailure_Violation", "QuotaFailure_Violation", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *QuotaFailure_Violation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&QuotaFailure_Violation{`, - `Subject:` + fmt.Sprintf("%v", this.Subject) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PreconditionFailure) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PreconditionFailure{`, - `Violations:` + strings.Replace(fmt.Sprintf("%v", this.Violations), "PreconditionFailure_Violation", "PreconditionFailure_Violation", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PreconditionFailure_Violation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PreconditionFailure_Violation{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Subject:` + fmt.Sprintf("%v", this.Subject) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *BadRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BadRequest{`, - `FieldViolations:` + strings.Replace(fmt.Sprintf("%v", this.FieldViolations), "BadRequest_FieldViolation", "BadRequest_FieldViolation", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *BadRequest_FieldViolation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BadRequest_FieldViolation{`, - `Field:` + fmt.Sprintf("%v", this.Field) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *RequestInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RequestInfo{`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `ServingData:` + fmt.Sprintf("%v", this.ServingData) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceInfo{`, - `ResourceType:` + fmt.Sprintf("%v", this.ResourceType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `Owner:` + fmt.Sprintf("%v", this.Owner) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Help) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Help{`, - `Links:` + strings.Replace(fmt.Sprintf("%v", this.Links), "Help_Link", "Help_Link", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Help_Link) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Help_Link{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Url:` + fmt.Sprintf("%v", this.Url) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *LocalizedMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LocalizedMessage{`, - `Locale:` + fmt.Sprintf("%v", this.Locale) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringErrorDetails(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *RetryInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryDelay == nil { - m.RetryDelay = &types.Duration{} - } - if err := m.RetryDelay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *DebugInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DebugInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DebugInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StackEntries", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StackEntries = append(m.StackEntries, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Detail = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *QuotaFailure) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuotaFailure: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuotaFailure: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Violations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Violations = append(m.Violations, &QuotaFailure_Violation{}) - if err := m.Violations[len(m.Violations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *QuotaFailure_Violation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Violation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Violation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *PreconditionFailure) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PreconditionFailure: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PreconditionFailure: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Violations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Violations = append(m.Violations, &PreconditionFailure_Violation{}) - if err := m.Violations[len(m.Violations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *PreconditionFailure_Violation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Violation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Violation: 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 ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *BadRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BadRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BadRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldViolations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldViolations = append(m.FieldViolations, &BadRequest_FieldViolation{}) - if err := m.FieldViolations[len(m.FieldViolations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *BadRequest_FieldViolation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FieldViolation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FieldViolation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *RequestInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServingData", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServingData = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *ResourceInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *Help) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Help: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Help: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &Help_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *Help_Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 *LocalizedMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalizedMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalizedMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Locale", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Locale = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthErrorDetails - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipErrorDetails(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthErrorDetails - } - 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 skipErrorDetails(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - 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, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthErrorDetails - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipErrorDetails(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthErrorDetails = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowErrorDetails = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("google/rpc/error_details.proto", fileDescriptor_error_details_ff696d72eb1e7a26) -} - -var fileDescriptor_error_details_ff696d72eb1e7a26 = []byte{ - // 624 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x18, 0xed, 0x35, 0x69, 0x91, 0xbf, 0x84, 0x52, 0xcc, 0x0f, 0x85, 0x48, 0x9c, 0x82, 0x11, 0x52, - 0x11, 0x92, 0x2b, 0x95, 0xad, 0x63, 0x48, 0x7f, 0x49, 0x05, 0x82, 0x85, 0x18, 0x60, 0xb0, 0x2e, - 0xf6, 0x97, 0xe8, 0xa8, 0xe3, 0x33, 0x67, 0xbb, 0xa8, 0x4c, 0xfc, 0x09, 0xec, 0x6c, 0x4c, 0xfd, - 0x27, 0xd8, 0x3b, 0x76, 0x64, 0x24, 0xe9, 0xc2, 0xd8, 0x91, 0x11, 0x9d, 0x7d, 0xd7, 0xba, 0x4d, - 0x41, 0x6c, 0x7e, 0xef, 0xde, 0x3d, 0xbf, 0xf7, 0xe9, 0xee, 0x80, 0x8e, 0x84, 0x18, 0x45, 0xb8, - 0x2a, 0x93, 0x60, 0x15, 0xa5, 0x14, 0xd2, 0x0f, 0x31, 0x63, 0x3c, 0x4a, 0xdd, 0x44, 0x8a, 0x4c, - 0xd8, 0x50, 0xae, 0xbb, 0x32, 0x09, 0xda, 0x46, 0x5b, 0xac, 0x0c, 0xf2, 0xe1, 0x6a, 0x98, 0x4b, - 0x96, 0x71, 0x11, 0x97, 0x5a, 0x67, 0x0b, 0x2c, 0x0f, 0x33, 0x79, 0xb0, 0x13, 0x0f, 0x85, 0xbd, - 0x0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5d, 0x11, 0xb0, 0x88, 0x7f, 0xc2, - 0xf0, 0x39, 0xa6, 0x29, 0x1b, 0xa1, 0xba, 0x89, 0x91, 0xe2, 0x4c, 0x7f, 0x8d, 0xd4, 0x39, 0x1b, - 0x97, 0x12, 0x73, 0xce, 0x34, 0xec, 0x86, 0xc7, 0x13, 0x3a, 0xf7, 0x63, 0x42, 0xe7, 0x4e, 0x27, - 0x94, 0xfc, 0x9e, 0x50, 0xf2, 0x79, 0x4a, 0xc9, 0xe1, 0x94, 0x92, 0xa3, 0x29, 0x25, 0xc7, 0x53, - 0x4a, 0x7e, 0x4e, 0x29, 0xf9, 0x35, 0xa5, 0x73, 0xa7, 0x8a, 0x3f, 0xa1, 0xe4, 0xe8, 0x84, 0x12, - 0x58, 0x0a, 0xc4, 0xb8, 0x52, 0xac, 0x7b, 0x73, 0x43, 0xbd, 0x5e, 0xbd, 0xf2, 0xf1, 0xea, 0xab, - 0xe7, 0xa5, 0x4f, 0xde, 0xd6, 0x64, 0x12, 0x7c, 0x9b, 0xaf, 0x79, 0xfd, 0x67, 0x83, 0xc5, 0xe2, - 0xc9, 0x79, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x63, 0xe4, 0x76, 0x26, 0xf1, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/googleapis/google/rpc/error_details.proto b/vendor/github.com/gogo/googleapis/google/rpc/error_details.proto deleted file mode 100644 index a62078ba0a..0000000000 --- a/vendor/github.com/gogo/googleapis/google/rpc/error_details.proto +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/duration.proto"; - -option go_package = "rpc"; -option java_multiple_files = true; -option java_outer_classname = "ErrorDetailsProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retires have been reached or a maximum retry delay cap has been -// reached. -message RetryInfo { - // Clients should wait at least this long between retrying the same request. - google.protobuf.Duration retry_delay = 1; -} - -// Describes additional debugging info. -message DebugInfo { - // The stack trace entries indicating where the error occurred. - repeated string stack_entries = 1; - - // Additional debugging information provided by the server. - string detail = 2; -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryDetail and Help types for other details about handling a -// quota failure. -message QuotaFailure { - // A message type used to describe a single quota violation. For example, a - // daily quota or a custom quota that was exceeded. - message Violation { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - string subject = 1; - - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - string description = 2; - } - - // Describes all quota violations. - repeated Violation violations = 1; -} - -// Describes what preconditions have failed. -// -// For example, if an RPC failed because it required the Terms of Service to be -// acknowledged, it could list the terms of service violation in the -// PreconditionFailure message. -message PreconditionFailure { - // A message type used to describe a single precondition failure. - message Violation { - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation types. For - // example, "TOS" for "Terms of Service violation". - string type = 1; - - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would - // indicate which terms of service is being referenced. - string subject = 2; - - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - string description = 3; - } - - // Describes all precondition violations. - repeated Violation violations = 1; -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -message BadRequest { - // A message type used to describe a single bad request field. - message FieldViolation { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "field_violations.field" would identify this field. - string field = 1; - - // A description of why the request element is bad. - string description = 2; - } - - // Describes all violations in a client request. - repeated FieldViolation field_violations = 1; -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -message RequestInfo { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - string request_id = 1; - - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - string serving_data = 2; -} - -// Describes the resource that is being accessed. -message ResourceInfo { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - string resource_type = 1; - - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - string resource_name = 2; - - // The owner of the resource (optional). - // For example, "user:" or "project:". - string owner = 3; - - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - string description = 4; -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -message Help { - // Describes a URL link. - message Link { - // Describes what the link offers. - string description = 1; - - // The URL of the link. - string url = 2; - } - - // URL(s) pointing to additional information on handling the current error. - repeated Link links = 1; -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -message LocalizedMessage { - // The locale used following the specification defined at - // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - string locale = 1; - - // The localized error message in the above locale. - string message = 2; -} diff --git a/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go deleted file mode 100644 index ece1aec112..0000000000 --- a/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go +++ /dev/null @@ -1,726 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/rpc/status.proto - -package rpc - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import types "github.com/gogo/protobuf/types" - -import bytes "bytes" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -// The `Status` type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. It is used by -// [gRPC](https://github.com/grpc). The error model is designed to be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error message, -// and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The -// error message should be a developer-facing English message that helps -// developers *understand* and *resolve* the error. If a localized user-facing -// error message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain arbitrary -// information about the error. There is a predefined set of error detail types -// in the package `google.rpc` that can be used for common error conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. -type Status struct { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - Details []*types.Any `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Status) Reset() { *m = Status{} } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_status_8f2fc8d48733ea2f, []int{0} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(dst, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -func (m *Status) GetCode() int32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *Status) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Status) GetDetails() []*types.Any { - if m != nil { - return m.Details - } - return nil -} - -func (*Status) XXX_MessageName() string { - return "google.rpc.Status" -} -func init() { - proto.RegisterType((*Status)(nil), "google.rpc.Status") -} -func (this *Status) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Status) - if !ok { - that2, ok := that.(Status) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Code != that1.Code { - if this.Code < that1.Code { - return -1 - } - return 1 - } - if this.Message != that1.Message { - if this.Message < that1.Message { - return -1 - } - return 1 - } - if len(this.Details) != len(that1.Details) { - if len(this.Details) < len(that1.Details) { - return -1 - } - return 1 - } - for i := range this.Details { - if c := this.Details[i].Compare(that1.Details[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Status) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Status) - if !ok { - that2, ok := that.(Status) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Code != that1.Code { - return false - } - if this.Message != that1.Message { - return false - } - if len(this.Details) != len(that1.Details) { - return false - } - for i := range this.Details { - if !this.Details[i].Equal(that1.Details[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Status) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&rpc.Status{") - s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") - s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n") - if this.Details != nil { - s = append(s, "Details: "+fmt.Sprintf("%#v", this.Details)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringStatus(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Status) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Status) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Code != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintStatus(dAtA, i, uint64(m.Code)) - } - if len(m.Message) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintStatus(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - } - if len(m.Details) > 0 { - for _, msg := range m.Details { - dAtA[i] = 0x1a - i++ - i = encodeVarintStatus(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func NewPopulatedStatus(r randyStatus, easy bool) *Status { - this := &Status{} - this.Code = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Code *= -1 - } - this.Message = string(randStringStatus(r)) - if r.Intn(10) != 0 { - v1 := r.Intn(5) - this.Details = make([]*types.Any, v1) - for i := 0; i < v1; i++ { - this.Details[i] = types.NewPopulatedAny(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedStatus(r, 4) - } - return this -} - -type randyStatus interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneStatus(r randyStatus) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringStatus(r randyStatus) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneStatus(r) - } - return string(tmps) -} -func randUnrecognizedStatus(r randyStatus, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldStatus(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldStatus(dAtA []byte, r randyStatus, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateStatus(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateStatus(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateStatus(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Status) Size() (n int) { - var l int - _ = l - if m.Code != 0 { - n += 1 + sovStatus(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if len(m.Details) > 0 { - for _, e := range m.Details { - l = e.Size() - n += 1 + l + sovStatus(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovStatus(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozStatus(x uint64) (n int) { - return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Status) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Status{`, - `Code:` + fmt.Sprintf("%v", this.Code) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Details:` + strings.Replace(fmt.Sprintf("%v", this.Details), "Any", "types.Any", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringStatus(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Status) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Details = append(m.Details, &types.Any{}) - if err := m.Details[len(m.Details)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - 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 skipStatus(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - 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, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthStatus - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipStatus(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_status_8f2fc8d48733ea2f) } - -var fileDescriptor_status_8f2fc8d48733ea2f = []byte{ - // 235 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81, - 0x65, 0x92, 0x4a, 0xd3, 0xf4, 0x13, 0xf3, 0x2a, 0x21, 0xca, 0x94, 0xd2, 0xb8, 0xd8, 0x82, 0xc1, - 0xda, 0x84, 0x84, 0xb8, 0x58, 0x92, 0xf3, 0x53, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83, - 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05, - 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7, - 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7, - 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0xb8, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, - 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, - 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, - 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x8b, 0x2f, 0x39, 0x3f, - 0x57, 0x0f, 0xe1, 0x11, 0x27, 0x6e, 0x88, 0x5b, 0x03, 0x40, 0x56, 0x04, 0x30, 0x46, 0x31, 0x17, - 0x15, 0x24, 0x2f, 0x62, 0x62, 0x0e, 0x0a, 0x70, 0x4e, 0x62, 0x03, 0x5b, 0x6b, 0x0c, 0x08, 0x00, - 0x00, 0xff, 0xff, 0xaa, 0x06, 0xa1, 0xaa, 0x10, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/googleapis/google/rpc/status.proto b/vendor/github.com/gogo/googleapis/google/rpc/status.proto deleted file mode 100644 index db3226ee06..0000000000 --- a/vendor/github.com/gogo/googleapis/google/rpc/status.proto +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option go_package = "rpc"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - - -// The `Status` type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. It is used by -// [gRPC](https://github.com/grpc). The error model is designed to be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error message, -// and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The -// error message should be a developer-facing English message that helps -// developers *understand* and *resolve* the error. If a localized user-facing -// error message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain arbitrary -// information about the error. There is a predefined set of error detail types -// in the package `google.rpc` that can be used for common error conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. -message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go similarity index 86% rename from vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go rename to vendor/github.com/golang/protobuf/jsonpb/jsonpb.go index 3893c02d46..e9cc202585 100644 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go @@ -51,11 +51,13 @@ import ( "strings" "time" - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/proto" + + stpb "github.com/golang/protobuf/ptypes/struct" ) const secondInNanos = int64(time.Second / time.Nanosecond) +const maxSecondsInDuration = 315576000000 // Marshaler is a configurable object for converting between // protocol buffer objects and a JSON representation for them. @@ -159,7 +161,7 @@ func (s int32Slice) Len() int { return len(s) } func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -type isWkt interface { +type wkt interface { XXX_WellKnownType() string } @@ -198,7 +200,7 @@ func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeU s := reflect.ValueOf(v).Elem() // Handle well-known types. - if wkt, ok := v.(isWkt); ok { + if wkt, ok := v.(wkt); ok { switch wkt.XXX_WellKnownType() { case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": @@ -210,19 +212,26 @@ func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeU // Any is a bit more involved. return m.marshalAny(out, v, indent) case "Duration": - // "Generated output always contains 0, 3, 6, or 9 fractional digits, - // depending on required precision." s, ns := s.Field(0).Int(), s.Field(1).Int() + if s < -maxSecondsInDuration || s > maxSecondsInDuration { + return fmt.Errorf("seconds out of range %v", s) + } if ns <= -secondInNanos || ns >= secondInNanos { return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos) } if (s > 0 && ns < 0) || (s < 0 && ns > 0) { return errors.New("signs of seconds and nanos do not match") } - if s < 0 { + // Generated output always contains 0, 3, 6, or 9 fractional digits, + // depending on required precision, followed by the suffix "s". + f := "%d.%09d" + if ns < 0 { ns = -ns + if s == 0 { + f = "-%d.%09d" + } } - x := fmt.Sprintf("%d.%09d", s, ns) + x := fmt.Sprintf(f, s, ns) x = strings.TrimSuffix(x, "000") x = strings.TrimSuffix(x, "000") x = strings.TrimSuffix(x, ".000") @@ -286,11 +295,6 @@ func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeU continue } - //this is not a protobuf field - if valueField.Tag.Get("protobuf") == "" && valueField.Tag.Get("protobuf_oneof") == "" { - continue - } - // IsNil will panic on most value kinds. switch value.Kind() { case reflect.Chan, reflect.Func, reflect.Interface: @@ -339,22 +343,6 @@ func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeU if !firstField { m.writeSep(out) } - // If the map value is a cast type, it may not implement proto.Message, therefore - // allow the struct tag to declare the underlying message type. Change the property - // of the child types, use CustomType as a passer. CastType currently property is - // not used in json encoding. - if value.Kind() == reflect.Map { - if tag := valueField.Tag.Get("protobuf"); tag != "" { - for _, v := range strings.Split(tag, ",") { - if !strings.HasPrefix(v, "castvaluetype=") { - continue - } - v = strings.TrimPrefix(v, "castvaluetype=") - prop.MapValProp.CustomType = v - break - } - } - } if err := m.marshalField(out, prop, value, indent); err != nil { return err } @@ -438,7 +426,7 @@ func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) return err } - if _, ok := msg.(isWkt); ok { + if _, ok := msg.(wkt); ok { out.write("{") if m.Indent != "" { out.write("\n") @@ -505,7 +493,7 @@ func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v refle // marshalValue writes the value to the Writer. func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { - + var err error v = reflect.Indirect(v) // Handle nil pointer @@ -543,7 +531,7 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle // Handle well-known types. // Most are handled up in marshalObject (because 99% are messages). - if wkt, ok := v.Interface().(isWkt); ok { + if wkt, ok := v.Interface().(wkt); ok { switch wkt.XXX_WellKnownType() { case "NullValue": out.write("null") @@ -551,19 +539,6 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle } } - if t, ok := v.Interface().(time.Time); ok { - ts, err := types.TimestampProto(t) - if err != nil { - return err - } - return m.marshalValue(out, prop, reflect.ValueOf(ts), indent) - } - - if d, ok := v.Interface().(time.Duration); ok { - dur := types.DurationProto(d) - return m.marshalValue(out, prop, reflect.ValueOf(dur), indent) - } - // Handle enumerations. if !m.EnumsAsInts && prop.Enum != "" { // Unknown enum values will are stringified by the proto library as their @@ -576,23 +551,7 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle } else { valStr = strconv.Itoa(int(v.Int())) } - - if m, ok := v.Interface().(interface { - MarshalJSON() ([]byte, error) - }); ok { - data, err := m.MarshalJSON() - if err != nil { - return err - } - enumStr = string(data) - enumStr, err = strconv.Unquote(enumStr) - if err != nil { - return err - } - } - isKnownEnum := enumStr != valStr - if isKnownEnum { out.write(`"`) } @@ -605,42 +564,7 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle // Handle nested messages. if v.Kind() == reflect.Struct { - i := v - if v.CanAddr() { - i = v.Addr() - } else { - i = reflect.New(v.Type()) - i.Elem().Set(v) - } - iface := i.Interface() - if iface == nil { - out.write(`null`) - return out.err - } - - if m, ok := v.Interface().(interface { - MarshalJSON() ([]byte, error) - }); ok { - data, err := m.MarshalJSON() - if err != nil { - return err - } - out.write(string(data)) - return nil - } - - pm, ok := iface.(proto.Message) - if !ok { - if prop.CustomType == "" { - return fmt.Errorf("%v does not implement proto.Message", v.Type()) - } - t := proto.MessageType(prop.CustomType) - if t == nil || !i.Type().ConvertibleTo(t) { - return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) - } - pm = i.Convert(t).Interface().(proto.Message) - } - return m.marshalObject(out, pm, indent+m.Indent, "") + return m.marshalObject(out, v.Addr().Interface().(proto.Message), indent+m.Indent, "") } // Handle maps. @@ -800,7 +724,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe // If input value is "null" and target is a pointer type, then the field should be treated as not set // UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue. _, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler) - if string(inputValue) == "null" && targetType != reflect.TypeOf(&types.Value{}) && !isJSONPBUnmarshaler { + if string(inputValue) == "null" && targetType != reflect.TypeOf(&stpb.Value{}) && !isJSONPBUnmarshaler { return nil } target.Set(reflect.New(targetType.Elem())) @@ -813,7 +737,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe } // Handle well-known types that are not pointers. - if w, ok := target.Addr().Interface().(isWkt); ok { + if w, ok := target.Addr().Interface().(wkt); ok { switch w.XXX_WellKnownType() { case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": @@ -849,20 +773,20 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe return err } - if _, ok := m.(isWkt); ok { + if _, ok := m.(wkt); ok { val, ok := jsonFields["value"] if !ok { return errors.New("Any JSON doesn't have 'value'") } - if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil { + if err := u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil { return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) } } else { delete(jsonFields, "@type") - nestedProto, uerr := json.Marshal(jsonFields) - if uerr != nil { - return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", uerr) + nestedProto, err := json.Marshal(jsonFields) + if err != nil { + return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", err) } if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), nestedProto, nil); err != nil { @@ -913,9 +837,10 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe if err := json.Unmarshal(inputValue, &m); err != nil { return fmt.Errorf("bad StructValue: %v", err) } - target.Field(0).Set(reflect.ValueOf(map[string]*types.Value{})) + + target.Field(0).Set(reflect.ValueOf(map[string]*stpb.Value{})) for k, jv := range m { - pv := &types.Value{} + pv := &stpb.Value{} if err := u.unmarshalValue(reflect.ValueOf(pv).Elem(), jv, prop); err != nil { return fmt.Errorf("bad value in StructValue for key %q: %v", k, err) } @@ -928,7 +853,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe return fmt.Errorf("bad ListValue: %v", err) } - target.Field(0).Set(reflect.ValueOf(make([]*types.Value, len(s)))) + target.Field(0).Set(reflect.ValueOf(make([]*stpb.Value, len(s)))) for i, sv := range s { if err := u.unmarshalValue(target.Field(0).Index(i), sv, prop); err != nil { return err @@ -938,20 +863,20 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe case "Value": ivStr := string(inputValue) if ivStr == "null" { - target.Field(0).Set(reflect.ValueOf(&types.Value_NullValue{})) + target.Field(0).Set(reflect.ValueOf(&stpb.Value_NullValue{})) } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil { - target.Field(0).Set(reflect.ValueOf(&types.Value_NumberValue{NumberValue: v})) + target.Field(0).Set(reflect.ValueOf(&stpb.Value_NumberValue{v})) } else if v, err := unquote(ivStr); err == nil { - target.Field(0).Set(reflect.ValueOf(&types.Value_StringValue{StringValue: v})) + target.Field(0).Set(reflect.ValueOf(&stpb.Value_StringValue{v})) } else if v, err := strconv.ParseBool(ivStr); err == nil { - target.Field(0).Set(reflect.ValueOf(&types.Value_BoolValue{BoolValue: v})) + target.Field(0).Set(reflect.ValueOf(&stpb.Value_BoolValue{v})) } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil { - lv := &types.ListValue{} - target.Field(0).Set(reflect.ValueOf(&types.Value_ListValue{ListValue: lv})) + lv := &stpb.ListValue{} + target.Field(0).Set(reflect.ValueOf(&stpb.Value_ListValue{lv})) return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop) } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil { - sv := &types.Struct{} - target.Field(0).Set(reflect.ValueOf(&types.Value_StructValue{StructValue: sv})) + sv := &stpb.Struct{} + target.Field(0).Set(reflect.ValueOf(&stpb.Value_StructValue{sv})) return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop) } else { return fmt.Errorf("unrecognized type for Value %q", ivStr) @@ -960,32 +885,6 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe } } - if t, ok := target.Addr().Interface().(*time.Time); ok { - ts := &types.Timestamp{} - if err := u.unmarshalValue(reflect.ValueOf(ts).Elem(), inputValue, prop); err != nil { - return err - } - tt, err := types.TimestampFromProto(ts) - if err != nil { - return err - } - *t = tt - return nil - } - - if d, ok := target.Addr().Interface().(*time.Duration); ok { - dur := &types.Duration{} - if err := u.unmarshalValue(reflect.ValueOf(dur).Elem(), inputValue, prop); err != nil { - return err - } - dd, err := types.DurationFromProto(dur) - if err != nil { - return err - } - *d = dd - return nil - } - // Handle enums, which have an underlying type of int32, // and may appear as strings. // The case of an enum appearing as a number is handled @@ -1010,14 +909,6 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe return nil } - if prop != nil && len(prop.CustomType) > 0 && target.CanAddr() { - if m, ok := target.Addr().Interface().(interface { - UnmarshalJSON([]byte) error - }); ok { - return json.Unmarshal(inputValue, m) - } - } - // Handle nested messages. if targetType.Kind() == reflect.Struct { var jsonFields map[string]json.RawMessage @@ -1053,6 +944,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe if strings.HasPrefix(ft.Name, "XXX_") { continue } + valueForField, ok := consumeField(sprops.Prop[i]) if !ok { continue @@ -1108,33 +1000,8 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe return nil } - // Handle arrays - if targetType.Kind() == reflect.Slice { - if targetType.Elem().Kind() == reflect.Uint8 { - outRef := reflect.New(targetType) - outVal := outRef.Interface() - //CustomType with underlying type []byte - if _, ok := outVal.(interface { - UnmarshalJSON([]byte) error - }); ok { - if err := json.Unmarshal(inputValue, outVal); err != nil { - return err - } - target.Set(outRef.Elem()) - return nil - } - // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling - // strings into aliased []byte types. - // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 - // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a - var out []byte - if err := json.Unmarshal(inputValue, &out); err != nil { - return err - } - target.SetBytes(out) - return nil - } - + // Handle arrays (which aren't encoded bytes) + if targetType.Kind() == reflect.Slice && targetType.Elem().Kind() != reflect.Uint8 { var slc []json.RawMessage if err := json.Unmarshal(inputValue, &slc); err != nil { return err @@ -1176,10 +1043,6 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe } } - if !k.Type().AssignableTo(targetType.Key()) { - k = k.Convert(targetType.Key()) - } - // Unmarshal map value. v := reflect.New(targetType.Elem()).Elem() var vprop *proto.Properties @@ -1297,7 +1160,7 @@ func checkRequiredFields(pb proto.Message) error { // When an Any message is being unmarshaled, the code will have invoked proto.Marshal on the // embedded message to store the serialized message in Any.Value field, and that should have // returned an error if a required field is not set. - if _, ok := pb.(isWkt); ok { + if _, ok := pb.(wkt); ok { return nil } diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go index 79668ff5c5..a4b8c0cd3a 100644 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ b/vendor/github.com/golang/protobuf/proto/properties.go @@ -38,7 +38,6 @@ package proto import ( "fmt" "log" - "os" "reflect" "sort" "strconv" @@ -194,7 +193,7 @@ func (p *Properties) Parse(s string) { // "bytes,49,opt,name=foo,def=hello!" fields := strings.Split(s, ",") // breaks def=, but handled below. if len(fields) < 2 { - fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + log.Printf("proto: tag has too few fields: %q", s) return } @@ -214,7 +213,7 @@ func (p *Properties) Parse(s string) { p.WireType = WireBytes // no numeric converter for non-numeric types default: - fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + log.Printf("proto: tag has unknown wire type: %q", s) return } diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go new file mode 100644 index 0000000000..b4eb03eccf --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go @@ -0,0 +1,83 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/empty.proto + +package empty + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_900544acb223d5b8, []int{0} +} + +func (*Empty) XXX_WellKnownType() string { return "Empty" } + +func (m *Empty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Empty.Unmarshal(m, b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) +} +func (m *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(m, src) +} +func (m *Empty) XXX_Size() int { + return xxx_messageInfo_Empty.Size(m) +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") +} + +func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) } + +var fileDescriptor_900544acb223d5b8 = []byte{ + // 148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, + 0x90, 0xbc, 0x53, 0x19, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36, + 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0x47, 0x58, 0x53, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x0c, + 0xb1, 0xed, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, + 0x13, 0x03, 0xa0, 0xea, 0xf4, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, + 0xea, 0x93, 0xd8, 0xc0, 0x06, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd4, 0xb3, 0xa6, + 0xb7, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto new file mode 100644 index 0000000000..03cacd2330 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto @@ -0,0 +1,52 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "github.com/golang/protobuf/ptypes/empty"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "EmptyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +message Empty {} diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go new file mode 100644 index 0000000000..33daa73dd2 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go @@ -0,0 +1,336 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/struct.proto + +package structpb + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +type NullValue int32 + +const ( + // Null value. + NullValue_NULL_VALUE NullValue = 0 +) + +var NullValue_name = map[int32]string{ + 0: "NULL_VALUE", +} + +var NullValue_value = map[string]int32{ + "NULL_VALUE": 0, +} + +func (x NullValue) String() string { + return proto.EnumName(NullValue_name, int32(x)) +} + +func (NullValue) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{0} +} + +func (NullValue) XXX_WellKnownType() string { return "NullValue" } + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +type Struct struct { + // Unordered map of dynamically typed values. + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Struct) Reset() { *m = Struct{} } +func (m *Struct) String() string { return proto.CompactTextString(m) } +func (*Struct) ProtoMessage() {} +func (*Struct) Descriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{0} +} + +func (*Struct) XXX_WellKnownType() string { return "Struct" } + +func (m *Struct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Struct.Unmarshal(m, b) +} +func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Struct.Marshal(b, m, deterministic) +} +func (m *Struct) XXX_Merge(src proto.Message) { + xxx_messageInfo_Struct.Merge(m, src) +} +func (m *Struct) XXX_Size() int { + return xxx_messageInfo_Struct.Size(m) +} +func (m *Struct) XXX_DiscardUnknown() { + xxx_messageInfo_Struct.DiscardUnknown(m) +} + +var xxx_messageInfo_Struct proto.InternalMessageInfo + +func (m *Struct) GetFields() map[string]*Value { + if m != nil { + return m.Fields + } + return nil +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +type Value struct { + // The kind of value. + // + // Types that are valid to be assigned to Kind: + // *Value_NullValue + // *Value_NumberValue + // *Value_StringValue + // *Value_BoolValue + // *Value_StructValue + // *Value_ListValue + Kind isValue_Kind `protobuf_oneof:"kind"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Value) Reset() { *m = Value{} } +func (m *Value) String() string { return proto.CompactTextString(m) } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{1} +} + +func (*Value) XXX_WellKnownType() string { return "Value" } + +func (m *Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Value.Unmarshal(m, b) +} +func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Value.Marshal(b, m, deterministic) +} +func (m *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(m, src) +} +func (m *Value) XXX_Size() int { + return xxx_messageInfo_Value.Size(m) +} +func (m *Value) XXX_DiscardUnknown() { + xxx_messageInfo_Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Value proto.InternalMessageInfo + +type isValue_Kind interface { + isValue_Kind() +} + +type Value_NullValue struct { + NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` +} + +type Value_NumberValue struct { + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"` +} + +type Value_StringValue struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type Value_BoolValue struct { + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type Value_StructValue struct { + StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"` +} + +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"` +} + +func (*Value_NullValue) isValue_Kind() {} + +func (*Value_NumberValue) isValue_Kind() {} + +func (*Value_StringValue) isValue_Kind() {} + +func (*Value_BoolValue) isValue_Kind() {} + +func (*Value_StructValue) isValue_Kind() {} + +func (*Value_ListValue) isValue_Kind() {} + +func (m *Value) GetKind() isValue_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *Value) GetNullValue() NullValue { + if x, ok := m.GetKind().(*Value_NullValue); ok { + return x.NullValue + } + return NullValue_NULL_VALUE +} + +func (m *Value) GetNumberValue() float64 { + if x, ok := m.GetKind().(*Value_NumberValue); ok { + return x.NumberValue + } + return 0 +} + +func (m *Value) GetStringValue() string { + if x, ok := m.GetKind().(*Value_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *Value) GetBoolValue() bool { + if x, ok := m.GetKind().(*Value_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *Value) GetStructValue() *Struct { + if x, ok := m.GetKind().(*Value_StructValue); ok { + return x.StructValue + } + return nil +} + +func (m *Value) GetListValue() *ListValue { + if x, ok := m.GetKind().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Value) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), + (*Value_BoolValue)(nil), + (*Value_StructValue)(nil), + (*Value_ListValue)(nil), + } +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +type ListValue struct { + // Repeated field of dynamically typed values. + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListValue) Reset() { *m = ListValue{} } +func (m *ListValue) String() string { return proto.CompactTextString(m) } +func (*ListValue) ProtoMessage() {} +func (*ListValue) Descriptor() ([]byte, []int) { + return fileDescriptor_df322afd6c9fb402, []int{2} +} + +func (*ListValue) XXX_WellKnownType() string { return "ListValue" } + +func (m *ListValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListValue.Unmarshal(m, b) +} +func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) +} +func (m *ListValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListValue.Merge(m, src) +} +func (m *ListValue) XXX_Size() int { + return xxx_messageInfo_ListValue.Size(m) +} +func (m *ListValue) XXX_DiscardUnknown() { + xxx_messageInfo_ListValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ListValue proto.InternalMessageInfo + +func (m *ListValue) GetValues() []*Value { + if m != nil { + return m.Values + } + return nil +} + +func init() { + proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) + proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") + proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry") + proto.RegisterType((*Value)(nil), "google.protobuf.Value") + proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") +} + +func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) } + +var fileDescriptor_df322afd6c9fb402 = []byte{ + // 417 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09, + 0x22, 0x29, 0xd6, 0x8b, 0x18, 0x2f, 0x06, 0xd6, 0x5d, 0x30, 0x2c, 0x31, 0xba, 0x15, 0xbc, 0x94, + 0x26, 0x4d, 0x63, 0xe8, 0x74, 0x26, 0x24, 0x33, 0x4a, 0x8f, 0x7e, 0x0b, 0xcf, 0x1e, 0x3d, 0xfa, + 0xe9, 0x3c, 0xca, 0xcc, 0x24, 0xa9, 0xb4, 0xf4, 0x94, 0xbc, 0xf7, 0x7e, 0xef, 0x3f, 0xef, 0xff, + 0x66, 0xe0, 0x71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x3c, 0xb2, 0xc7, 0x56, 0x5e, 0x64, + 0xbc, 0x77, 0x49, 0xca, 0xa6, 0xeb, 0xb5, 0x54, 0xef, 0xa1, 0xcb, 0xa8, 0x6c, 0x78, 0xef, 0x92, + 0x74, 0x41, 0x68, 0xc1, 0xc9, 0xba, 0xa4, 0xcb, 0x71, 0x00, 0x76, 0x4f, 0x60, 0x1f, 0x2c, 0x25, + 0xd6, 0xdd, 0xe8, 0xb1, 0xa5, 0xb7, 0xd4, 0xb3, 0x47, 0x60, 0xf7, 0x4b, 0xc4, 0xa7, 0x00, 0x37, + 0xb7, 0x51, 0x34, 0x9f, 0xbd, 0x8d, 0x6e, 0x2f, 0xcf, 0x06, 0xe1, 0x0f, 0x04, 0xf7, 0x33, 0xb6, + 0xd9, 0x97, 0x08, 0x1d, 0xed, 0x26, 0x96, 0x71, 0x8c, 0xbe, 0xbc, 0x28, 0x4a, 0xfe, 0x55, 0xa4, + 0x7e, 0xc6, 0x36, 0x93, 0x82, 0x91, 0x05, 0x2d, 0x76, 0x4f, 0xb1, 0xe2, 0xdb, 0x2a, 0x6f, 0xda, + 0x17, 0x19, 0xe8, 0x4f, 0x95, 0xfe, 0x45, 0xe8, 0x97, 0x61, 0x5e, 0xc5, 0xe1, 0x6f, 0xe3, 0xc9, + 0x95, 0x16, 0x8f, 0xbb, 0xf9, 0x3e, 0xe7, 0x84, 0xbc, 0xa7, 0xec, 0x3b, 0xfd, 0x24, 0x3b, 0x53, + 0x4b, 0x49, 0xbd, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x1b, 0x59, 0xf8, 0xe5, 0x02, 0x00, + 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto new file mode 100644 index 0000000000..7d7808e7fb --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto @@ -0,0 +1,96 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go new file mode 100644 index 0000000000..add19a1adb --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go @@ -0,0 +1,461 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/wrappers.proto + +package wrappers + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + 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.ProtoPackageIsVersion3 // please upgrade the proto package + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +type DoubleValue struct { + // The double value. + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleValue) Reset() { *m = DoubleValue{} } +func (m *DoubleValue) String() string { return proto.CompactTextString(m) } +func (*DoubleValue) ProtoMessage() {} +func (*DoubleValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{0} +} + +func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } + +func (m *DoubleValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DoubleValue.Unmarshal(m, b) +} +func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic) +} +func (m *DoubleValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleValue.Merge(m, src) +} +func (m *DoubleValue) XXX_Size() int { + return xxx_messageInfo_DoubleValue.Size(m) +} +func (m *DoubleValue) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleValue.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleValue proto.InternalMessageInfo + +func (m *DoubleValue) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +type FloatValue struct { + // The float value. + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatValue) Reset() { *m = FloatValue{} } +func (m *FloatValue) String() string { return proto.CompactTextString(m) } +func (*FloatValue) ProtoMessage() {} +func (*FloatValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{1} +} + +func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } + +func (m *FloatValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatValue.Unmarshal(m, b) +} +func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic) +} +func (m *FloatValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatValue.Merge(m, src) +} +func (m *FloatValue) XXX_Size() int { + return xxx_messageInfo_FloatValue.Size(m) +} +func (m *FloatValue) XXX_DiscardUnknown() { + xxx_messageInfo_FloatValue.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatValue proto.InternalMessageInfo + +func (m *FloatValue) GetValue() float32 { + if m != nil { + return m.Value + } + return 0 +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +type Int64Value struct { + // The int64 value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (m *Int64Value) String() string { return proto.CompactTextString(m) } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{2} +} + +func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } + +func (m *Int64Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Int64Value.Unmarshal(m, b) +} +func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic) +} +func (m *Int64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64Value.Merge(m, src) +} +func (m *Int64Value) XXX_Size() int { + return xxx_messageInfo_Int64Value.Size(m) +} +func (m *Int64Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int64Value proto.InternalMessageInfo + +func (m *Int64Value) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +type UInt64Value struct { + // The uint64 value. + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt64Value) Reset() { *m = UInt64Value{} } +func (m *UInt64Value) String() string { return proto.CompactTextString(m) } +func (*UInt64Value) ProtoMessage() {} +func (*UInt64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{3} +} + +func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } + +func (m *UInt64Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UInt64Value.Unmarshal(m, b) +} +func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic) +} +func (m *UInt64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt64Value.Merge(m, src) +} +func (m *UInt64Value) XXX_Size() int { + return xxx_messageInfo_UInt64Value.Size(m) +} +func (m *UInt64Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt64Value proto.InternalMessageInfo + +func (m *UInt64Value) GetValue() uint64 { + if m != nil { + return m.Value + } + return 0 +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +type Int32Value struct { + // The int32 value. + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int32Value) Reset() { *m = Int32Value{} } +func (m *Int32Value) String() string { return proto.CompactTextString(m) } +func (*Int32Value) ProtoMessage() {} +func (*Int32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{4} +} + +func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } + +func (m *Int32Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Int32Value.Unmarshal(m, b) +} +func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic) +} +func (m *Int32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int32Value.Merge(m, src) +} +func (m *Int32Value) XXX_Size() int { + return xxx_messageInfo_Int32Value.Size(m) +} +func (m *Int32Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int32Value proto.InternalMessageInfo + +func (m *Int32Value) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +type UInt32Value struct { + // The uint32 value. + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt32Value) Reset() { *m = UInt32Value{} } +func (m *UInt32Value) String() string { return proto.CompactTextString(m) } +func (*UInt32Value) ProtoMessage() {} +func (*UInt32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{5} +} + +func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } + +func (m *UInt32Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UInt32Value.Unmarshal(m, b) +} +func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic) +} +func (m *UInt32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt32Value.Merge(m, src) +} +func (m *UInt32Value) XXX_Size() int { + return xxx_messageInfo_UInt32Value.Size(m) +} +func (m *UInt32Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt32Value proto.InternalMessageInfo + +func (m *UInt32Value) GetValue() uint32 { + if m != nil { + return m.Value + } + return 0 +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +type BoolValue struct { + // The bool value. + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoolValue) Reset() { *m = BoolValue{} } +func (m *BoolValue) String() string { return proto.CompactTextString(m) } +func (*BoolValue) ProtoMessage() {} +func (*BoolValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{6} +} + +func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } + +func (m *BoolValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoolValue.Unmarshal(m, b) +} +func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic) +} +func (m *BoolValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolValue.Merge(m, src) +} +func (m *BoolValue) XXX_Size() int { + return xxx_messageInfo_BoolValue.Size(m) +} +func (m *BoolValue) XXX_DiscardUnknown() { + xxx_messageInfo_BoolValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolValue proto.InternalMessageInfo + +func (m *BoolValue) GetValue() bool { + if m != nil { + return m.Value + } + return false +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +type StringValue struct { + // The string value. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringValue) Reset() { *m = StringValue{} } +func (m *StringValue) String() string { return proto.CompactTextString(m) } +func (*StringValue) ProtoMessage() {} +func (*StringValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{7} +} + +func (*StringValue) XXX_WellKnownType() string { return "StringValue" } + +func (m *StringValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StringValue.Unmarshal(m, b) +} +func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) +} +func (m *StringValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringValue.Merge(m, src) +} +func (m *StringValue) XXX_Size() int { + return xxx_messageInfo_StringValue.Size(m) +} +func (m *StringValue) XXX_DiscardUnknown() { + xxx_messageInfo_StringValue.DiscardUnknown(m) +} + +var xxx_messageInfo_StringValue proto.InternalMessageInfo + +func (m *StringValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +type BytesValue struct { + // The bytes value. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BytesValue) Reset() { *m = BytesValue{} } +func (m *BytesValue) String() string { return proto.CompactTextString(m) } +func (*BytesValue) ProtoMessage() {} +func (*BytesValue) Descriptor() ([]byte, []int) { + return fileDescriptor_5377b62bda767935, []int{8} +} + +func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } + +func (m *BytesValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BytesValue.Unmarshal(m, b) +} +func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic) +} +func (m *BytesValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesValue.Merge(m, src) +} +func (m *BytesValue) XXX_Size() int { + return xxx_messageInfo_BytesValue.Size(m) +} +func (m *BytesValue) XXX_DiscardUnknown() { + xxx_messageInfo_BytesValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BytesValue proto.InternalMessageInfo + +func (m *BytesValue) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue") + proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue") + proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value") + proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value") + proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value") + proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value") + proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue") + proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue") + proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") +} + +func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) } + +var fileDescriptor_5377b62bda767935 = []byte{ + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c, + 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca, + 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5, + 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13, + 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8, + 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca, + 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a, + 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x0d, + 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x5a, 0xe8, 0x3a, 0xf1, 0x86, 0x43, 0x83, 0x3f, 0x00, 0x24, + 0x12, 0xc0, 0x18, 0xa5, 0x95, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, + 0x9e, 0x9f, 0x93, 0x98, 0x97, 0x8e, 0x88, 0xaa, 0x82, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x78, 0x8c, + 0xfd, 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e, + 0x00, 0x54, 0xa9, 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b, + 0x12, 0x1b, 0xd8, 0x0c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0x6c, 0xb9, 0xb8, 0xfe, + 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto new file mode 100644 index 0000000000..01947639ac --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto @@ -0,0 +1,118 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "github.com/golang/protobuf/ptypes/wrappers"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "WrappersProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +message DoubleValue { + // The double value. + double value = 1; +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +message FloatValue { + // The float value. + float value = 1; +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +message Int64Value { + // The int64 value. + int64 value = 1; +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +message UInt64Value { + // The uint64 value. + uint64 value = 1; +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +message Int32Value { + // The int32 value. + int32 value = 1; +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +message UInt32Value { + // The uint32 value. + uint32 value = 1; +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +message BoolValue { + // The bool value. + bool value = 1; +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +message StringValue { + // The string value. + string value = 1; +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +message BytesValue { + // The bytes value. + bytes value = 1; +} diff --git a/vendor/github.com/gogo/googleapis/google/api/annotations.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go similarity index 57% rename from vendor/github.com/gogo/googleapis/google/api/annotations.pb.go rename to vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go index b2c49a92f0..bf2f703fff 100644 --- a/vendor/github.com/gogo/googleapis/google/api/annotations.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go @@ -1,12 +1,15 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/api/annotations.proto -package api +package annotations -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import ( + fmt "fmt" + math "math" + + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -17,7 +20,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package var E_Http = &proto.ExtensionDesc{ ExtendedType: (*descriptor.MethodOptions)(nil), @@ -32,12 +35,10 @@ func init() { proto.RegisterExtension(E_Http) } -func init() { - proto.RegisterFile("google/api/annotations.proto", fileDescriptor_annotations_0def7614f850d31e) -} +func init() { proto.RegisterFile("google/api/annotations.proto", fileDescriptor_c591c5aa9fb79aab) } -var fileDescriptor_annotations_0def7614f850d31e = []byte{ - // 230 bytes of a gzipped FileDescriptorProto +var fileDescriptor_c591c5aa9fb79aab = []byte{ + // 208 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0xc8, 0xea, 0x25, 0x16, 0x64, @@ -46,11 +47,9 @@ var fileDescriptor_annotations_0def7614f850d31e = []byte{ 0x56, 0xde, 0x5c, 0x2c, 0x20, 0xf5, 0x42, 0x72, 0x7a, 0x50, 0xd3, 0x60, 0x4a, 0xf5, 0x7c, 0x53, 0x4b, 0x32, 0xf2, 0x53, 0xfc, 0x0b, 0xc0, 0x56, 0x4a, 0x6c, 0x38, 0xb5, 0x47, 0x49, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x61, 0xad, 0x9e, 0x47, 0x49, 0x49, 0x41, 0x50, 0x69, 0x4e, 0x6a, - 0x10, 0xd8, 0x10, 0xa7, 0x84, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, - 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, - 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x31, 0x7c, - 0x00, 0x89, 0x3d, 0x96, 0x63, 0xe4, 0xe2, 0x4b, 0xce, 0xcf, 0x45, 0x32, 0xd0, 0x49, 0xc0, 0x11, - 0xe1, 0xcd, 0x00, 0x90, 0x4b, 0x02, 0x18, 0xa3, 0x98, 0x13, 0x0b, 0x32, 0x17, 0x31, 0xb1, 0xb8, - 0x3b, 0x06, 0x78, 0x26, 0xb1, 0x81, 0x9d, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x92, 0x1b, - 0xe6, 0x45, 0x1a, 0x01, 0x00, 0x00, + 0x10, 0xd8, 0x10, 0xa7, 0x3c, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x24, 0x05, 0x4e, 0x02, 0x8e, 0x08, + 0x67, 0x07, 0x80, 0x4c, 0x0e, 0x60, 0x8c, 0x72, 0x84, 0xca, 0xa7, 0xe7, 0xe7, 0x24, 0xe6, 0xa5, + 0xeb, 0xe5, 0x17, 0xa5, 0xeb, 0xa7, 0xa7, 0xe6, 0x81, 0xed, 0xd5, 0x87, 0x48, 0x25, 0x16, 0x64, + 0x16, 0xa3, 0x7b, 0xda, 0x1a, 0x89, 0xbd, 0x88, 0x89, 0xc5, 0xdd, 0x31, 0xc0, 0x33, 0x89, 0x0d, + 0xac, 0xc9, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x29, 0x19, 0x62, 0x28, 0x01, 0x00, 0x00, } 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 new file mode 100644 index 0000000000..867fc0c3fa --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/api/client.proto + +package annotations + +import ( + fmt "fmt" + math "math" + + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" +) + +// 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 + +var E_MethodSignature = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MethodOptions)(nil), + ExtensionType: ([]string)(nil), + Field: 1051, + Name: "google.api.method_signature", + Tag: "bytes,1051,rep,name=method_signature", + Filename: "google/api/client.proto", +} + +var E_DefaultHost = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 1049, + Name: "google.api.default_host", + Tag: "bytes,1049,opt,name=default_host", + Filename: "google/api/client.proto", +} + +var E_OauthScopes = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 1050, + Name: "google.api.oauth_scopes", + Tag: "bytes,1050,opt,name=oauth_scopes", + Filename: "google/api/client.proto", +} + +func init() { + proto.RegisterExtension(E_MethodSignature) + proto.RegisterExtension(E_DefaultHost) + proto.RegisterExtension(E_OauthScopes) +} + +func init() { proto.RegisterFile("google/api/client.proto", fileDescriptor_78f2c6f7c3a942c1) } + +var fileDescriptor_78f2c6f7c3a942c1 = []byte{ + // 262 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x3f, 0x4f, 0xc3, 0x30, + 0x10, 0xc5, 0x55, 0x40, 0xa8, 0x75, 0x11, 0xa0, 0x2c, 0x20, 0x06, 0xc8, 0xd8, 0xc9, 0x1e, 0xd8, + 0xca, 0xd4, 0x76, 0xe0, 0x8f, 0x84, 0x88, 0x9a, 0x8d, 0x25, 0x72, 0x9d, 0xab, 0x63, 0x29, 0xf5, + 0x59, 0xf6, 0x85, 0xef, 0x02, 0x6c, 0x7c, 0x52, 0x54, 0xc7, 0x11, 0x48, 0x0c, 0x6c, 0x27, 0xbd, + 0xf7, 0xfb, 0x9d, 0xf4, 0xd8, 0x85, 0x46, 0xd4, 0x2d, 0x08, 0xe9, 0x8c, 0x50, 0xad, 0x01, 0x4b, + 0xdc, 0x79, 0x24, 0xcc, 0x58, 0x1f, 0x70, 0xe9, 0xcc, 0x55, 0x9e, 0x4a, 0x31, 0xd9, 0x74, 0x5b, + 0x51, 0x43, 0x50, 0xde, 0x38, 0x42, 0xdf, 0xb7, 0xe7, 0x4f, 0xec, 0x7c, 0x07, 0xd4, 0x60, 0x5d, + 0x05, 0xa3, 0xad, 0xa4, 0xce, 0x43, 0x76, 0xcd, 0x93, 0x62, 0xc0, 0xf8, 0x73, 0xac, 0xbc, 0x38, + 0x32, 0x68, 0xc3, 0xe5, 0xe7, 0x38, 0x3f, 0x9c, 0x4d, 0xd6, 0x67, 0x3d, 0x58, 0x0e, 0xdc, 0x7c, + 0xc5, 0x4e, 0x6a, 0xd8, 0xca, 0xae, 0xa5, 0xaa, 0xc1, 0x40, 0xd9, 0xcd, 0x1f, 0x4f, 0x09, 0xfe, + 0xcd, 0x28, 0x18, 0x44, 0xef, 0xe3, 0x7c, 0x34, 0x9b, 0xac, 0xa7, 0x89, 0x7a, 0xc0, 0x40, 0x7b, + 0x09, 0xca, 0x8e, 0x9a, 0x2a, 0x28, 0x74, 0x10, 0xfe, 0x97, 0x7c, 0x24, 0x49, 0xa4, 0xca, 0x08, + 0x2d, 0x0d, 0x3b, 0x55, 0xb8, 0xe3, 0x3f, 0x4b, 0x2c, 0xa7, 0xab, 0xb8, 0x51, 0xb1, 0x97, 0x14, + 0xa3, 0xd7, 0x45, 0x8a, 0x34, 0xb6, 0xd2, 0x6a, 0x8e, 0x5e, 0x0b, 0x0d, 0x36, 0xbe, 0x10, 0x7d, + 0x24, 0x9d, 0x09, 0x71, 0x5c, 0x69, 0x2d, 0x92, 0x8c, 0xbf, 0xee, 0x7e, 0xdd, 0x5f, 0x07, 0x47, + 0xf7, 0x8b, 0xe2, 0x71, 0x73, 0x1c, 0xa1, 0xdb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0xc2, + 0xcf, 0x71, 0x90, 0x01, 0x00, 0x00, +} 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 new file mode 100644 index 0000000000..31f87dd00d --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go @@ -0,0 +1,122 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/api/field_behavior.proto + +package annotations + +import ( + fmt "fmt" + math "math" + + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" +) + +// 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 + +// 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 +) + +var FieldBehavior_name = map[int32]string{ + 0: "FIELD_BEHAVIOR_UNSPECIFIED", + 1: "OPTIONAL", + 2: "REQUIRED", + 3: "OUTPUT_ONLY", + 4: "INPUT_ONLY", + 5: "IMMUTABLE", +} + +var FieldBehavior_value = map[string]int32{ + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, +} + +func (x FieldBehavior) String() string { + return proto.EnumName(FieldBehavior_name, int32(x)) +} + +func (FieldBehavior) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4648f18fd5079967, []int{0} +} + +var E_FieldBehavior = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.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", +} + +func init() { + proto.RegisterEnum("google.api.FieldBehavior", FieldBehavior_name, FieldBehavior_value) + proto.RegisterExtension(E_FieldBehavior) +} + +func init() { proto.RegisterFile("google/api/field_behavior.proto", fileDescriptor_4648f18fd5079967) } + +var fileDescriptor_4648f18fd5079967 = []byte{ + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x4f, 0x4f, 0xb3, 0x30, + 0x1c, 0xc7, 0x9f, 0xfd, 0x79, 0xcc, 0xac, 0x0e, 0x49, 0x4f, 0xba, 0x44, 0xdd, 0xd1, 0x78, 0x28, + 0x89, 0xde, 0xf4, 0x04, 0xae, 0xd3, 0x26, 0x8c, 0x56, 0x04, 0x13, 0xbd, 0x60, 0xb7, 0xb1, 0xda, + 0x64, 0xd2, 0x06, 0xd0, 0x8b, 0x6f, 0xc5, 0x93, 0xaf, 0xd4, 0xd0, 0x31, 0x85, 0x5b, 0xbf, 0xf9, + 0x7d, 0xfa, 0xeb, 0xe7, 0x5b, 0x70, 0x2a, 0x94, 0x12, 0xeb, 0xd4, 0xe1, 0x5a, 0x3a, 0x2b, 0x99, + 0xae, 0x97, 0xc9, 0x3c, 0x7d, 0xe5, 0x1f, 0x52, 0xe5, 0x48, 0xe7, 0xaa, 0x54, 0x10, 0x6c, 0x00, + 0xc4, 0xb5, 0x1c, 0x8d, 0x6b, 0xd8, 0x4c, 0xe6, 0xef, 0x2b, 0x67, 0x99, 0x16, 0x8b, 0x5c, 0xea, + 0x72, 0x4b, 0x9f, 0x7f, 0x82, 0xe1, 0xb4, 0xda, 0xe2, 0xd5, 0x4b, 0xe0, 0x09, 0x18, 0x4d, 0x09, + 0xf6, 0x27, 0x89, 0x87, 0xef, 0xdc, 0x47, 0x42, 0xc3, 0x24, 0x0e, 0x1e, 0x18, 0xbe, 0x21, 0x53, + 0x82, 0x27, 0xf6, 0x3f, 0xb8, 0x0f, 0x06, 0x94, 0x45, 0x84, 0x06, 0xae, 0x6f, 0x77, 0xaa, 0x14, + 0xe2, 0xfb, 0x98, 0x84, 0x78, 0x62, 0x77, 0xe1, 0x01, 0xd8, 0xa3, 0x71, 0xc4, 0xe2, 0x28, 0xa1, + 0x81, 0xff, 0x64, 0xf7, 0xa0, 0x05, 0x00, 0x09, 0x7e, 0x73, 0x1f, 0x0e, 0xc1, 0x2e, 0x99, 0xcd, + 0xe2, 0xc8, 0xf5, 0x7c, 0x6c, 0xff, 0xbf, 0x7a, 0x01, 0x56, 0xbb, 0x02, 0x3c, 0x46, 0xb5, 0xfd, + 0xd6, 0x18, 0x19, 0x3b, 0xaa, 0x4b, 0xa9, 0xb2, 0xe2, 0xf0, 0x6b, 0x30, 0xee, 0x9d, 0x59, 0x17, + 0x47, 0xe8, 0xaf, 0x23, 0x6a, 0xe9, 0x87, 0xc3, 0x55, 0x33, 0x7a, 0x1a, 0x58, 0x0b, 0xf5, 0xd6, + 0xc0, 0x3d, 0xd8, 0xe2, 0x59, 0xf5, 0x0c, 0xeb, 0x3c, 0xbb, 0x35, 0x21, 0xd4, 0x9a, 0x67, 0x02, + 0xa9, 0x5c, 0x38, 0x22, 0xcd, 0x8c, 0x84, 0xb3, 0x19, 0x71, 0x2d, 0x0b, 0xf3, 0xe9, 0x3c, 0xcb, + 0x54, 0xc9, 0x8d, 0xcf, 0x75, 0xe3, 0xfc, 0xdd, 0xed, 0xdf, 0xba, 0x8c, 0xcc, 0x77, 0xcc, 0xa5, + 0xcb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x94, 0x57, 0x94, 0xa8, 0x01, 0x00, 0x00, +} 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 new file mode 100644 index 0000000000..a63870374d --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go @@ -0,0 +1,633 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/api/http.proto + +package annotations + +import ( + fmt "fmt" + math "math" + + 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 + +// 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 { + // 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Http) Reset() { *m = Http{} } +func (m *Http) String() string { return proto.CompactTextString(m) } +func (*Http) ProtoMessage() {} +func (*Http) Descriptor() ([]byte, []int) { + return fileDescriptor_ff9994be407cdcc9, []int{0} +} + +func (m *Http) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Http.Unmarshal(m, b) +} +func (m *Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Http.Marshal(b, m, deterministic) +} +func (m *Http) XXX_Merge(src proto.Message) { + xxx_messageInfo_Http.Merge(m, src) +} +func (m *Http) XXX_Size() int { + return xxx_messageInfo_Http.Size(m) +} +func (m *Http) XXX_DiscardUnknown() { + xxx_messageInfo_Http.DiscardUnknown(m) +} + +var xxx_messageInfo_Http proto.InternalMessageInfo + +func (m *Http) GetRules() []*HttpRule { + if m != nil { + return m.Rules + } + return nil +} + +func (m *Http) GetFullyDecodeReservedExpansion() bool { + if m != nil { + return m.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 { + // 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 valid to be assigned 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HttpRule) Reset() { *m = HttpRule{} } +func (m *HttpRule) String() string { return proto.CompactTextString(m) } +func (*HttpRule) ProtoMessage() {} +func (*HttpRule) Descriptor() ([]byte, []int) { + return fileDescriptor_ff9994be407cdcc9, []int{1} +} + +func (m *HttpRule) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HttpRule.Unmarshal(m, b) +} +func (m *HttpRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HttpRule.Marshal(b, m, deterministic) +} +func (m *HttpRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_HttpRule.Merge(m, src) +} +func (m *HttpRule) XXX_Size() int { + return xxx_messageInfo_HttpRule.Size(m) +} +func (m *HttpRule) XXX_DiscardUnknown() { + xxx_messageInfo_HttpRule.DiscardUnknown(m) +} + +var xxx_messageInfo_HttpRule proto.InternalMessageInfo + +func (m *HttpRule) GetSelector() string { + if m != nil { + return m.Selector + } + return "" +} + +type isHttpRule_Pattern interface { + isHttpRule_Pattern() +} + +type HttpRule_Get struct { + Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` +} + +type HttpRule_Put struct { + Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` +} + +type HttpRule_Post struct { + Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` +} + +type HttpRule_Delete struct { + Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` +} + +type HttpRule_Patch struct { + Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` +} + +type HttpRule_Custom struct { + 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() {} + +func (m *HttpRule) GetPattern() isHttpRule_Pattern { + if m != nil { + return m.Pattern + } + return nil +} + +func (m *HttpRule) GetGet() string { + if x, ok := m.GetPattern().(*HttpRule_Get); ok { + return x.Get + } + return "" +} + +func (m *HttpRule) GetPut() string { + if x, ok := m.GetPattern().(*HttpRule_Put); ok { + return x.Put + } + return "" +} + +func (m *HttpRule) GetPost() string { + if x, ok := m.GetPattern().(*HttpRule_Post); ok { + return x.Post + } + return "" +} + +func (m *HttpRule) GetDelete() string { + if x, ok := m.GetPattern().(*HttpRule_Delete); ok { + return x.Delete + } + return "" +} + +func (m *HttpRule) GetPatch() string { + if x, ok := m.GetPattern().(*HttpRule_Patch); ok { + return x.Patch + } + return "" +} + +func (m *HttpRule) GetCustom() *CustomHttpPattern { + if x, ok := m.GetPattern().(*HttpRule_Custom); ok { + return x.Custom + } + return nil +} + +func (m *HttpRule) GetBody() string { + if m != nil { + return m.Body + } + return "" +} + +func (m *HttpRule) GetResponseBody() string { + if m != nil { + return m.ResponseBody + } + return "" +} + +func (m *HttpRule) GetAdditionalBindings() []*HttpRule { + if m != nil { + return m.AdditionalBindings + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HttpRule) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HttpRule_Get)(nil), + (*HttpRule_Put)(nil), + (*HttpRule_Post)(nil), + (*HttpRule_Delete)(nil), + (*HttpRule_Patch)(nil), + (*HttpRule_Custom)(nil), + } +} + +// A custom pattern is used for defining custom HTTP verb. +type CustomHttpPattern struct { + // 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomHttpPattern) Reset() { *m = CustomHttpPattern{} } +func (m *CustomHttpPattern) String() string { return proto.CompactTextString(m) } +func (*CustomHttpPattern) ProtoMessage() {} +func (*CustomHttpPattern) Descriptor() ([]byte, []int) { + return fileDescriptor_ff9994be407cdcc9, []int{2} +} + +func (m *CustomHttpPattern) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomHttpPattern.Unmarshal(m, b) +} +func (m *CustomHttpPattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomHttpPattern.Marshal(b, m, deterministic) +} +func (m *CustomHttpPattern) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomHttpPattern.Merge(m, src) +} +func (m *CustomHttpPattern) XXX_Size() int { + return xxx_messageInfo_CustomHttpPattern.Size(m) +} +func (m *CustomHttpPattern) XXX_DiscardUnknown() { + xxx_messageInfo_CustomHttpPattern.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomHttpPattern proto.InternalMessageInfo + +func (m *CustomHttpPattern) GetKind() string { + if m != nil { + return m.Kind + } + return "" +} + +func (m *CustomHttpPattern) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func init() { + proto.RegisterType((*Http)(nil), "google.api.Http") + proto.RegisterType((*HttpRule)(nil), "google.api.HttpRule") + proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern") +} + +func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_ff9994be407cdcc9) } + +var fileDescriptor_ff9994be407cdcc9 = []byte{ + // 419 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x8e, 0xd3, 0x30, + 0x10, 0x86, 0x49, 0x9b, 0x76, 0xdb, 0xe9, 0x82, 0x84, 0x59, 0x90, 0x85, 0x40, 0x54, 0xe5, 0x52, + 0x71, 0x48, 0xa5, 0xe5, 0xc0, 0x61, 0x4f, 0x1b, 0xa8, 0x58, 0x6e, 0x55, 0x8e, 0x5c, 0x22, 0x37, + 0x1e, 0x52, 0x83, 0xd7, 0xb6, 0xe2, 0x09, 0xa2, 0xaf, 0xc3, 0x63, 0xf1, 0x24, 0x1c, 0x91, 0x9d, + 0x84, 0x56, 0x42, 0xe2, 0x36, 0xf3, 0xff, 0x9f, 0xa7, 0x7f, 0x27, 0x03, 0x4f, 0x6b, 0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, 0x84, 0x81, 0x1d, 0xce, 0x18, 0xa4, 0x7b, 0x2b, 0x8f, 0xfc, 0x22, + 0xfe, 0x81, 0x58, 0xb3, 0xd7, 0xf0, 0xb0, 0x41, 0xef, 0xac, 0xf1, 0x58, 0x46, 0xf3, 0x32, 0x9a, + 0x97, 0x83, 0x98, 0x07, 0x68, 0x0b, 0x4f, 0x84, 0x94, 0x8a, 0x94, 0x35, 0x42, 0x97, 0x7b, 0x65, + 0xa4, 0x32, 0xb5, 0xe7, 0x8b, 0xff, 0x7c, 0x0b, 0x76, 0x7a, 0x90, 0xf7, 0x7c, 0x3e, 0x87, 0x0b, + 0xd7, 0x85, 0x5a, 0xdd, 0xc0, 0xe3, 0x7f, 0x92, 0x86, 0x7c, 0xdf, 0x94, 0x91, 0xfd, 0x82, 0x63, + 0x1d, 0x34, 0x27, 0xe8, 0xd0, 0x6d, 0xb7, 0x88, 0x75, 0xfe, 0x15, 0x1e, 0x55, 0xf6, 0xfe, 0xec, + 0x67, 0xf3, 0x79, 0x1c, 0x13, 0xae, 0x67, 0x97, 0x7c, 0xbe, 0xed, 0x8d, 0xda, 0x6a, 0x61, 0xea, + 0xcc, 0x36, 0xf5, 0xa6, 0x46, 0x13, 0x6f, 0x6b, 0xd3, 0x59, 0xc2, 0x29, 0x1f, 0xaf, 0x4e, 0x18, + 0x63, 0x49, 0x84, 0x98, 0xfe, 0xe6, 0xac, 0xfe, 0x9d, 0x24, 0x3f, 0x47, 0xe9, 0xc7, 0xdb, 0xdd, + 0xa7, 0xfd, 0x34, 0xbe, 0x7b, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0xae, 0xde, 0xa1, 0xd0, 0xac, + 0x02, 0x00, 0x00, +} 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 new file mode 100644 index 0000000000..af057b90be --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/api/resource.proto + +package annotations + +import ( + fmt "fmt" + math "math" + + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" +) + +// 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 + +// 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 +) + +var ResourceDescriptor_History_name = map[int32]string{ + 0: "HISTORY_UNSPECIFIED", + 1: "ORIGINALLY_SINGLE_PATTERN", + 2: "FUTURE_MULTI_PATTERN", +} + +var ResourceDescriptor_History_value = map[string]int32{ + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2, +} + +func (x ResourceDescriptor_History) String() string { + return proto.EnumName(ResourceDescriptor_History_name, int32(x)) +} + +func (ResourceDescriptor_History) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_465e9122405d1bb5, []int{0, 0} +} + +// 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}" +// }; +// } +// +// 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: "organizations/{organization}/logs/{log}" +// pattern: "folders/{folder}/logs/{log}" +// pattern: "billingAccounts/{billing_account}/logs/{log}" +// }; +// } +type ResourceDescriptor struct { + // 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 valid resource name pattern(s) for this resource type. + // + // 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResourceDescriptor) Reset() { *m = ResourceDescriptor{} } +func (m *ResourceDescriptor) String() string { return proto.CompactTextString(m) } +func (*ResourceDescriptor) ProtoMessage() {} +func (*ResourceDescriptor) Descriptor() ([]byte, []int) { + return fileDescriptor_465e9122405d1bb5, []int{0} +} + +func (m *ResourceDescriptor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResourceDescriptor.Unmarshal(m, b) +} +func (m *ResourceDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResourceDescriptor.Marshal(b, m, deterministic) +} +func (m *ResourceDescriptor) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceDescriptor.Merge(m, src) +} +func (m *ResourceDescriptor) XXX_Size() int { + return xxx_messageInfo_ResourceDescriptor.Size(m) +} +func (m *ResourceDescriptor) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceDescriptor.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceDescriptor proto.InternalMessageInfo + +func (m *ResourceDescriptor) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *ResourceDescriptor) GetPattern() []string { + if m != nil { + return m.Pattern + } + return nil +} + +func (m *ResourceDescriptor) GetNameField() string { + if m != nil { + return m.NameField + } + return "" +} + +func (m *ResourceDescriptor) GetHistory() ResourceDescriptor_History { + if m != nil { + return m.History + } + return ResourceDescriptor_HISTORY_UNSPECIFIED +} + +// Defines a proto annotation that describes a field that refers to a resource. +type ResourceReference struct { + // The resource type that the annotated field references. + // + // Example: + // + // message Subscription { + // string topic = 2 [(google.api.resource_reference) = { + // type = "pubsub.googleapis.com/Topic" + // }]; + // } + 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 `parent` fields where a resource has more + // than one possible type of parent. + // + // 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResourceReference) Reset() { *m = ResourceReference{} } +func (m *ResourceReference) String() string { return proto.CompactTextString(m) } +func (*ResourceReference) ProtoMessage() {} +func (*ResourceReference) Descriptor() ([]byte, []int) { + return fileDescriptor_465e9122405d1bb5, []int{1} +} + +func (m *ResourceReference) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResourceReference.Unmarshal(m, b) +} +func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic) +} +func (m *ResourceReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceReference.Merge(m, src) +} +func (m *ResourceReference) XXX_Size() int { + return xxx_messageInfo_ResourceReference.Size(m) +} +func (m *ResourceReference) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceReference proto.InternalMessageInfo + +func (m *ResourceReference) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *ResourceReference) GetChildType() string { + if m != nil { + return m.ChildType + } + return "" +} + +var E_ResourceReference = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*ResourceReference)(nil), + Field: 1055, + Name: "google.api.resource_reference", + Tag: "bytes,1055,opt,name=resource_reference", + Filename: "google/api/resource.proto", +} + +var E_Resource = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*ResourceDescriptor)(nil), + Field: 1053, + Name: "google.api.resource", + Tag: "bytes,1053,opt,name=resource", + Filename: "google/api/resource.proto", +} + +func init() { + proto.RegisterEnum("google.api.ResourceDescriptor_History", ResourceDescriptor_History_name, ResourceDescriptor_History_value) + proto.RegisterType((*ResourceDescriptor)(nil), "google.api.ResourceDescriptor") + proto.RegisterType((*ResourceReference)(nil), "google.api.ResourceReference") + proto.RegisterExtension(E_ResourceReference) + proto.RegisterExtension(E_Resource) +} + +func init() { proto.RegisterFile("google/api/resource.proto", fileDescriptor_465e9122405d1bb5) } + +var fileDescriptor_465e9122405d1bb5 = []byte{ + // 430 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x41, 0x6f, 0xd3, 0x30, + 0x18, 0x25, 0x59, 0x45, 0xd7, 0x0f, 0x31, 0x6d, 0x06, 0x89, 0x0c, 0x29, 0x10, 0xf5, 0x80, 0x7a, + 0x4a, 0xa4, 0x71, 0x1b, 0x17, 0x3a, 0x96, 0x76, 0x91, 0xba, 0x36, 0x72, 0xd3, 0xc3, 0x00, 0x29, + 0xf2, 0xd2, 0xaf, 0x59, 0xa4, 0xcc, 0xb6, 0x9c, 0xec, 0xd0, 0x1b, 0x7f, 0x04, 0x21, 0xf1, 0x2b, + 0x39, 0xa2, 0x3a, 0x71, 0x98, 0xd8, 0xb4, 0x9b, 0xf3, 0xde, 0xfb, 0xbe, 0xf7, 0xfc, 0x1c, 0x38, + 0xce, 0x85, 0xc8, 0x4b, 0x0c, 0x98, 0x2c, 0x02, 0x85, 0x95, 0xb8, 0x53, 0x19, 0xfa, 0x52, 0x89, + 0x5a, 0x10, 0x68, 0x28, 0x9f, 0xc9, 0xe2, 0xad, 0xd7, 0xca, 0x34, 0x73, 0x7d, 0xb7, 0x09, 0xd6, + 0x58, 0x65, 0xaa, 0x90, 0xb5, 0x50, 0x8d, 0x7a, 0xf8, 0xc3, 0x06, 0x42, 0xdb, 0x05, 0xe7, 0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b, 0x59, 0xc8, 0xba, 0x10, 0xbc, 0x72, 0x7e, 0xed, 0x7b, 0xd6, + 0xe8, 0xc5, 0x89, 0xfb, 0x58, 0x23, 0x5d, 0x1a, 0x7a, 0xa4, 0xfe, 0x87, 0x4e, 0xbf, 0xc3, 0xbe, + 0x01, 0xc9, 0xfb, 0x07, 0x1e, 0x97, 0x58, 0x55, 0x2c, 0x47, 0xe3, 0xf2, 0xb3, 0x71, 0x79, 0xf7, + 0x74, 0xef, 0xb4, 0xdb, 0x78, 0xc6, 0xe1, 0x20, 0x13, 0xb7, 0xf7, 0xe4, 0x67, 0x2f, 0x8d, 0x3e, + 0xde, 0x79, 0xc4, 0xd6, 0xd7, 0x71, 0x4b, 0xe6, 0xa2, 0x64, 0x3c, 0xf7, 0x85, 0xca, 0x83, 0x1c, + 0xb9, 0x4e, 0x10, 0x34, 0x14, 0x93, 0x45, 0xa5, 0xff, 0x50, 0xc6, 0xb9, 0xa8, 0x99, 0x8e, 0xf2, + 0xe9, 0xde, 0xf9, 0x8f, 0x65, 0xfd, 0xb6, 0x7b, 0xd3, 0x71, 0x1c, 0x5d, 0x3f, 0xd7, 0x73, 0x1f, + 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1e, 0x07, 0x80, 0xd8, 0x02, 0x00, 0x00, +} diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml index 024408e646..87f40b83d9 100644 --- a/vendor/google.golang.org/grpc/.travis.yml +++ b/vendor/google.golang.org/grpc/.travis.yml @@ -2,18 +2,20 @@ language: go matrix: include: - - go: 1.12.x + - go: 1.13.x env: VET=1 GO111MODULE=on - - go: 1.12.x + - go: 1.13.x env: RACE=1 GO111MODULE=on - - go: 1.12.x + - go: 1.13.x env: RUN386=1 - - go: 1.12.x + - go: 1.13.x env: GRPC_GO_RETRY=on + - go: 1.13.x + env: TESTEXAMPLES=1 + - go: 1.12.x + env: GO111MODULE=on - go: 1.11.x env: GO111MODULE=on - - go: 1.10.x - - go: 1.9.x - go: 1.9.x env: GAE=1 @@ -23,17 +25,18 @@ before_install: - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi - if [[ -n "${RUN386}" ]]; then export GOARCH=386; fi - if [[ "${TRAVIS_EVENT_TYPE}" = "cron" && -z "${RUN386}" ]]; then RACE=1; fi - - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then VET_SKIP_PROTO=1; fi + - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then export VET_SKIP_PROTO=1; fi install: - try3() { eval "$*" || eval "$*" || eval "$*"; } - try3 'if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make testdeps; fi' - - if [[ "${GAE}" = 1 ]]; then source ./install_gae.sh; make testappenginedeps; fi - - if [[ "${VET}" = 1 ]]; then ./vet.sh -install; fi + - if [[ -n "${GAE}" ]]; then source ./install_gae.sh; make testappenginedeps; fi + - if [[ -n "${VET}" ]]; then ./vet.sh -install; fi script: - set -e - - if [[ "${VET}" = 1 ]]; then ./vet.sh; fi - - if [[ "${GAE}" = 1 ]]; then make testappengine; exit 0; fi - - if [[ "${RACE}" = 1 ]]; then make testrace; exit 0; fi + - if [[ -n "${TESTEXAMPLES}" ]]; then examples/examples_test.sh; exit 0; fi + - if [[ -n "${VET}" ]]; then ./vet.sh; fi + - if [[ -n "${GAE}" ]]; then make testappengine; exit 0; fi + - if [[ -n "${RACE}" ]]; then make testrace; exit 0; fi - make test diff --git a/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md b/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md new file mode 100644 index 0000000000..9d4213ebca --- /dev/null +++ b/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md @@ -0,0 +1,3 @@ +## Community Code of Conduct + +gRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md index 6e69b28c27..4f1567e2f9 100644 --- a/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ b/vendor/google.golang.org/grpc/CONTRIBUTING.md @@ -1,6 +1,8 @@ # How to contribute -We definitely welcome your patches and contributions to gRPC! +We definitely welcome your patches and contributions to gRPC! Please read the gRPC +organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md) +and [contribution guidelines](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) before proceeding. If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) diff --git a/vendor/google.golang.org/grpc/GOVERNANCE.md b/vendor/google.golang.org/grpc/GOVERNANCE.md new file mode 100644 index 0000000000..d6ff267471 --- /dev/null +++ b/vendor/google.golang.org/grpc/GOVERNANCE.md @@ -0,0 +1 @@ +This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md). diff --git a/vendor/google.golang.org/grpc/MAINTAINERS.md b/vendor/google.golang.org/grpc/MAINTAINERS.md new file mode 100644 index 0000000000..093c82b3af --- /dev/null +++ b/vendor/google.golang.org/grpc/MAINTAINERS.md @@ -0,0 +1,27 @@ +This page lists all active maintainers of this repository. If you were a +maintainer and would like to add your name to the Emeritus list, please send us a +PR. + +See [GOVERNANCE.md](https://github.com/grpc/grpc-community/blob/master/governance.md) +for governance guidelines and how to become a maintainer. +See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) +for general contribution guidelines. + +## Maintainers (in alphabetical order) +- [canguler](https://github.com/canguler), Google LLC +- [cesarghali](https://github.com/cesarghali), Google LLC +- [dfawley](https://github.com/dfawley), Google LLC +- [easwars](https://github.com/easwars), Google LLC +- [jadekler](https://github.com/jadekler), Google LLC +- [menghanl](https://github.com/menghanl), Google LLC +- [srini100](https://github.com/srini100), Google LLC + +## Emeritus Maintainers (in alphabetical order) +- [adelez](https://github.com/adelez), Google LLC +- [iamqizhao](https://github.com/iamqizhao), Google LLC +- [jtattermusch](https://github.com/jtattermusch), Google LLC +- [lyuxuan](https://github.com/lyuxuan), Google LLC +- [makmukhi](https://github.com/makmukhi), Google LLC +- [matt-kwong](https://github.com/matt-kwong), Google LLC +- [nicolasnoble](https://github.com/nicolasnoble), Google LLC +- [yongni](https://github.com/yongni), Google LLC diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go index 97c6e2568f..ff7c3ee6f4 100644 --- a/vendor/google.golang.org/grpc/backoff.go +++ b/vendor/google.golang.org/grpc/backoff.go @@ -23,16 +23,36 @@ package grpc import ( "time" + + "google.golang.org/grpc/backoff" ) // DefaultBackoffConfig uses values specified for backoff in // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// Deprecated: use ConnectParams instead. Will be supported throughout 1.x. var DefaultBackoffConfig = BackoffConfig{ MaxDelay: 120 * time.Second, } // BackoffConfig defines the parameters for the default gRPC backoff strategy. +// +// Deprecated: use ConnectParams instead. Will be supported throughout 1.x. type BackoffConfig struct { // MaxDelay is the upper bound of backoff delay. MaxDelay time.Duration } + +// ConnectParams defines the parameters for connecting and retrying. Users are +// encouraged to use this instead of the BackoffConfig type defined above. See +// here for more details: +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// This API is EXPERIMENTAL. +type ConnectParams struct { + // Backoff specifies the configuration options for connection backoff. + Backoff backoff.Config + // MinConnectTimeout is the minimum amount of time we are willing to give a + // connection to complete. + MinConnectTimeout time.Duration +} diff --git a/vendor/google.golang.org/grpc/backoff/backoff.go b/vendor/google.golang.org/grpc/backoff/backoff.go new file mode 100644 index 0000000000..0787d0b50c --- /dev/null +++ b/vendor/google.golang.org/grpc/backoff/backoff.go @@ -0,0 +1,52 @@ +/* + * + * Copyright 2019 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 backoff provides configuration options for backoff. +// +// More details can be found at: +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// All APIs in this package are experimental. +package backoff + +import "time" + +// Config defines the configuration options for backoff. +type Config struct { + // BaseDelay is the amount of time to backoff after the first failure. + BaseDelay time.Duration + // Multiplier is the factor with which to multiply backoffs after a + // failed retry. Should ideally be greater than 1. + Multiplier float64 + // Jitter is the factor with which backoffs are randomized. + Jitter float64 + // MaxDelay is the upper bound of backoff delay. + MaxDelay time.Duration +} + +// DefaultConfig is a backoff configuration with the default values specfied +// at https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// This should be useful for callers who want to configure backoff with +// non-default values only for a subset of the options. +var DefaultConfig = Config{ + BaseDelay: 1.0 * time.Second, + Multiplier: 1.6, + Jitter: 0.2, + MaxDelay: 120 * time.Second, +} diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index c266f4ec10..917c242f8a 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -305,14 +305,23 @@ type ClientConnState struct { BalancerConfig serviceconfig.LoadBalancingConfig } +// ErrBadResolverState may be returned by UpdateClientConnState to indicate a +// problem with the provided name resolver data. +var ErrBadResolverState = errors.New("bad resolver state") + // V2Balancer is defined for documentation purposes. If a Balancer also // implements V2Balancer, its UpdateClientConnState method will be called // instead of HandleResolvedAddrs and its UpdateSubConnState will be called // instead of HandleSubConnStateChange. type V2Balancer interface { // UpdateClientConnState is called by gRPC when the state of the ClientConn - // changes. - UpdateClientConnState(ClientConnState) + // changes. If the error returned is ErrBadResolverState, the ClientConn + // will begin calling ResolveNow on the active name resolver with + // exponential backoff until a subsequent call to UpdateClientConnState + // returns a nil error. Any other errors are currently ignored. + UpdateClientConnState(ClientConnState) error + // ResolverError is called by gRPC when the name resolver reports an error. + ResolverError(error) // UpdateSubConnState is called by gRPC when the state of a SubConn // changes. UpdateSubConnState(SubConn, SubConnState) diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index 1af88f0a3f..1a5c1aa7e9 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -53,6 +53,8 @@ func (bb *baseBuilder) Name() string { return bb.name } +var _ balancer.V2Balancer = (*baseBalancer)(nil) // Assert that we implement V2Balancer + type baseBalancer struct { cc balancer.ClientConn pickerBuilder PickerBuilder @@ -70,7 +72,11 @@ func (b *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error) panic("not implemented") } -func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) { +func (b *baseBalancer) ResolverError(error) { + // Ignore +} + +func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error { // TODO: handle s.ResolverState.Err (log if not nil) once implemented. // TODO: handle s.ResolverState.ServiceConfig? if grpclog.V(2) { @@ -101,6 +107,7 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) { // The entry will be deleted in HandleSubConnStateChange. } } + return nil } // regeneratePicker takes a snapshot of the balancer, and generates a picker diff --git a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go index 8df4095ca9..5356194c34 100644 --- a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go +++ b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go @@ -25,6 +25,8 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal/buffer" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" ) @@ -34,62 +36,14 @@ type scStateUpdate struct { state connectivity.State } -// scStateUpdateBuffer is an unbounded channel for scStateChangeTuple. -// TODO make a general purpose buffer that uses interface{}. -type scStateUpdateBuffer struct { - c chan *scStateUpdate - mu sync.Mutex - backlog []*scStateUpdate -} - -func newSCStateUpdateBuffer() *scStateUpdateBuffer { - return &scStateUpdateBuffer{ - c: make(chan *scStateUpdate, 1), - } -} - -func (b *scStateUpdateBuffer) put(t *scStateUpdate) { - b.mu.Lock() - defer b.mu.Unlock() - if len(b.backlog) == 0 { - select { - case b.c <- t: - return - default: - } - } - b.backlog = append(b.backlog, t) -} - -func (b *scStateUpdateBuffer) load() { - b.mu.Lock() - defer b.mu.Unlock() - if len(b.backlog) > 0 { - select { - case b.c <- b.backlog[0]: - b.backlog[0] = nil - b.backlog = b.backlog[1:] - default: - } - } -} - -// get returns the channel that the scStateUpdate will be sent to. -// -// Upon receiving, the caller should call load to send another -// scStateChangeTuple onto the channel if there is any. -func (b *scStateUpdateBuffer) get() <-chan *scStateUpdate { - return b.c -} - // ccBalancerWrapper is a wrapper on top of cc for balancers. // It implements balancer.ClientConn interface. type ccBalancerWrapper struct { - cc *ClientConn - balancer balancer.Balancer - stateChangeQueue *scStateUpdateBuffer - ccUpdateCh chan *balancer.ClientConnState - done chan struct{} + cc *ClientConn + balancerMu sync.Mutex // synchronizes calls to the balancer + balancer balancer.Balancer + scBuffer *buffer.Unbounded + done *grpcsync.Event mu sync.Mutex subConns map[*acBalancerWrapper]struct{} @@ -97,11 +51,10 @@ type ccBalancerWrapper struct { func newCCBalancerWrapper(cc *ClientConn, b balancer.Builder, bopts balancer.BuildOptions) *ccBalancerWrapper { ccb := &ccBalancerWrapper{ - cc: cc, - stateChangeQueue: newSCStateUpdateBuffer(), - ccUpdateCh: make(chan *balancer.ClientConnState, 1), - done: make(chan struct{}), - subConns: make(map[*acBalancerWrapper]struct{}), + cc: cc, + scBuffer: buffer.NewUnbounded(), + done: grpcsync.NewEvent(), + subConns: make(map[*acBalancerWrapper]struct{}), } go ccb.watcher() ccb.balancer = b.Build(ccb, bopts) @@ -113,36 +66,23 @@ func newCCBalancerWrapper(cc *ClientConn, b balancer.Builder, bopts balancer.Bui func (ccb *ccBalancerWrapper) watcher() { for { select { - case t := <-ccb.stateChangeQueue.get(): - ccb.stateChangeQueue.load() - select { - case <-ccb.done: - ccb.balancer.Close() - return - default: + case t := <-ccb.scBuffer.Get(): + ccb.scBuffer.Load() + if ccb.done.HasFired() { + break } + ccb.balancerMu.Lock() + su := t.(*scStateUpdate) if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { - ub.UpdateSubConnState(t.sc, balancer.SubConnState{ConnectivityState: t.state}) + ub.UpdateSubConnState(su.sc, balancer.SubConnState{ConnectivityState: su.state}) } else { - ccb.balancer.HandleSubConnStateChange(t.sc, t.state) + ccb.balancer.HandleSubConnStateChange(su.sc, su.state) } - case s := <-ccb.ccUpdateCh: - select { - case <-ccb.done: - ccb.balancer.Close() - return - default: - } - if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { - ub.UpdateClientConnState(*s) - } else { - ccb.balancer.HandleResolvedAddrs(s.ResolverState.Addresses, nil) - } - case <-ccb.done: + ccb.balancerMu.Unlock() + case <-ccb.done.Done(): } - select { - case <-ccb.done: + if ccb.done.HasFired() { ccb.balancer.Close() ccb.mu.Lock() scs := ccb.subConns @@ -153,14 +93,12 @@ func (ccb *ccBalancerWrapper) watcher() { } ccb.UpdateBalancerState(connectivity.Connecting, nil) return - default: } - ccb.cc.firstResolveEvent.Fire() } } func (ccb *ccBalancerWrapper) close() { - close(ccb.done) + ccb.done.Fire() } func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State) { @@ -174,30 +112,28 @@ func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s co if sc == nil { return } - ccb.stateChangeQueue.put(&scStateUpdate{ + ccb.scBuffer.Put(&scStateUpdate{ sc: sc, state: s, }) } -func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) { - if ccb.cc.curBalancerName != grpclbName { - // Filter any grpclb addresses since we don't have the grpclb balancer. - s := &ccs.ResolverState - for i := 0; i < len(s.Addresses); { - if s.Addresses[i].Type == resolver.GRPCLB { - copy(s.Addresses[i:], s.Addresses[i+1:]) - s.Addresses = s.Addresses[:len(s.Addresses)-1] - continue - } - i++ - } +func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error { + ccb.balancerMu.Lock() + defer ccb.balancerMu.Unlock() + if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { + return ub.UpdateClientConnState(*ccs) } - select { - case <-ccb.ccUpdateCh: - default: + ccb.balancer.HandleResolvedAddrs(ccs.ResolverState.Addresses, nil) + return nil +} + +func (ccb *ccBalancerWrapper) resolverError(err error) { + if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { + ccb.balancerMu.Lock() + ub.ResolverError(err) + ccb.balancerMu.Unlock() } - ccb.ccUpdateCh <- ccs } func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) { diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index a7643df7d2..4414ba87fa 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -31,7 +31,7 @@ import ( "time" "google.golang.org/grpc/balancer" - _ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin. + "google.golang.org/grpc/balancer/base" "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" @@ -42,10 +42,12 @@ import ( "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" - _ "google.golang.org/grpc/resolver/dns" // To register dns resolver. - _ "google.golang.org/grpc/resolver/passthrough" // To register passthrough resolver. "google.golang.org/grpc/serviceconfig" "google.golang.org/grpc/status" + + _ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin. + _ "google.golang.org/grpc/internal/resolver/dns" // To register dns resolver. + _ "google.golang.org/grpc/internal/resolver/passthrough" // To register passthrough resolver. ) const ( @@ -186,11 +188,11 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } if cc.dopts.defaultServiceConfigRawJSON != nil { - sc, err := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON) - if err != nil { - return nil, fmt.Errorf("%s: %v", invalidDefaultServiceConfigErrPrefix, err) + scpr := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON) + if scpr.Err != nil { + return nil, fmt.Errorf("%s: %v", invalidDefaultServiceConfigErrPrefix, scpr.Err) } - cc.dopts.defaultServiceConfig = sc + cc.dopts.defaultServiceConfig, _ = scpr.Config.(*ServiceConfig) } cc.mkp = cc.dopts.copts.KeepaliveParams @@ -235,9 +237,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } } if cc.dopts.bs == nil { - cc.dopts.bs = backoff.Exponential{ - MaxDelay: DefaultBackoffConfig.MaxDelay, - } + cc.dopts.bs = backoff.DefaultExponential } if cc.dopts.resolverBuilder == nil { // Only try to parse target when resolver builder is not already set. @@ -443,7 +443,18 @@ func (csm *connectivityStateManager) getNotifyChan() <-chan struct{} { return csm.notifyChan } -// ClientConn represents a client connection to an RPC server. +// ClientConn represents a virtual connection to a conceptual endpoint, to +// perform RPCs. +// +// A ClientConn is free to have zero or more actual connections to the endpoint +// based on configuration, load, etc. It is also free to determine which actual +// endpoints to use and may change it every RPC, permitting client-side load +// balancing. +// +// A ClientConn encapsulates a range of functionality including name +// resolution, TCP connection establishment (with retries and backoff) and TLS +// handshakes. It also handles errors on established connections by +// re-resolving the name and reconnecting. type ClientConn struct { ctx context.Context cancel context.CancelFunc @@ -532,58 +543,104 @@ func (cc *ClientConn) waitForResolvedAddrs(ctx context.Context) error { } } -func (cc *ClientConn) updateResolverState(s resolver.State) error { +var emptyServiceConfig *ServiceConfig + +func init() { + cfg := parseServiceConfig("{}") + if cfg.Err != nil { + panic(fmt.Sprintf("impossible error parsing empty service config: %v", cfg.Err)) + } + emptyServiceConfig = cfg.Config.(*ServiceConfig) +} + +func (cc *ClientConn) maybeApplyDefaultServiceConfig(addrs []resolver.Address) { + if cc.sc != nil { + cc.applyServiceConfigAndBalancer(cc.sc, addrs) + return + } + if cc.dopts.defaultServiceConfig != nil { + cc.applyServiceConfigAndBalancer(cc.dopts.defaultServiceConfig, addrs) + } else { + cc.applyServiceConfigAndBalancer(emptyServiceConfig, addrs) + } +} + +func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { + defer cc.firstResolveEvent.Fire() cc.mu.Lock() - defer cc.mu.Unlock() // Check if the ClientConn is already closed. Some fields (e.g. // balancerWrapper) are set to nil when closing the ClientConn, and could // cause nil pointer panic if we don't have this check. if cc.conns == nil { + cc.mu.Unlock() return nil } - if cc.dopts.disableServiceConfig || s.ServiceConfig == nil { - if cc.dopts.defaultServiceConfig != nil && cc.sc == nil { - cc.applyServiceConfig(cc.dopts.defaultServiceConfig) + if err != nil { + // May need to apply the initial service config in case the resolver + // doesn't support service configs, or doesn't provide a service config + // with the new addresses. + cc.maybeApplyDefaultServiceConfig(nil) + + if cc.balancerWrapper != nil { + cc.balancerWrapper.resolverError(err) + } + + // No addresses are valid with err set; return early. + cc.mu.Unlock() + return balancer.ErrBadResolverState + } + + var ret error + if cc.dopts.disableServiceConfig || s.ServiceConfig == nil { + cc.maybeApplyDefaultServiceConfig(s.Addresses) + // TODO: do we need to apply a failing LB policy if there is no + // default, per the error handling design? + } else { + if sc, ok := s.ServiceConfig.Config.(*ServiceConfig); s.ServiceConfig.Err == nil && ok { + cc.applyServiceConfigAndBalancer(sc, s.Addresses) + } else { + ret = balancer.ErrBadResolverState + if cc.balancerWrapper == nil { + var err error + if s.ServiceConfig.Err != nil { + err = status.Errorf(codes.Unavailable, "error parsing service config: %v", s.ServiceConfig.Err) + } else { + err = status.Errorf(codes.Unavailable, "illegal service config type: %T", s.ServiceConfig.Config) + } + cc.blockingpicker.updatePicker(base.NewErrPicker(err)) + cc.csMgr.updateState(connectivity.TransientFailure) + cc.mu.Unlock() + return ret + } } - } else if sc, ok := s.ServiceConfig.(*ServiceConfig); ok { - cc.applyServiceConfig(sc) } var balCfg serviceconfig.LoadBalancingConfig - if cc.dopts.balancerBuilder == nil { - // Only look at balancer types and switch balancer if balancer dial - // option is not set. - var newBalancerName string - if cc.sc != nil && cc.sc.lbConfig != nil { - newBalancerName = cc.sc.lbConfig.name - balCfg = cc.sc.lbConfig.cfg - } else { - var isGRPCLB bool - for _, a := range s.Addresses { - if a.Type == resolver.GRPCLB { - isGRPCLB = true - break - } - } - if isGRPCLB { - newBalancerName = grpclbName - } else if cc.sc != nil && cc.sc.LB != nil { - newBalancerName = *cc.sc.LB - } else { - newBalancerName = PickFirstBalancerName - } - } - cc.switchBalancer(newBalancerName) - } else if cc.balancerWrapper == nil { - // Balancer dial option was set, and this is the first time handling - // resolved addresses. Build a balancer with dopts.balancerBuilder. - cc.curBalancerName = cc.dopts.balancerBuilder.Name() - cc.balancerWrapper = newCCBalancerWrapper(cc, cc.dopts.balancerBuilder, cc.balancerBuildOpts) + if cc.dopts.balancerBuilder == nil && cc.sc != nil && cc.sc.lbConfig != nil { + balCfg = cc.sc.lbConfig.cfg } - cc.balancerWrapper.updateClientConnState(&balancer.ClientConnState{ResolverState: s, BalancerConfig: balCfg}) - return nil + cbn := cc.curBalancerName + bw := cc.balancerWrapper + cc.mu.Unlock() + if cbn != grpclbName { + // Filter any grpclb addresses since we don't have the grpclb balancer. + for i := 0; i < len(s.Addresses); { + if s.Addresses[i].Type == resolver.GRPCLB { + copy(s.Addresses[i:], s.Addresses[i+1:]) + s.Addresses = s.Addresses[:len(s.Addresses)-1] + continue + } + i++ + } + } + uccsErr := bw.updateClientConnState(&balancer.ClientConnState{ResolverState: s, BalancerConfig: balCfg}) + if ret == nil { + ret = uccsErr // prefer ErrBadResolver state since any other error is + // currently meaningless to the caller. + } + return ret } // switchBalancer starts the switching from current balancer to the balancer @@ -831,10 +888,10 @@ func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method st return t, done, nil } -func (cc *ClientConn) applyServiceConfig(sc *ServiceConfig) error { +func (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, addrs []resolver.Address) { if sc == nil { // should never reach here. - return fmt.Errorf("got nil pointer for service config") + return } cc.sc = sc @@ -850,7 +907,35 @@ func (cc *ClientConn) applyServiceConfig(sc *ServiceConfig) error { cc.retryThrottler.Store((*retryThrottler)(nil)) } - return nil + if cc.dopts.balancerBuilder == nil { + // Only look at balancer types and switch balancer if balancer dial + // option is not set. + var newBalancerName string + if cc.sc != nil && cc.sc.lbConfig != nil { + newBalancerName = cc.sc.lbConfig.name + } else { + var isGRPCLB bool + for _, a := range addrs { + if a.Type == resolver.GRPCLB { + isGRPCLB = true + break + } + } + if isGRPCLB { + newBalancerName = grpclbName + } else if cc.sc != nil && cc.sc.LB != nil { + newBalancerName = *cc.sc.LB + } else { + newBalancerName = PickFirstBalancerName + } + } + cc.switchBalancer(newBalancerName) + } else if cc.balancerWrapper == nil { + // Balancer dial option was set, and this is the first time handling + // resolved addresses. Build a balancer with dopts.balancerBuilder. + cc.curBalancerName = cc.dopts.balancerBuilder.Name() + cc.balancerWrapper = newCCBalancerWrapper(cc, cc.dopts.balancerBuilder, cc.balancerBuildOpts) + } } func (cc *ClientConn) resolveNow(o resolver.ResolveNowOption) { @@ -875,8 +960,9 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOption) { // This API is EXPERIMENTAL. func (cc *ClientConn) ResetConnectBackoff() { cc.mu.Lock() - defer cc.mu.Unlock() - for ac := range cc.conns { + conns := cc.conns + cc.mu.Unlock() + for ac := range conns { ac.resetConnectBackoff() } } @@ -1136,10 +1222,16 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne onCloseCalled := make(chan struct{}) reconnect := grpcsync.NewEvent() + authority := ac.cc.authority + // addr.ServerName takes precedent over ClientConn authority, if present. + if addr.ServerName != "" { + authority = addr.ServerName + } + target := transport.TargetInfo{ Addr: addr.Addr, Metadata: addr.Metadata, - Authority: ac.cc.authority, + Authority: authority, } once := sync.Once{} @@ -1331,7 +1423,7 @@ func (ac *addrConn) tearDown(err error) { curTr := ac.transport ac.transport = nil // We have to set the state to Shutdown before anything else to prevent races - // between setting the state and logic that waits on context cancelation / etc. + // between setting the state and logic that waits on context cancellation / etc. ac.updateConnectivityState(connectivity.Shutdown) ac.cancel() ac.curAddr = resolver.Address{} @@ -1355,7 +1447,7 @@ func (ac *addrConn) tearDown(err error) { }, }) // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add trace reference to - // the entity beng deleted, and thus prevent it from being deleted right away. + // the entity being deleted, and thus prevent it from being deleted right away. channelz.RemoveEntry(ac.channelzID) } ac.mu.Unlock() diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 8ea3d4a1dc..c690161242 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -30,10 +30,11 @@ import ( "fmt" "io/ioutil" "net" - "strings" "github.com/golang/protobuf/proto" + "google.golang.org/grpc/credentials/internal" + ginternal "google.golang.org/grpc/internal" ) // PerRPCCredentials defines the common interface for the credentials which need to @@ -45,7 +46,8 @@ type PerRPCCredentials interface { // context. If a status code is returned, it will be used as the status // for the RPC. uri is the URI of the entry point for the request. // When supported by the underlying implementation, ctx can be used for - // timeout and cancellation. + // timeout and cancellation. Additionally, RequestInfo data will be + // available via ctx to this call. // TODO(zhaoq): Define the set of the qualified keys instead of leaving // it as an arbitrary string. GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) @@ -166,11 +168,12 @@ func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawCon // use local cfg to avoid clobbering ServerName if using multiple endpoints cfg := cloneTLSConfig(c.config) if cfg.ServerName == "" { - colonPos := strings.LastIndex(authority, ":") - if colonPos == -1 { - colonPos = len(authority) + serverName, _, err := net.SplitHostPort(authority) + if err != nil { + // If the authority had no host port or if the authority cannot be parsed, use it as-is. + serverName = authority } - cfg.ServerName = authority[:colonPos] + cfg.ServerName = serverName } conn := tls.Client(rawConn, cfg) errChannel := make(chan error, 1) @@ -334,3 +337,28 @@ func cloneTLSConfig(cfg *tls.Config) *tls.Config { return cfg.Clone() } + +// RequestInfo contains request data attached to the context passed to GetRequestMetadata calls. +// +// This API is experimental. +type RequestInfo struct { + // The method passed to Invoke or NewStream for this RPC. (For proto methods, this has the format "/some.Service/Method") + Method string +} + +// requestInfoKey is a struct to be used as the key when attaching a RequestInfo to a context object. +type requestInfoKey struct{} + +// RequestInfoFromContext extracts the RequestInfo from the context if it exists. +// +// This API is experimental. +func RequestInfoFromContext(ctx context.Context) (ri RequestInfo, ok bool) { + ri, ok = ctx.Value(requestInfoKey{}).(RequestInfo) + return +} + +func init() { + ginternal.NewRequestInfoContext = func(ctx context.Context, ri RequestInfo) context.Context { + return context.WithValue(ctx, requestInfoKey{}, ri) + } +} diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index e8f34d0d6e..9f872df8b7 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -24,11 +24,12 @@ import ( "net" "time" + "google.golang.org/grpc/backoff" "google.golang.org/grpc/balancer" "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" - "google.golang.org/grpc/internal/backoff" + internalbackoff "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/envconfig" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" @@ -47,7 +48,7 @@ type dialOptions struct { cp Compressor dc Decompressor - bs backoff.Strategy + bs internalbackoff.Strategy block bool insecure bool timeout time.Duration @@ -68,6 +69,10 @@ type dialOptions struct { minConnectTimeout func() time.Duration defaultServiceConfig *ServiceConfig // defaultServiceConfig is parsed from defaultServiceConfigRawJSON. defaultServiceConfigRawJSON *string + // This is used by ccResolverWrapper to backoff between successive calls to + // resolver.ResolveNow(). The user will have no need to configure this, but + // we need to be able to configure this in tests. + resolveNowBackoff func(int) time.Duration } // DialOption configures how we set up the connection. @@ -246,8 +251,28 @@ func WithServiceConfig(c <-chan ServiceConfig) DialOption { }) } +// WithConnectParams configures the dialer to use the provided ConnectParams. +// +// The backoff configuration specified as part of the ConnectParams overrides +// all defaults specified in +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. Consider +// using the backoff.DefaultConfig as a base, in cases where you want to +// override only a subset of the backoff configuration. +// +// This API is EXPERIMENTAL. +func WithConnectParams(p ConnectParams) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.bs = internalbackoff.Exponential{Config: p.Backoff} + o.minConnectTimeout = func() time.Duration { + return p.MinConnectTimeout + } + }) +} + // WithBackoffMaxDelay configures the dialer to use the provided maximum delay // when backing off after failed connection attempts. +// +// Deprecated: use WithConnectParams instead. Will be supported throughout 1.x. func WithBackoffMaxDelay(md time.Duration) DialOption { return WithBackoffConfig(BackoffConfig{MaxDelay: md}) } @@ -255,19 +280,18 @@ func WithBackoffMaxDelay(md time.Duration) DialOption { // WithBackoffConfig configures the dialer to use the provided backoff // parameters after connection failures. // -// Use WithBackoffMaxDelay until more parameters on BackoffConfig are opened up -// for use. +// Deprecated: use WithConnectParams instead. Will be supported throughout 1.x. func WithBackoffConfig(b BackoffConfig) DialOption { - return withBackoff(backoff.Exponential{ - MaxDelay: b.MaxDelay, - }) + bc := backoff.DefaultConfig + bc.MaxDelay = b.MaxDelay + return withBackoff(internalbackoff.Exponential{Config: bc}) } // withBackoff sets the backoff strategy used for connectRetryNum after a failed // connection attempt. // // This can be exported if arbitrary backoff strategies are allowed by gRPC. -func withBackoff(bs backoff.Strategy) DialOption { +func withBackoff(bs internalbackoff.Strategy) DialOption { return newFuncDialOption(func(o *dialOptions) { o.bs = bs }) @@ -539,6 +563,7 @@ func defaultDialOptions() dialOptions { WriteBufferSize: defaultWriteBufSize, ReadBufferSize: defaultReadBufSize, }, + resolveNowBackoff: internalbackoff.DefaultExponential.Backoff, } } @@ -552,3 +577,13 @@ func withMinConnectDeadline(f func() time.Duration) DialOption { o.minConnectTimeout = f }) } + +// withResolveNowBackoff specifies the function that clientconn uses to backoff +// between successive calls to resolver.ResolveNow(). +// +// For testing purpose only. +func withResolveNowBackoff(f func(int) time.Duration) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.resolveNowBackoff = f + }) +} diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 30a75da99d..195e8448b6 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -46,6 +46,10 @@ type Compressor interface { // coding header. The result must be static; the result cannot change // between calls. Name() string + // EXPERIMENTAL: if a Compressor implements + // DecompressedSize(compressedBytes []byte) int, gRPC will call it + // to determine the size of the buffer allocated for the result of decompression. + // Return -1 to indicate unknown size. } var registeredCompressor = make(map[string]Compressor) diff --git a/vendor/google.golang.org/grpc/go.mod b/vendor/google.golang.org/grpc/go.mod index c1a8340c5b..dc56aa79d9 100644 --- a/vendor/google.golang.org/grpc/go.mod +++ b/vendor/google.golang.org/grpc/go.mod @@ -1,19 +1,16 @@ module google.golang.org/grpc +go 1.11 + require ( - cloud.google.com/go v0.26.0 // indirect - github.com/BurntSushi/toml v0.3.1 // indirect - github.com/client9/misspell v0.3.4 + github.com/envoyproxy/go-control-plane v0.9.0 + github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/mock v1.1.1 - github.com/golang/protobuf v1.2.0 + github.com/golang/protobuf v1.3.2 github.com/google/go-cmp v0.2.0 - golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 golang.org/x/net v0.0.0-20190311183353-d8887717615a golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a - golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 - google.golang.org/appengine v1.1.0 // indirect - google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 - honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc + google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 ) diff --git a/vendor/google.golang.org/grpc/go.sum b/vendor/google.golang.org/grpc/go.sum index 741677d2e8..f6a4784d0b 100644 --- a/vendor/google.golang.org/grpc/go.sum +++ b/vendor/google.golang.org/grpc/go.sum @@ -1,37 +1,53 @@ cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/envoyproxy/go-control-plane v0.9.0 h1:67WMNTvGrl7V1dWdKCeTwxDr7nio9clKoTlLhwIPnT4= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +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/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-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +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 h1:5Beo0mZN8dRzgrMMkDp0jc8YXQKx9DiJ2k1dkvGsn5A= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +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= diff --git a/vendor/google.golang.org/grpc/grpclog/grpclog.go b/vendor/google.golang.org/grpc/grpclog/grpclog.go index 51bb9457cd..874ea6d98a 100644 --- a/vendor/google.golang.org/grpc/grpclog/grpclog.go +++ b/vendor/google.golang.org/grpc/grpclog/grpclog.go @@ -89,7 +89,7 @@ func Fatal(args ...interface{}) { } // Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf. -// It calles os.Exit() with exit code 1. +// It calls os.Exit() with exit code 1. func Fatalf(format string, args ...interface{}) { logger.Fatalf(format, args...) // Make sure fatal logs will exit. diff --git a/vendor/google.golang.org/grpc/health/client.go b/vendor/google.golang.org/grpc/health/client.go index b43746e616..419f06040d 100644 --- a/vendor/google.golang.org/grpc/health/client.go +++ b/vendor/google.golang.org/grpc/health/client.go @@ -33,20 +33,20 @@ import ( "google.golang.org/grpc/status" ) -const maxDelay = 120 * time.Second - -var backoffStrategy = backoff.Exponential{MaxDelay: maxDelay} -var backoffFunc = func(ctx context.Context, retries int) bool { - d := backoffStrategy.Backoff(retries) - timer := time.NewTimer(d) - select { - case <-timer.C: - return true - case <-ctx.Done(): - timer.Stop() - return false +var ( + backoffStrategy = backoff.DefaultExponential + backoffFunc = func(ctx context.Context, retries int) bool { + d := backoffStrategy.Backoff(retries) + timer := time.NewTimer(d) + select { + case <-timer.C: + return true + case <-ctx.Done(): + timer.Stop() + return false + } } -} +) func init() { internal.HealthCheckFunc = clientHealthCheck @@ -105,7 +105,7 @@ retryConnection: continue retryConnection } - // As a message has been received, removes the need for backoff for the next retry by reseting the try count. + // As a message has been received, removes the need for backoff for the next retry by resetting the try count. tryCnt = 0 if resp.Status == healthpb.HealthCheckResponse_SERVING { setConnectivityState(connectivity.Ready) diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go index c2f2c7729d..c99e27ae5b 100644 --- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go +++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go @@ -1,15 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: grpc/health/v1/health.proto -package grpc_health_v1 // import "google.golang.org/grpc/health/grpc_health_v1" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +package grpc_health_v1 import ( - context "golang.org/x/net/context" + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -21,7 +22,7 @@ var _ = math.Inf // 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 +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type HealthCheckResponse_ServingStatus int32 @@ -38,6 +39,7 @@ var HealthCheckResponse_ServingStatus_name = map[int32]string{ 2: "NOT_SERVING", 3: "SERVICE_UNKNOWN", } + var HealthCheckResponse_ServingStatus_value = map[string]int32{ "UNKNOWN": 0, "SERVING": 1, @@ -48,8 +50,9 @@ var HealthCheckResponse_ServingStatus_value = map[string]int32{ func (x HealthCheckResponse_ServingStatus) String() string { return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x)) } + func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_health_6b1a06aa67f91efd, []int{1, 0} + return fileDescriptor_e265fd9d4e077217, []int{1, 0} } type HealthCheckRequest struct { @@ -63,16 +66,17 @@ func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} } func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) } func (*HealthCheckRequest) ProtoMessage() {} func (*HealthCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_health_6b1a06aa67f91efd, []int{0} + return fileDescriptor_e265fd9d4e077217, []int{0} } + func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HealthCheckRequest.Unmarshal(m, b) } func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic) } -func (dst *HealthCheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckRequest.Merge(dst, src) +func (m *HealthCheckRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckRequest.Merge(m, src) } func (m *HealthCheckRequest) XXX_Size() int { return xxx_messageInfo_HealthCheckRequest.Size(m) @@ -101,16 +105,17 @@ func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) } func (*HealthCheckResponse) ProtoMessage() {} func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_health_6b1a06aa67f91efd, []int{1} + return fileDescriptor_e265fd9d4e077217, []int{1} } + func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HealthCheckResponse.Unmarshal(m, b) } func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) } -func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckResponse.Merge(dst, src) +func (m *HealthCheckResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckResponse.Merge(m, src) } func (m *HealthCheckResponse) XXX_Size() int { return xxx_messageInfo_HealthCheckResponse.Size(m) @@ -129,9 +134,34 @@ func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus { } func init() { + proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v1.HealthCheckRequest") proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v1.HealthCheckResponse") - proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) +} + +func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_e265fd9d4e077217) } + +var fileDescriptor_e265fd9d4e077217 = []byte{ + // 297 bytes of a gzipped FileDescriptorProto + 0x1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46, 0x2e, 0x36, 0x88, 0xf5, 0x42, 0x01, 0x5c, 0xac, + 0x60, 0x27, 0x08, 0x29, 0xe1, 0x75, 0x1f, 0x38, 0x14, 0xa4, 0x94, 0x89, 0xf0, 0x83, 0x50, 0x10, + 0x17, 0x6b, 0x78, 0x62, 0x49, 0x72, 0x06, 0xd5, 0x4c, 0x34, 0x60, 0x74, 0x4a, 0xe4, 0x12, 0xcc, + 0xcc, 0x47, 0x53, 0xea, 0xc4, 0x0d, 0x51, 0x1b, 0x00, 0x8a, 0xc6, 0x00, 0xc6, 0x28, 0x9d, 0xf4, + 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xbd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74, + 0x7d, 0xe4, 0x78, 0x07, 0xb1, 0xe3, 0x21, 0xec, 0xf8, 0x32, 0xc3, 0x55, 0x4c, 0x7c, 0xee, 0x20, + 0xd3, 0x20, 0x46, 0xe8, 0x85, 0x19, 0x26, 0xb1, 0x81, 0x93, 0x83, 0x31, 0x20, 0x00, 0x00, 0xff, + 0xff, 0x12, 0x7d, 0x96, 0xcb, 0x2d, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -239,6 +269,17 @@ type HealthServer interface { Watch(*HealthCheckRequest, Health_WatchServer) error } +// UnimplementedHealthServer can be embedded to have forward compatible implementations. +type UnimplementedHealthServer struct { +} + +func (*UnimplementedHealthServer) Check(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") +} +func (*UnimplementedHealthServer) Watch(req *HealthCheckRequest, srv Health_WatchServer) error { + return status.Errorf(codes.Unimplemented, "method Watch not implemented") +} + func RegisterHealthServer(s *grpc.Server, srv HealthServer) { s.RegisterService(&_Health_serviceDesc, srv) } @@ -300,28 +341,3 @@ var _Health_serviceDesc = grpc.ServiceDesc{ }, Metadata: "grpc/health/v1/health.proto", } - -func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_health_6b1a06aa67f91efd) } - -var fileDescriptor_health_6b1a06aa67f91efd = []byte{ - // 297 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0x2a, 0x48, - 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, 0xd0, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, - 0x4b, 0xf2, 0x85, 0xf8, 0x40, 0x92, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21, 0x0f, - 0x30, 0xc7, 0x39, 0x23, 0x35, 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, - 0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, - 0xc6, 0x55, 0xda, 0xc8, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, - 0x93, 0x8b, 0xad, 0xb8, 0x24, 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5, - 0x22, 0x3d, 0x2c, 0x9a, 0xf4, 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d, - 0x50, 0xf2, 0xe7, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, - 0xf7, 0x13, 0x60, 0x00, 0x71, 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8, - 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x42, 0xc2, 0x5c, 0xfc, 0x60, 0x8e, 0xb3, - 0x6b, 0x3c, 0x4c, 0x0b, 0xb3, 0xd1, 0x3a, 0x46, 0x2e, 0x36, 0x88, 0xf5, 0x42, 0x01, 0x5c, 0xac, - 0x60, 0x27, 0x08, 0x29, 0xe1, 0x75, 0x1f, 0x38, 0x14, 0xa4, 0x94, 0x89, 0xf0, 0x83, 0x50, 0x10, - 0x17, 0x6b, 0x78, 0x62, 0x49, 0x72, 0x06, 0xd5, 0x4c, 0x34, 0x60, 0x74, 0x4a, 0xe4, 0x12, 0xcc, - 0xcc, 0x47, 0x53, 0xea, 0xc4, 0x0d, 0x51, 0x1b, 0x00, 0x8a, 0xc6, 0x00, 0xc6, 0x28, 0x9d, 0xf4, - 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xbd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74, - 0x7d, 0xe4, 0x78, 0x07, 0xb1, 0xe3, 0x21, 0xec, 0xf8, 0x32, 0xc3, 0x55, 0x4c, 0x7c, 0xee, 0x20, - 0xd3, 0x20, 0x46, 0xe8, 0x85, 0x19, 0x26, 0xb1, 0x81, 0x93, 0x83, 0x31, 0x20, 0x00, 0x00, 0xff, - 0xff, 0x12, 0x7d, 0x96, 0xcb, 0x2d, 0x02, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/grpc/health/server.go b/vendor/google.golang.org/grpc/health/server.go index c79f9d2ab8..2262607f88 100644 --- a/vendor/google.golang.org/grpc/health/server.go +++ b/vendor/google.golang.org/grpc/health/server.go @@ -35,7 +35,7 @@ import ( // Server implements `service Health`. type Server struct { - mu sync.Mutex + mu sync.RWMutex // If shutdown is true, it's expected all serving status is NOT_SERVING, and // will stay in NOT_SERVING. shutdown bool @@ -54,8 +54,8 @@ func NewServer() *Server { // Check implements `service Health`. func (s *Server) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) { - s.mu.Lock() - defer s.mu.Unlock() + s.mu.RLock() + defer s.mu.RUnlock() if servingStatus, ok := s.statusMap[in.Service]; ok { return &healthpb.HealthCheckResponse{ Status: servingStatus, @@ -139,7 +139,7 @@ func (s *Server) setServingStatusLocked(service string, servingStatus healthpb.H // Shutdown sets all serving status to NOT_SERVING, and configures the server to // ignore all future status changes. // -// This changes serving status for all services. To set status for a perticular +// This changes serving status for all services. To set status for a particular // services, call SetServingStatus(). func (s *Server) Shutdown() { s.mu.Lock() @@ -153,7 +153,7 @@ func (s *Server) Shutdown() { // Resume sets all serving status to SERVING, and configures the server to // accept all future status changes. // -// This changes serving status for all services. To set status for a perticular +// This changes serving status for all services. To set status for a particular // services, call SetServingStatus(). func (s *Server) Resume() { s.mu.Lock() diff --git a/vendor/google.golang.org/grpc/internal/backoff/backoff.go b/vendor/google.golang.org/grpc/internal/backoff/backoff.go index 1bd0cce5ab..5fc0ee3da5 100644 --- a/vendor/google.golang.org/grpc/internal/backoff/backoff.go +++ b/vendor/google.golang.org/grpc/internal/backoff/backoff.go @@ -25,44 +25,39 @@ package backoff import ( "time" + grpcbackoff "google.golang.org/grpc/backoff" "google.golang.org/grpc/internal/grpcrand" ) // Strategy defines the methodology for backing off after a grpc connection // failure. -// type Strategy interface { // Backoff returns the amount of time to wait before the next retry given // the number of consecutive failures. Backoff(retries int) time.Duration } -const ( - // baseDelay is the amount of time to wait before retrying after the first - // failure. - baseDelay = 1.0 * time.Second - // factor is applied to the backoff after each retry. - factor = 1.6 - // jitter provides a range to randomize backoff delays. - jitter = 0.2 -) +// DefaultExponential is an exponential backoff implementation using the +// default values for all the configurable knobs defined in +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +var DefaultExponential = Exponential{Config: grpcbackoff.DefaultConfig} // Exponential implements exponential backoff algorithm as defined in // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. type Exponential struct { - // MaxDelay is the upper bound of backoff delay. - MaxDelay time.Duration + // Config contains all options to configure the backoff algorithm. + Config grpcbackoff.Config } // Backoff returns the amount of time to wait before the next retry given the // number of retries. func (bc Exponential) Backoff(retries int) time.Duration { if retries == 0 { - return baseDelay + return bc.Config.BaseDelay } - backoff, max := float64(baseDelay), float64(bc.MaxDelay) + backoff, max := float64(bc.Config.BaseDelay), float64(bc.Config.MaxDelay) for backoff < max && retries > 0 { - backoff *= factor + backoff *= bc.Config.Multiplier retries-- } if backoff > max { @@ -70,7 +65,7 @@ func (bc Exponential) Backoff(retries int) time.Duration { } // Randomize backoff delays so that if a cluster of requests start at // the same time, they won't operate in lockstep. - backoff *= 1 + jitter*(grpcrand.Float64()*2-1) + backoff *= 1 + bc.Config.Jitter*(grpcrand.Float64()*2-1) if backoff < 0 { return 0 } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go index fee6aecd08..4062c025c7 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go @@ -34,7 +34,7 @@ type Logger interface { } // binLogger is the global binary logger for the binary. One of this should be -// built at init time from the configuration (environment varialbe or flags). +// built at init time from the configuration (environment variable or flags). // // It is used to get a methodLogger for each individual method. var binLogger Logger diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index 4cc2525df7..be30d0e65e 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -43,7 +43,7 @@ import ( // Foo. // // If two configs exist for one certain method or service, the one specified -// later overrides the privous config. +// later overrides the previous config. func NewLoggerFromConfigString(s string) Logger { if s == "" { return nil @@ -74,7 +74,7 @@ func (l *logger) fillMethodLoggerWithConfigString(config string) error { return fmt.Errorf("invalid config: %q, %v", config, err) } if m == "*" { - return fmt.Errorf("invalid config: %q, %v", config, "* not allowd in blacklist config") + return fmt.Errorf("invalid config: %q, %v", config, "* not allowed in blacklist config") } if suffix != "" { return fmt.Errorf("invalid config: %q, %v", config, "header/message limit not allowed in blacklist config") diff --git a/vendor/google.golang.org/grpc/internal/binarylog/sink.go b/vendor/google.golang.org/grpc/internal/binarylog/sink.go index 20d044f0fd..a2e7c346dd 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/sink.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/sink.go @@ -63,7 +63,7 @@ func (ns *noopSink) Close() error { return nil } // newWriterSink creates a binary log sink with the given writer. // -// Write() marshalls the proto message and writes it to the given writer. Each +// Write() marshals the proto message and writes it to the given writer. Each // message is prefixed with a 4 byte big endian unsigned integer as the length. // // No buffer is done, Close() doesn't try to close the writer. diff --git a/vendor/google.golang.org/grpc/internal/buffer/unbounded.go b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go new file mode 100644 index 0000000000..2cb3109d80 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go @@ -0,0 +1,78 @@ +/* + * Copyright 2019 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 buffer provides an implementation of an unbounded buffer. +package buffer + +import "sync" + +// Unbounded is an implementation of an unbounded buffer which does not use +// extra goroutines. This is typically used for passing updates from one entity +// to another within gRPC. +// +// All methods on this type are thread-safe and don't block on anything except +// the underlying mutex used for synchronization. +type Unbounded struct { + c chan interface{} + mu sync.Mutex + backlog []interface{} +} + +// NewUnbounded returns a new instance of Unbounded. +func NewUnbounded() *Unbounded { + return &Unbounded{c: make(chan interface{}, 1)} +} + +// Put adds t to the unbounded buffer. +func (b *Unbounded) Put(t interface{}) { + b.mu.Lock() + if len(b.backlog) == 0 { + select { + case b.c <- t: + b.mu.Unlock() + return + default: + } + } + b.backlog = append(b.backlog, t) + b.mu.Unlock() +} + +// Load sends the earliest buffered data, if any, onto the read channel +// returned by Get(). Users are expected to call this every time they read a +// value from the read channel. +func (b *Unbounded) Load() { + b.mu.Lock() + if len(b.backlog) > 0 { + select { + case b.c <- b.backlog[0]: + b.backlog[0] = nil + b.backlog = b.backlog[1:] + default: + } + } + b.mu.Unlock() +} + +// Get returns a read channel on which values added to the buffer, via Put(), +// are sent on. +// +// Upon reading a value from this channel, users are expected to call Load() to +// send the next buffered value onto the channel if there is any. +func (b *Unbounded) Get() <-chan interface{} { + return b.c +} diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index bc1f99ac80..b96b3597ca 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -28,9 +28,9 @@ import ( ) var ( - // WithResolverBuilder is exported by dialoptions.go + // WithResolverBuilder is set by dialoptions.go WithResolverBuilder interface{} // func (resolver.Builder) grpc.DialOption - // WithHealthCheckFunc is not exported by dialoptions.go + // WithHealthCheckFunc is set by dialoptions.go WithHealthCheckFunc interface{} // func (HealthChecker) DialOption // HealthCheckFunc is used to provide client-side LB channel health checking HealthCheckFunc HealthChecker @@ -39,14 +39,17 @@ var ( // KeepaliveMinPingTime is the minimum ping interval. This must be 10s by // default, but tests may wish to set it lower for convenience. KeepaliveMinPingTime = 10 * time.Second - // ParseServiceConfig is a function to parse JSON service configs into - // opaque data structures. - ParseServiceConfig func(sc string) (interface{}, error) // StatusRawProto is exported by status/status.go. This func returns a // pointer to the wrapped Status proto for a given status.Status without a // call to proto.Clone(). The returned Status proto should not be mutated by // the caller. StatusRawProto interface{} // func (*status.Status) *spb.Status + // NewRequestInfoContext creates a new context based on the argument context attaching + // the passed in RequestInfo to the new context. + NewRequestInfoContext interface{} // func(context.Context, credentials.RequestInfo) context.Context + // ParseServiceConfigForTesting is for creating a fake + // ClientConn for resolver testing only + ParseServiceConfigForTesting interface{} // func(string) *serviceconfig.ParseResult ) // HealthChecker defines the signature of the client-side LB channel health checking function. diff --git a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go similarity index 98% rename from vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go rename to vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 297492e87a..abc0f92ca5 100644 --- a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -32,8 +32,9 @@ import ( "sync" "time" + "google.golang.org/grpc/backoff" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/internal/backoff" + internalbackoff "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/resolver" ) @@ -126,9 +127,11 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts // DNS address (non-IP). ctx, cancel := context.WithCancel(context.Background()) + bc := backoff.DefaultConfig + bc.MaxDelay = b.minFreq d := &dnsResolver{ freq: b.minFreq, - backoff: backoff.Exponential{MaxDelay: b.minFreq}, + backoff: internalbackoff.Exponential{Config: bc}, host: host, port: port, ctx: ctx, @@ -200,7 +203,7 @@ func (i *ipResolver) watcher() { // dnsResolver watches for the name resolution update for a non-IP target. type dnsResolver struct { freq time.Duration - backoff backoff.Exponential + backoff internalbackoff.Exponential retryCount int host string port string diff --git a/vendor/google.golang.org/grpc/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go similarity index 100% rename from vendor/google.golang.org/grpc/resolver/passthrough/passthrough.go rename to vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index b8e0aa4db2..ddee20b6be 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -107,8 +107,8 @@ func (*registerStream) isTransportResponseFrame() bool { return false } type headerFrame struct { streamID uint32 hf []hpack.HeaderField - endStream bool // Valid on server side. - initStream func(uint32) (bool, error) // Used only on the client side. + endStream bool // Valid on server side. + initStream func(uint32) error // Used only on the client side. onWrite func() wq *writeQuota // write quota for the stream created. cleanup *cleanupStream // Valid on the server side. @@ -637,21 +637,17 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error { func (l *loopyWriter) originateStream(str *outStream) error { hdr := str.itl.dequeue().(*headerFrame) - sendPing, err := hdr.initStream(str.id) - if err != nil { + if err := hdr.initStream(str.id); err != nil { if err == ErrConnClosing { return err } // Other errors(errStreamDrain) need not close transport. return nil } - if err = l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { + if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { return err } l.estdStreams[str.id] = str - if sendPing { - return l.pingHandler(&ping{data: [8]byte{}}) - } return nil } diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 41a79c5670..294661a3f3 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -35,6 +35,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/keepalive" @@ -46,6 +47,7 @@ import ( // http2Client implements the ClientTransport interface with HTTP2. type http2Client struct { + lastRead int64 // keep this field 64-bit aligned ctx context.Context cancel context.CancelFunc ctxDone <-chan struct{} // Cache the ctx.Done() chan. @@ -62,8 +64,6 @@ type http2Client struct { // goAway is closed to notify the upper layer (i.e., addrConn.transportMonitor) // that the server sent GoAway on this transport. goAway chan struct{} - // awakenKeepalive is used to wake up keepalive when after it has gone dormant. - awakenKeepalive chan struct{} framer *framer // controlBuf delivers all the control related tasks (e.g., window @@ -77,9 +77,6 @@ type http2Client struct { perRPCCreds []credentials.PerRPCCredentials - // Boolean to keep track of reading activity on transport. - // 1 is true and 0 is false. - activity uint32 // Accessed atomically. kp keepalive.ClientParameters keepaliveEnabled bool @@ -110,6 +107,16 @@ type http2Client struct { // goAwayReason records the http2.ErrCode and debug data received with the // GoAway frame. goAwayReason GoAwayReason + // A condition variable used to signal when the keepalive goroutine should + // go dormant. The condition for dormancy is based on the number of active + // streams and the `PermitWithoutStream` keepalive client parameter. And + // since the number of active streams is guarded by the above mutex, we use + // the same for this condition variable as well. + kpDormancyCond *sync.Cond + // A boolean to track whether the keepalive goroutine is dormant or not. + // This is checked before attempting to signal the above condition + // variable. + kpDormant bool // Fields below are for channelz metric collection. channelzID int64 // channelz unique identification number @@ -232,7 +239,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne readerDone: make(chan struct{}), writerDone: make(chan struct{}), goAway: make(chan struct{}), - awakenKeepalive: make(chan struct{}, 1), framer: newFramer(conn, writeBufSize, readBufSize, maxHeaderListSize), fc: &trInFlow{limit: uint32(icwz)}, scheme: scheme, @@ -264,9 +270,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne updateFlowControl: t.updateFlowControl, } } - // Make sure awakenKeepalive can't be written upon. - // keepalive routine will make it writable, if need be. - t.awakenKeepalive <- struct{}{} if t.statsHandler != nil { t.ctx = t.statsHandler.TagConn(t.ctx, &stats.ConnTagInfo{ RemoteAddr: t.remoteAddr, @@ -281,6 +284,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne t.channelzID = channelz.RegisterNormalSocket(t, opts.ChannelzParentID, fmt.Sprintf("%s -> %s", t.localAddr, t.remoteAddr)) } if t.keepaliveEnabled { + t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() } // Start the reader goroutine for incoming message. Each transport has @@ -347,6 +351,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { // TODO(zhaoq): Handle uint32 overflow of Stream.id. s := &Stream{ + ct: t, done: make(chan struct{}), method: callHdr.Method, sendCompress: callHdr.SendCompress, @@ -380,23 +385,23 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { } func (t *http2Client) getPeer() *peer.Peer { - pr := &peer.Peer{ - Addr: t.remoteAddr, + return &peer.Peer{ + Addr: t.remoteAddr, + AuthInfo: t.authInfo, } - // Attach Auth info if there is any. - if t.authInfo != nil { - pr.AuthInfo = t.authInfo - } - return pr } func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) ([]hpack.HeaderField, error) { aud := t.createAudience(callHdr) - authData, err := t.getTrAuthData(ctx, aud) + ri := credentials.RequestInfo{ + Method: callHdr.Method, + } + ctxWithRequestInfo := internal.NewRequestInfoContext.(func(context.Context, credentials.RequestInfo) context.Context)(ctx, ri) + authData, err := t.getTrAuthData(ctxWithRequestInfo, aud) if err != nil { return nil, err } - callAuthData, err := t.getCallAuthData(ctx, aud, callHdr) + callAuthData, err := t.getCallAuthData(ctxWithRequestInfo, aud, callHdr) if err != nil { return nil, err } @@ -564,7 +569,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea hdr := &headerFrame{ hf: headerFields, endStream: false, - initStream: func(id uint32) (bool, error) { + initStream: func(id uint32) error { t.mu.Lock() if state := t.state; state != reachable { t.mu.Unlock() @@ -574,29 +579,19 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea err = ErrConnClosing } cleanup(err) - return false, err + return err } t.activeStreams[id] = s if channelz.IsOn() { atomic.AddInt64(&t.czData.streamsStarted, 1) atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano()) } - var sendPing bool - // If the number of active streams change from 0 to 1, then check if keepalive - // has gone dormant. If so, wake it up. - if len(t.activeStreams) == 1 && t.keepaliveEnabled { - select { - case t.awakenKeepalive <- struct{}{}: - sendPing = true - // Fill the awakenKeepalive channel again as this channel must be - // kept non-writable except at the point that the keepalive() - // goroutine is waiting either to be awaken or shutdown. - t.awakenKeepalive <- struct{}{} - default: - } + // If the keepalive goroutine has gone dormant, wake it up. + if t.kpDormant { + t.kpDormancyCond.Signal() } t.mu.Unlock() - return sendPing, nil + return nil }, onOrphaned: cleanup, wq: s.wq, @@ -778,6 +773,11 @@ func (t *http2Client) Close() error { t.state = closing streams := t.activeStreams t.activeStreams = nil + if t.kpDormant { + // If the keepalive goroutine is blocked on this condition variable, we + // should unblock it so that the goroutine eventually exits. + t.kpDormancyCond.Signal() + } t.mu.Unlock() t.controlBuf.finish() t.cancel() @@ -853,11 +853,11 @@ func (t *http2Client) Write(s *Stream, hdr []byte, data []byte, opts *Options) e return t.controlBuf.put(df) } -func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) { +func (t *http2Client) getStream(f http2.Frame) *Stream { t.mu.Lock() - defer t.mu.Unlock() - s, ok := t.activeStreams[f.Header().StreamID] - return s, ok + s := t.activeStreams[f.Header().StreamID] + t.mu.Unlock() + return s } // adjustWindow sends out extra window update over the initial window size @@ -937,8 +937,8 @@ func (t *http2Client) handleData(f *http2.DataFrame) { t.controlBuf.put(bdpPing) } // Select the right stream to dispatch. - s, ok := t.getStream(f) - if !ok { + s := t.getStream(f) + if s == nil { return } if size > 0 { @@ -969,8 +969,8 @@ func (t *http2Client) handleData(f *http2.DataFrame) { } func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { - s, ok := t.getStream(f) - if !ok { + s := t.getStream(f) + if s == nil { return } if f.ErrCode == http2.ErrCodeRefusedStream { @@ -1147,8 +1147,8 @@ func (t *http2Client) handleWindowUpdate(f *http2.WindowUpdateFrame) { // operateHeaders takes action on the decoded headers. func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { - s, ok := t.getStream(frame) - if !ok { + s := t.getStream(frame) + if s == nil { return } endStream := frame.StreamEnded() @@ -1191,6 +1191,7 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { // If headerChan hasn't been closed yet if atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) { + s.headerValid = true if !endStream { // HEADERS frame block carries a Response-Headers. isHeader = true @@ -1233,7 +1234,7 @@ func (t *http2Client) reader() { } t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!) if t.keepaliveEnabled { - atomic.CompareAndSwapUint32(&t.activity, 0, 1) + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) } sf, ok := frame.(*http2.SettingsFrame) if !ok { @@ -1248,7 +1249,7 @@ func (t *http2Client) reader() { t.controlBuf.throttle() frame, err := t.framer.fr.ReadFrame() if t.keepaliveEnabled { - atomic.CompareAndSwapUint32(&t.activity, 0, 1) + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) } if err != nil { // Abort an active stream if the http2.Framer returns a @@ -1292,56 +1293,84 @@ func (t *http2Client) reader() { } } +func minTime(a, b time.Duration) time.Duration { + if a < b { + return a + } + return b +} + // keepalive running in a separate goroutune makes sure the connection is alive by sending pings. func (t *http2Client) keepalive() { p := &ping{data: [8]byte{}} + // True iff a ping has been sent, and no data has been received since then. + outstandingPing := false + // Amount of time remaining before which we should receive an ACK for the + // last sent ping. + timeoutLeft := time.Duration(0) + // Records the last value of t.lastRead before we go block on the timer. + // This is required to check for read activity since then. + prevNano := time.Now().UnixNano() timer := time.NewTimer(t.kp.Time) for { select { case <-timer.C: - if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { - timer.Reset(t.kp.Time) + lastRead := atomic.LoadInt64(&t.lastRead) + if lastRead > prevNano { + // There has been read activity since the last time we were here. + outstandingPing = false + // Next timer should fire at kp.Time seconds from lastRead time. + timer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano())) + prevNano = lastRead continue } - // Check if keepalive should go dormant. + if outstandingPing && timeoutLeft <= 0 { + t.Close() + return + } t.mu.Lock() + if t.state == closing { + // If the transport is closing, we should exit from the + // keepalive goroutine here. If not, we could have a race + // between the call to Signal() from Close() and the call to + // Wait() here, whereby the keepalive goroutine ends up + // blocking on the condition variable which will never be + // signalled again. + t.mu.Unlock() + return + } if len(t.activeStreams) < 1 && !t.kp.PermitWithoutStream { - // Make awakenKeepalive writable. - <-t.awakenKeepalive - t.mu.Unlock() - select { - case <-t.awakenKeepalive: - // If the control gets here a ping has been sent - // need to reset the timer with keepalive.Timeout. - case <-t.ctx.Done(): - return - } - } else { - t.mu.Unlock() + // If a ping was sent out previously (because there were active + // streams at that point) which wasn't acked and its timeout + // hadn't fired, but we got here and are about to go dormant, + // we should make sure that we unconditionally send a ping once + // we awaken. + outstandingPing = false + t.kpDormant = true + t.kpDormancyCond.Wait() + } + t.kpDormant = false + t.mu.Unlock() + + // We get here either because we were dormant and a new stream was + // created which unblocked the Wait() call, or because the + // keepalive timer expired. In both cases, we need to send a ping. + if !outstandingPing { if channelz.IsOn() { atomic.AddInt64(&t.czData.kpCount, 1) } - // Send ping. t.controlBuf.put(p) + timeoutLeft = t.kp.Timeout + outstandingPing = true } - - // By the time control gets here a ping has been sent one way or the other. - timer.Reset(t.kp.Timeout) - select { - case <-timer.C: - if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { - timer.Reset(t.kp.Time) - continue - } - infof("transport: closing client transport due to idleness.") - t.Close() - return - case <-t.ctx.Done(): - if !timer.Stop() { - <-timer.C - } - return - } + // The amount of time to sleep here is the minimum of kp.Time and + // timeoutLeft. This will ensure that we wait only for kp.Time + // before sending out the next ping (for cases where the ping is + // acked). + sleepDuration := minTime(t.kp.Time, timeoutLeft) + timeoutLeft -= sleepDuration + prevNano = lastRead + timer.Reset(sleepDuration) case <-t.ctx.Done(): if !timer.Stop() { <-timer.C diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 83439b5627..0760383646 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -65,8 +65,7 @@ var ( // http2Server implements the ServerTransport interface with HTTP2. type http2Server struct { ctx context.Context - ctxDone <-chan struct{} // Cache the context.Done() chan - cancel context.CancelFunc + done chan struct{} conn net.Conn loopy *loopyWriter readerDone chan struct{} // sync point to enable testing. @@ -138,7 +137,10 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err } framer := newFramer(conn, writeBufSize, readBufSize, maxHeaderListSize) // Send initial settings as connection preface to client. - var isettings []http2.Setting + isettings := []http2.Setting{{ + ID: http2.SettingMaxFrameSize, + Val: http2MaxFrameLen, + }} // TODO(zhaoq): Have a better way to signal "no limit" because 0 is // permitted in the HTTP2 spec. maxStreams := config.MaxStreams @@ -172,6 +174,12 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err Val: *config.MaxHeaderListSize, }) } + if config.HeaderTableSize != nil { + isettings = append(isettings, http2.Setting{ + ID: http2.SettingHeaderTableSize, + Val: *config.HeaderTableSize, + }) + } if err := framer.fr.WriteSettings(isettings...); err != nil { return nil, connectionErrorf(false, err, "transport: %v", err) } @@ -203,11 +211,10 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err if kep.MinTime == 0 { kep.MinTime = defaultKeepalivePolicyMinTime } - ctx, cancel := context.WithCancel(context.Background()) + done := make(chan struct{}) t := &http2Server{ - ctx: ctx, - cancel: cancel, - ctxDone: ctx.Done(), + ctx: context.Background(), + done: done, conn: conn, remoteAddr: conn.RemoteAddr(), localAddr: conn.LocalAddr(), @@ -228,7 +235,7 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err czData: new(channelzData), bufferPool: newBufferPool(), } - t.controlBuf = newControlBuffer(t.ctxDone) + t.controlBuf = newControlBuffer(t.done) if dynamicWindow { t.bdpEst = &bdpEstimator{ bdp: initialWindowSize, @@ -359,12 +366,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeRefusedStream, onWrite: func() {}, }) + s.cancel() return false } } t.mu.Lock() if t.state != reachable { t.mu.Unlock() + s.cancel() return false } if uint32(len(t.activeStreams)) >= t.maxStreams { @@ -375,12 +384,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeRefusedStream, onWrite: func() {}, }) + s.cancel() return false } if streamID%2 != 1 || streamID <= t.maxStreamID { t.mu.Unlock() // illegal gRPC stream id. errorf("transport: http2Server.HandleStreams received an illegal stream id: %v", streamID) + s.cancel() return true } t.maxStreamID = streamID @@ -746,7 +757,7 @@ func (t *http2Server) checkForHeaderListSize(it interface{}) bool { return true } -// WriteHeader sends the header metedata md back to the client. +// WriteHeader sends the header metadata md back to the client. func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error { if s.updateHeaderSent() || s.getState() == streamDone { return ErrIllegalHeaderWrite @@ -882,7 +893,7 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) e // TODO(mmukhi, dfawley): Should the server write also return io.EOF? s.cancel() select { - case <-t.ctx.Done(): + case <-t.done: return ErrConnClosing default: } @@ -904,7 +915,7 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) e } if err := s.wq.get(int32(len(hdr) + len(data))); err != nil { select { - case <-t.ctx.Done(): + case <-t.done: return ErrConnClosing default: } @@ -970,7 +981,7 @@ func (t *http2Server) keepalive() { t.Close() // Resetting the timer so that the clean-up doesn't deadlock. maxAge.Reset(infinity) - case <-t.ctx.Done(): + case <-t.done: } return case <-keepalive.C: @@ -992,7 +1003,7 @@ func (t *http2Server) keepalive() { } t.controlBuf.put(p) keepalive.Reset(t.kp.Timeout) - case <-t.ctx.Done(): + case <-t.done: return } } @@ -1012,7 +1023,7 @@ func (t *http2Server) Close() error { t.activeStreams = nil t.mu.Unlock() t.controlBuf.finish() - t.cancel() + close(t.done) err := t.conn.Close() if channelz.IsOn() { channelz.RemoveEntry(t.channelzID) @@ -1152,7 +1163,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { select { case <-t.drainChan: case <-timer.C: - case <-t.ctx.Done(): + case <-t.done: return } t.controlBuf.put(&goAway{code: g.code, debugData: g.debugData}) @@ -1202,7 +1213,7 @@ func (t *http2Server) getOutFlowWindow() int64 { select { case sz := <-resp: return int64(sz) - case <-t.ctxDone: + case <-t.done: return -1 case <-timer.C: return -2 diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go index 9d212867ce..8f5f3349d9 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http_util.go +++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go @@ -667,6 +667,7 @@ func newFramer(conn net.Conn, writeBufferSize, readBufferSize int, maxHeaderList writer: w, fr: http2.NewFramer(w, r), } + f.fr.SetMaxReadFrameSize(http2MaxFrameLen) // Opt-in to Frame reuse API on framer to reduce garbage. // Frames aren't safe to read from after a subsequent call to ReadFrame. f.fr.SetReuseFrames() diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 1c1d106709..bfab940bd0 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -233,6 +233,7 @@ const ( type Stream struct { id uint32 st ServerTransport // nil for client side Stream + ct *http2Client // nil for server side Stream ctx context.Context // the associated context of the stream cancel context.CancelFunc // always nil for client side Stream done chan struct{} // closed at the end of stream to unblock writers. On the client side. @@ -251,6 +252,10 @@ type Stream struct { headerChan chan struct{} // closed to indicate the end of header metadata. headerChanClosed uint32 // set when headerChan is closed. Used to avoid closing headerChan multiple times. + // headerValid indicates whether a valid header was received. Only + // meaningful after headerChan is closed (always call waitOnHeader() before + // reading its value). Not valid on server side. + headerValid bool // hdrMu protects header and trailer metadata on the server-side. hdrMu sync.Mutex @@ -303,34 +308,28 @@ func (s *Stream) getState() streamState { return streamState(atomic.LoadUint32((*uint32)(&s.state))) } -func (s *Stream) waitOnHeader() error { +func (s *Stream) waitOnHeader() { if s.headerChan == nil { // On the server headerChan is always nil since a stream originates // only after having received headers. - return nil + return } select { case <-s.ctx.Done(): - // We prefer success over failure when reading messages because we delay - // context error in stream.Read(). To keep behavior consistent, we also - // prefer success here. - select { - case <-s.headerChan: - return nil - default: - } - return ContextErr(s.ctx.Err()) + // Close the stream to prevent headers/trailers from changing after + // this function returns. + s.ct.CloseStream(s, ContextErr(s.ctx.Err())) + // headerChan could possibly not be closed yet if closeStream raced + // with operateHeaders; wait until it is closed explicitly here. + <-s.headerChan case <-s.headerChan: - return nil } } // RecvCompress returns the compression algorithm applied to the inbound // message. It is empty string if there is no compression applied. func (s *Stream) RecvCompress() string { - if err := s.waitOnHeader(); err != nil { - return "" - } + s.waitOnHeader() return s.recvCompress } @@ -351,36 +350,27 @@ func (s *Stream) Done() <-chan struct{} { // available. It blocks until i) the metadata is ready or ii) there is no header // metadata or iii) the stream is canceled/expired. // -// On server side, it returns the out header after t.WriteHeader is called. +// On server side, it returns the out header after t.WriteHeader is called. It +// does not block and must not be called until after WriteHeader. func (s *Stream) Header() (metadata.MD, error) { - if s.headerChan == nil && s.header != nil { + if s.headerChan == nil { // On server side, return the header in stream. It will be the out // header after t.WriteHeader is called. return s.header.Copy(), nil } - err := s.waitOnHeader() - // Even if the stream is closed, header is returned if available. - select { - case <-s.headerChan: - if s.header == nil { - return nil, nil - } - return s.header.Copy(), nil - default: + s.waitOnHeader() + if !s.headerValid { + return nil, s.status.Err() } - return nil, err + return s.header.Copy(), nil } // TrailersOnly blocks until a header or trailers-only frame is received and // then returns true if the stream was trailers-only. If the stream ends -// before headers are received, returns true, nil. If a context error happens -// first, returns it as a status error. Client-side only. -func (s *Stream) TrailersOnly() (bool, error) { - err := s.waitOnHeader() - if err != nil { - return false, err - } - return s.noHeaders, nil +// before headers are received, returns true, nil. Client-side only. +func (s *Stream) TrailersOnly() bool { + s.waitOnHeader() + return s.noHeaders } // Trailer returns the cached trailer metedata. Note that if it is not called @@ -534,6 +524,7 @@ type ServerConfig struct { ReadBufferSize int ChannelzParentID int64 MaxHeaderListSize *uint32 + HeaderTableSize *uint32 } // NewServerTransport creates a ServerTransport with conn or non-nil error diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index e83da346a5..4c5423ba0f 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -21,6 +21,10 @@ package resolver import ( + "context" + "net" + + "google.golang.org/grpc/credentials" "google.golang.org/grpc/serviceconfig" ) @@ -86,9 +90,16 @@ type Address struct { // Type is the type of this address. Type AddressType // ServerName is the name of this address. + // If non-empty, the ServerName is used as the transport certification authority for + // the address, instead of the hostname from the Dial target string. In most cases, + // this should not be set. // - // e.g. if Type is GRPCLB, ServerName should be the name of the remote load + // If Type is GRPCLB, ServerName should be the name of the remote load // balancer, not the name of the backend. + // + // WARNING: ServerName must only be populated with trusted values. It + // is insecure to populate it with data from untrusted inputs since untrusted + // values could be used to bypass the authority checks performed by TLS. ServerName string // Metadata is the information associated with Addr, which may be used // to make load balancing decision. @@ -98,18 +109,38 @@ type Address struct { // BuildOption includes additional information for the builder to create // the resolver. type BuildOption struct { - // DisableServiceConfig indicates whether resolver should fetch service config data. + // DisableServiceConfig indicates whether a resolver implementation should + // fetch service config data. DisableServiceConfig bool + // DialCreds is the transport credentials used by the ClientConn for + // communicating with the target gRPC service (set via + // WithTransportCredentials). In cases where a name resolution service + // requires the same credentials, the resolver may use this field. In most + // cases though, it is not appropriate, and this field may be ignored. + DialCreds credentials.TransportCredentials + // CredsBundle is the credentials bundle used by the ClientConn for + // communicating with the target gRPC service (set via + // WithCredentialsBundle). In cases where a name resolution service + // requires the same credentials, the resolver may use this field. In most + // cases though, it is not appropriate, and this field may be ignored. + CredsBundle credentials.Bundle + // Dialer is the custom dialer used by the ClientConn for dialling the + // target gRPC service (set via WithDialer). In cases where a name + // resolution service requires the same dialer, the resolver may use this + // field. In most cases though, it is not appropriate, and this field may + // be ignored. + Dialer func(context.Context, string) (net.Conn, error) } // State contains the current Resolver state relevant to the ClientConn. type State struct { - Addresses []Address // Resolved addresses for the target - // ServiceConfig is the parsed service config; obtained from - // serviceconfig.Parse. - ServiceConfig serviceconfig.Config + // Addresses is the latest set of resolved addresses for the target. + Addresses []Address - // TODO: add Err error + // ServiceConfig contains the result from parsing the latest service + // config. If it is nil, it indicates no service config is present or the + // resolver does not provide service configs. + ServiceConfig *serviceconfig.ParseResult } // ClientConn contains the callbacks for resolver to notify any updates @@ -122,6 +153,10 @@ type State struct { type ClientConn interface { // UpdateState updates the state of the ClientConn appropriately. UpdateState(State) + // ReportError notifies the ClientConn that the Resolver encountered an + // error. The ClientConn will notify the load balancer and begin calling + // ResolveNow on the Resolver with exponential backoff. + ReportError(error) // NewAddress is called by resolver to notify ClientConn a new list // of resolved addresses. // The address list should be the complete list of resolved addresses. @@ -133,6 +168,9 @@ type ClientConn interface { // // Deprecated: Use UpdateState instead. NewServiceConfig(serviceConfig string) + // ParseServiceConfig parses the provided service config and returns an + // object that provides the parsed config. + ParseServiceConfig(serviceConfigJSON string) *serviceconfig.ParseResult } // Target represents a target for gRPC, as specified in: diff --git a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go index 6934905b0f..7dcefcfa0f 100644 --- a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go +++ b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go @@ -21,22 +21,29 @@ package grpc import ( "fmt" "strings" - "sync/atomic" + "sync" + "time" + "google.golang.org/grpc/balancer" + "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal/channelz" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/serviceconfig" ) // ccResolverWrapper is a wrapper on top of cc for resolvers. // It implements resolver.ClientConnection interface. type ccResolverWrapper struct { - cc *ClientConn - resolver resolver.Resolver - addrCh chan []resolver.Address - scCh chan string - done uint32 // accessed atomically; set to 1 when closed. - curState resolver.State + cc *ClientConn + resolverMu sync.Mutex + resolver resolver.Resolver + done *grpcsync.Event + curState resolver.State + + pollingMu sync.Mutex + polling chan struct{} } // split2 returns the values from strings.SplitN(s, sep, 2). @@ -67,12 +74,9 @@ func parseTarget(target string) (ret resolver.Target) { return ret } -// newCCResolverWrapper parses cc.target for scheme and gets the resolver -// builder for this scheme and builds the resolver. The monitoring goroutine -// for it is not started yet and can be created by calling start(). -// -// If withResolverBuilder dial option is set, the specified resolver will be -// used instead. +// newCCResolverWrapper uses the resolver.Builder stored in the ClientConn to +// build a Resolver and returns a ccResolverWrapper object which wraps the +// newly built resolver. func newCCResolverWrapper(cc *ClientConn) (*ccResolverWrapper, error) { rb := cc.dopts.resolverBuilder if rb == nil { @@ -80,47 +84,122 @@ func newCCResolverWrapper(cc *ClientConn) (*ccResolverWrapper, error) { } ccr := &ccResolverWrapper{ - cc: cc, - addrCh: make(chan []resolver.Address, 1), - scCh: make(chan string, 1), + cc: cc, + done: grpcsync.NewEvent(), + } + + var credsClone credentials.TransportCredentials + if creds := cc.dopts.copts.TransportCredentials; creds != nil { + credsClone = creds.Clone() + } + rbo := resolver.BuildOption{ + DisableServiceConfig: cc.dopts.disableServiceConfig, + DialCreds: credsClone, + CredsBundle: cc.dopts.copts.CredsBundle, + Dialer: cc.dopts.copts.Dialer, } var err error - ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, resolver.BuildOption{DisableServiceConfig: cc.dopts.disableServiceConfig}) + // We need to hold the lock here while we assign to the ccr.resolver field + // to guard against a data race caused by the following code path, + // rb.Build-->ccr.ReportError-->ccr.poll-->ccr.resolveNow, would end up + // accessing ccr.resolver which is being assigned here. + ccr.resolverMu.Lock() + ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, rbo) if err != nil { return nil, err } + ccr.resolverMu.Unlock() return ccr, nil } func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOption) { - ccr.resolver.ResolveNow(o) + ccr.resolverMu.Lock() + if !ccr.done.HasFired() { + ccr.resolver.ResolveNow(o) + } + ccr.resolverMu.Unlock() } func (ccr *ccResolverWrapper) close() { + ccr.resolverMu.Lock() ccr.resolver.Close() - atomic.StoreUint32(&ccr.done, 1) + ccr.done.Fire() + ccr.resolverMu.Unlock() } -func (ccr *ccResolverWrapper) isDone() bool { - return atomic.LoadUint32(&ccr.done) == 1 +// poll begins or ends asynchronous polling of the resolver based on whether +// err is ErrBadResolverState. +func (ccr *ccResolverWrapper) poll(err error) { + ccr.pollingMu.Lock() + defer ccr.pollingMu.Unlock() + if err != balancer.ErrBadResolverState { + // stop polling + if ccr.polling != nil { + close(ccr.polling) + ccr.polling = nil + } + return + } + if ccr.polling != nil { + // already polling + return + } + p := make(chan struct{}) + ccr.polling = p + go func() { + for i := 0; ; i++ { + ccr.resolveNow(resolver.ResolveNowOption{}) + t := time.NewTimer(ccr.cc.dopts.resolveNowBackoff(i)) + select { + case <-p: + t.Stop() + return + case <-ccr.done.Done(): + // Resolver has been closed. + t.Stop() + return + case <-t.C: + select { + case <-p: + return + default: + } + // Timer expired; re-resolve. + } + } + }() } func (ccr *ccResolverWrapper) UpdateState(s resolver.State) { - if ccr.isDone() { + if ccr.done.HasFired() { return } grpclog.Infof("ccResolverWrapper: sending update to cc: %v", s) if channelz.IsOn() { ccr.addChannelzTraceEvent(s) } - ccr.cc.updateResolverState(s) ccr.curState = s + ccr.poll(ccr.cc.updateResolverState(ccr.curState, nil)) +} + +func (ccr *ccResolverWrapper) ReportError(err error) { + if ccr.done.HasFired() { + return + } + grpclog.Warningf("ccResolverWrapper: reporting error to cc: %v", err) + if channelz.IsOn() { + channelz.AddTraceEvent(ccr.cc.channelzID, &channelz.TraceEventDesc{ + Desc: fmt.Sprintf("Resolver reported error: %v", err), + Severity: channelz.CtWarning, + }) + } + ccr.poll(ccr.cc.updateResolverState(resolver.State{}, err)) } // NewAddress is called by the resolver implementation to send addresses to gRPC. func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { - if ccr.isDone() { + if ccr.done.HasFired() { return } grpclog.Infof("ccResolverWrapper: sending new addresses to cc: %v", addrs) @@ -128,31 +207,49 @@ func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { ccr.addChannelzTraceEvent(resolver.State{Addresses: addrs, ServiceConfig: ccr.curState.ServiceConfig}) } ccr.curState.Addresses = addrs - ccr.cc.updateResolverState(ccr.curState) + ccr.poll(ccr.cc.updateResolverState(ccr.curState, nil)) } // NewServiceConfig is called by the resolver implementation to send service // configs to gRPC. func (ccr *ccResolverWrapper) NewServiceConfig(sc string) { - if ccr.isDone() { + if ccr.done.HasFired() { return } grpclog.Infof("ccResolverWrapper: got new service config: %v", sc) - c, err := parseServiceConfig(sc) - if err != nil { + scpr := parseServiceConfig(sc) + if scpr.Err != nil { + grpclog.Warningf("ccResolverWrapper: error parsing service config: %v", scpr.Err) + if channelz.IsOn() { + channelz.AddTraceEvent(ccr.cc.channelzID, &channelz.TraceEventDesc{ + Desc: fmt.Sprintf("Error parsing service config: %v", scpr.Err), + Severity: channelz.CtWarning, + }) + } + ccr.poll(balancer.ErrBadResolverState) return } if channelz.IsOn() { - ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: c}) + ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: scpr}) } - ccr.curState.ServiceConfig = c - ccr.cc.updateResolverState(ccr.curState) + ccr.curState.ServiceConfig = scpr + ccr.poll(ccr.cc.updateResolverState(ccr.curState, nil)) +} + +func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult { + return parseServiceConfig(scJSON) } func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { var updates []string - oldSC, oldOK := ccr.curState.ServiceConfig.(*ServiceConfig) - newSC, newOK := s.ServiceConfig.(*ServiceConfig) + var oldSC, newSC *ServiceConfig + var oldOK, newOK bool + if ccr.curState.ServiceConfig != nil { + oldSC, oldOK = ccr.curState.ServiceConfig.Config.(*ServiceConfig) + } + if s.ServiceConfig != nil { + newSC, newOK = s.ServiceConfig.Config.(*ServiceConfig) + } if oldOK != newOK || (oldOK && newOK && oldSC.rawJSONString != newSC.rawJSONString) { updates = append(updates, "service config updated") } diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 088c3f1b25..edaba79575 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -648,35 +648,58 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei return nil, st.Err() } + var size int if pf == compressionMade { // To match legacy behavior, if the decompressor is set by WithDecompressor or RPCDecompressor, // use this decompressor as the default. if dc != nil { d, err = dc.Do(bytes.NewReader(d)) - if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) - } + size = len(d) } else { - dcReader, err := compressor.Decompress(bytes.NewReader(d)) - if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) - } - // Read from LimitReader with limit max+1. So if the underlying - // reader is over limit, the result will be bigger than max. - d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) - if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) - } + d, size, err = decompress(compressor, d, maxReceiveMessageSize) } + if err != nil { + return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) + } + } else { + size = len(d) } - if len(d) > maxReceiveMessageSize { + if size > maxReceiveMessageSize { // TODO: Revisit the error code. Currently keep it consistent with java // implementation. - return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", len(d), maxReceiveMessageSize) + return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", size, maxReceiveMessageSize) } return d, nil } +// Using compressor, decompress d, returning data and size. +// Optionally, if data will be over maxReceiveMessageSize, just return the size. +func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize int) ([]byte, int, error) { + dcReader, err := compressor.Decompress(bytes.NewReader(d)) + if err != nil { + return nil, 0, err + } + if sizer, ok := compressor.(interface { + DecompressedSize(compressedBytes []byte) int + }); ok { + if size := sizer.DecompressedSize(d); size >= 0 { + if size > maxReceiveMessageSize { + return nil, size, nil + } + // size is used as an estimate to size the buffer, but we + // will read more data if available. + // +MinRead so ReadFrom will not reallocate if size is correct. + buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead)) + bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + return buf.Bytes(), int(bytesRead), err + } + } + // Read from LimitReader with limit max+1. So if the underlying + // reader is over limit, the result will be bigger than max. + d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + return d, len(d), err +} + // For the two compressor parameters, both should not be set, but if they are, // dc takes precedence over compressor. // TODO(dfawley): wrap the old compressor/decompressor using the new API? diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index f064b73e55..e54083d850 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -130,6 +130,7 @@ type serverOptions struct { readBufferSize int connectionTimeout time.Duration maxHeaderListSize *uint32 + headerTableSize *uint32 } var defaultServerOptions = serverOptions{ @@ -377,6 +378,16 @@ func MaxHeaderListSize(s uint32) ServerOption { }) } +// HeaderTableSize returns a ServerOption that sets the size of dynamic +// header table for stream. +// +// This API is EXPERIMENTAL. +func HeaderTableSize(s uint32) ServerOption { + return newFuncServerOption(func(o *serverOptions) { + o.headerTableSize = &s + }) +} + // NewServer creates a gRPC server which has no service registered and has not // started to accept requests yet. func NewServer(opt ...ServerOption) *Server { @@ -686,6 +697,7 @@ func (s *Server) newHTTP2Transport(c net.Conn, authInfo credentials.AuthInfo) tr ReadBufferSize: s.opts.readBufferSize, ChannelzParentID: s.channelzID, MaxHeaderListSize: s.opts.maxHeaderListSize, + HeaderTableSize: s.opts.headerTableSize, } st, err := transport.NewServerTransport("http2", c, config) if err != nil { diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index d0787f1e2a..4f8836d48f 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -261,20 +261,17 @@ type jsonSC struct { } func init() { - internal.ParseServiceConfig = func(sc string) (interface{}, error) { - return parseServiceConfig(sc) - } + internal.ParseServiceConfigForTesting = parseServiceConfig } - -func parseServiceConfig(js string) (*ServiceConfig, error) { +func parseServiceConfig(js string) *serviceconfig.ParseResult { if len(js) == 0 { - return nil, fmt.Errorf("no JSON service config provided") + return &serviceconfig.ParseResult{Err: fmt.Errorf("no JSON service config provided")} } var rsc jsonSC err := json.Unmarshal([]byte(js), &rsc) if err != nil { grpclog.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return nil, err + return &serviceconfig.ParseResult{Err: err} } sc := ServiceConfig{ LB: rsc.LoadBalancingPolicy, @@ -288,7 +285,7 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { if len(lbcfg) != 1 { err := fmt.Errorf("invalid loadBalancingConfig: entry %v does not contain exactly 1 policy/config pair: %q", i, lbcfg) grpclog.Warningf(err.Error()) - return nil, err + return &serviceconfig.ParseResult{Err: err} } var name string var jsonCfg json.RawMessage @@ -303,17 +300,25 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { var err error sc.lbConfig.cfg, err = parser.ParseConfig(jsonCfg) if err != nil { - return nil, fmt.Errorf("error parsing loadBalancingConfig for policy %q: %v", name, err) + return &serviceconfig.ParseResult{Err: fmt.Errorf("error parsing loadBalancingConfig for policy %q: %v", name, err)} } } else if string(jsonCfg) != "{}" { grpclog.Warningf("non-empty balancer configuration %q, but balancer does not implement ParseConfig", string(jsonCfg)) } break } + if sc.lbConfig == nil { + // We had a loadBalancingConfig field but did not encounter a + // supported policy. The config is considered invalid in this + // case. + err := fmt.Errorf("invalid loadBalancingConfig: no supported policies found") + grpclog.Warningf(err.Error()) + return &serviceconfig.ParseResult{Err: err} + } } if rsc.MethodConfig == nil { - return &sc, nil + return &serviceconfig.ParseResult{Config: &sc} } for _, m := range *rsc.MethodConfig { if m.Name == nil { @@ -322,7 +327,7 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { d, err := parseDuration(m.Timeout) if err != nil { grpclog.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return nil, err + return &serviceconfig.ParseResult{Err: err} } mc := MethodConfig{ @@ -331,7 +336,7 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { } if mc.retryPolicy, err = convertRetryPolicy(m.RetryPolicy); err != nil { grpclog.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return nil, err + return &serviceconfig.ParseResult{Err: err} } if m.MaxRequestMessageBytes != nil { if *m.MaxRequestMessageBytes > int64(maxInt) { @@ -356,13 +361,13 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { if sc.retryThrottling != nil { if mt := sc.retryThrottling.MaxTokens; mt <= 0 || mt > 1000 { - return nil, fmt.Errorf("invalid retry throttling config: maxTokens (%v) out of range (0, 1000]", mt) + return &serviceconfig.ParseResult{Err: fmt.Errorf("invalid retry throttling config: maxTokens (%v) out of range (0, 1000]", mt)} } if tr := sc.retryThrottling.TokenRatio; tr <= 0 { - return nil, fmt.Errorf("invalid retry throttling config: tokenRatio (%v) may not be negative", tr) + return &serviceconfig.ParseResult{Err: fmt.Errorf("invalid retry throttling config: tokenRatio (%v) may not be negative", tr)} } } - return &sc, nil + return &serviceconfig.ParseResult{Config: &sc} } func convertRetryPolicy(jrp *jsonRetryPolicy) (p *retryPolicy, err error) { diff --git a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go index 53b27875a1..187c304421 100644 --- a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go @@ -22,27 +22,20 @@ // This package is EXPERIMENTAL. package serviceconfig -import ( - "google.golang.org/grpc/internal" -) - // Config represents an opaque data structure holding a service config. type Config interface { - isConfig() + isServiceConfig() } // LoadBalancingConfig represents an opaque data structure holding a load -// balancer config. +// balancing config. type LoadBalancingConfig interface { isLoadBalancingConfig() } -// Parse parses the JSON service config provided into an internal form or -// returns an error if the config is invalid. -func Parse(ServiceConfigJSON string) (Config, error) { - c, err := internal.ParseServiceConfig(ServiceConfigJSON) - if err != nil { - return nil, err - } - return c.(Config), err +// ParseResult contains a service config or an error. Exactly one must be +// non-nil. +type ParseResult struct { + Config Config + Err error } diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 134a624a15..bb99940e36 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -488,7 +488,7 @@ func (cs *clientStream) shouldRetry(err error) error { pushback := 0 hasPushback := false if cs.attempt.s != nil { - if to, toErr := cs.attempt.s.TrailersOnly(); toErr != nil || !to { + if !cs.attempt.s.TrailersOnly() { return err } diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 5411a73a22..40af09639c 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.23.0" +const Version = "1.25.1" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index 661e1e1de9..f324be509a 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -31,12 +31,15 @@ PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" if [[ "$1" = "-install" ]]; then # Check for module support if go help mod >& /dev/null; then + # Install the pinned versions as defined in module tools. + pushd ./test/tools go install \ golang.org/x/lint/golint \ golang.org/x/tools/cmd/goimports \ honnef.co/go/tools/cmd/staticcheck \ github.com/client9/misspell/cmd/misspell \ github.com/golang/protobuf/protoc-gen-go + popd else # Ye olde `go get` incantation. # Note: this gets the latest version of all tools (vs. the pinned versions @@ -67,18 +70,21 @@ elif [[ "$#" -ne 0 ]]; then fi # - Ensure all source files contain a copyright message. -git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | fail_on_output +(! git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go') # - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. (! grep 'func Test[^(]' *_test.go) (! grep 'func Test[^(]' test/*.go) +# - Do not import x/net/context. +(! git grep -l 'x/net/context' -- "*.go") + # - Do not import math/rand for real library code. Use internal/grpcrand for # thread safety. -git ls-files "*.go" | xargs grep -l '"math/rand"' 2>&1 | (! grep -v '^examples\|^stress\|grpcrand\|wrr_test') +git grep -l '"math/rand"' -- "*.go" 2>&1 | (! grep -v '^examples\|^stress\|grpcrand\|wrr_test') # - Ensure all ptypes proto packages are renamed when importing. -git ls-files "*.go" | (! xargs grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/") +(! git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go") # - Check imports that are illegal in appengine (until Go 1.11). # TODO: Remove when we drop Go 1.10 support @@ -86,7 +92,7 @@ go list -f {{.Dir}} ./... | xargs go run test/go_vet/vet.go # - gofmt, goimports, golint (with exceptions for generated code), go vet. gofmt -s -d -l . 2>&1 | fail_on_output -goimports -l . 2>&1 | (! grep -vE "(_mock|\.pb)\.go:") | fail_on_output +goimports -l . 2>&1 | (! grep -vE "(_mock|\.pb)\.go") | fail_on_output golint ./... 2>&1 | (! grep -vE "(_mock|\.pb)\.go:") go vet -all . @@ -109,8 +115,10 @@ fi staticcheck -go 1.9 -checks 'inherit,-ST1015' -ignore ' google.golang.org/grpc/balancer.go:SA1019 google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go:SA1019 +google.golang.org/grpc/balancer/grpclb/grpclb_test.go:SA1019 google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go:SA1019 google.golang.org/grpc/xds/internal/balancer/edsbalancer/balancergroup.go:SA1019 +google.golang.org/grpc/xds/internal/resolver/xds_resolver.go:SA1019 google.golang.org/grpc/xds/internal/balancer/xds.go:SA1019 google.golang.org/grpc/xds/internal/balancer/xds_client.go:SA1019 google.golang.org/grpc/balancer_conn_wrappers.go:SA1019 @@ -124,7 +132,7 @@ google.golang.org/grpc/examples/features/debugging/client/main.go:SA1019 google.golang.org/grpc/examples/features/load_balancing/client/main.go:SA1019 google.golang.org/grpc/internal/transport/handler_server.go:SA1019 google.golang.org/grpc/internal/transport/handler_server_test.go:SA1019 -google.golang.org/grpc/resolver/dns/dns_resolver.go:SA1019 +google.golang.org/grpc/internal/resolver/dns/dns_resolver.go:SA1019 google.golang.org/grpc/stats/stats_test.go:SA1019 google.golang.org/grpc/test/balancer_test.go:SA1019 google.golang.org/grpc/test/channelz_test.go:SA1019 diff --git a/vendor/modules.txt b/vendor/modules.txt index 25c0bb8624..a2d0e9b211 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -82,6 +82,9 @@ github.com/beorn7/perks/quantile github.com/bgentry/speakeasy # github.com/boltdb/bolt v1.3.1 github.com/boltdb/bolt +# github.com/census-instrumentation/opencensus-proto v0.2.1 +github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1 +github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1 # github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible github.com/circonus-labs/circonus-gometrics github.com/circonus-labs/circonus-gometrics/api @@ -89,6 +92,8 @@ github.com/circonus-labs/circonus-gometrics/api/config github.com/circonus-labs/circonus-gometrics/checkmgr # github.com/circonus-labs/circonusllhist v0.1.3 github.com/circonus-labs/circonusllhist +# github.com/cncf/udpa/go v0.0.0-20200313221541-5f7e5dd04533 +github.com/cncf/udpa/go/udpa/annotations # github.com/coredns/coredns v1.1.2 github.com/coredns/coredns/plugin/pkg/dnsutil # github.com/coreos/go-oidc v2.1.0+incompatible @@ -109,7 +114,8 @@ github.com/dimchansky/utfbom github.com/docker/go-connections/sockets # github.com/elazarl/go-bindata-assetfs v0.0.0-20160803192304-e1a2a7ec64b0 github.com/elazarl/go-bindata-assetfs -# github.com/envoyproxy/go-control-plane v0.8.0 +# github.com/envoyproxy/go-control-plane v0.9.5 +github.com/envoyproxy/go-control-plane/envoy/annotations github.com/envoyproxy/go-control-plane/envoy/api/v2 github.com/envoyproxy/go-control-plane/envoy/api/v2/auth github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster @@ -121,35 +127,41 @@ github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2 github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2 github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2 github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2 +github.com/envoyproxy/go-control-plane/envoy/config/listener/v2 +github.com/envoyproxy/go-control-plane/envoy/config/trace/v2 github.com/envoyproxy/go-control-plane/envoy/service/auth/v2 github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2 github.com/envoyproxy/go-control-plane/envoy/type -github.com/envoyproxy/go-control-plane/pkg/util -# github.com/envoyproxy/protoc-gen-validate v0.0.14 +github.com/envoyproxy/go-control-plane/envoy/type/matcher +github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2 +github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2 +github.com/envoyproxy/go-control-plane/pkg/conversion +github.com/envoyproxy/go-control-plane/pkg/wellknown +# github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/envoyproxy/protoc-gen-validate/validate # github.com/fatih/color v1.9.0 github.com/fatih/color # github.com/go-ole/go-ole v1.2.1 github.com/go-ole/go-ole github.com/go-ole/go-ole/oleutil -# github.com/gogo/googleapis v1.1.0 -github.com/gogo/googleapis/google/api -github.com/gogo/googleapis/google/rpc # github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d github.com/gogo/protobuf/gogoproto -github.com/gogo/protobuf/jsonpb github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys github.com/gogo/protobuf/types -# github.com/golang/protobuf v1.3.1 +# github.com/golang/protobuf v1.3.2 +github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go/descriptor github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration +github.com/golang/protobuf/ptypes/empty +github.com/golang/protobuf/ptypes/struct github.com/golang/protobuf/ptypes/timestamp +github.com/golang/protobuf/ptypes/wrappers # github.com/golang/snappy v0.0.1 github.com/golang/snappy # github.com/google/btree v1.0.0 @@ -343,7 +355,7 @@ github.com/pquerna/cachecontrol/cacheobject github.com/prometheus/client_golang/prometheus github.com/prometheus/client_golang/prometheus/internal github.com/prometheus/client_golang/prometheus/promhttp -# github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 +# github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 github.com/prometheus/client_model/go # github.com/prometheus/common v0.4.1 github.com/prometheus/common/expfmt @@ -520,10 +532,12 @@ google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20190530194941-fb225487d101 +# google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 +google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.23.0 +# google.golang.org/grpc v1.25.1 google.golang.org/grpc +google.golang.org/grpc/backoff google.golang.org/grpc/balancer google.golang.org/grpc/balancer/base google.golang.org/grpc/balancer/roundrobin @@ -541,10 +555,13 @@ google.golang.org/grpc/internal google.golang.org/grpc/internal/backoff google.golang.org/grpc/internal/balancerload google.golang.org/grpc/internal/binarylog +google.golang.org/grpc/internal/buffer google.golang.org/grpc/internal/channelz google.golang.org/grpc/internal/envconfig google.golang.org/grpc/internal/grpcrand google.golang.org/grpc/internal/grpcsync +google.golang.org/grpc/internal/resolver/dns +google.golang.org/grpc/internal/resolver/passthrough google.golang.org/grpc/internal/syscall google.golang.org/grpc/internal/transport google.golang.org/grpc/keepalive @@ -552,8 +569,6 @@ google.golang.org/grpc/metadata google.golang.org/grpc/naming google.golang.org/grpc/peer google.golang.org/grpc/resolver -google.golang.org/grpc/resolver/dns -google.golang.org/grpc/resolver/passthrough google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status